File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

BeanUtils vs ProperyUtils

 
Dan Howard
Ranch Hand
Posts: 47
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

TIA
 
Rob Spoor
Sheriff
Pie
Posts: 20380
46
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic