wood burning stoves 2.0
The moose likes Other Open Source Projects and the fly likes BeanUtils vs ProperyUtils Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "BeanUtils vs ProperyUtils" Watch "BeanUtils vs ProperyUtils" New topic

BeanUtils vs ProperyUtils

Dan Howard
Ranch Hand

Joined: Feb 22, 2004
Posts: 47
Hi All,

Does any one know why commons beanutils has 2 utility classes? They seem to do pretty much the same thing.

Should I always just use PropertyUtils?

Rob Spoor

Joined: Oct 27, 2005
Posts: 20275

It would have helped to mention you were talking about Apache Common BeanUtils.

I've looked at the API, and first of all there's this message:
Utility methods for using Java Reflection APIs to facilitate generic property getter and setter operations on Java objects. Much of this code was originally included in BeanUtils, but has been separated because of the volume of code involved.

Now that doesn't mean a lot though. I've also compared the methods, and most are in both classes. I guess it doesn't matter much which one you use then. It wouldn't even surprise me if one of the two calls the other.

I'd say, just use PropertyUtils if it has your method, and BeanUtils otherwise.
[ September 03, 2008: Message edited by: Rob Prime ]

How To Ask Questions How To Answer Questions
I agree. Here's the link: http://aspose.com/file-tools
subject: BeanUtils vs ProperyUtils
It's not a secret anymore!