aspose file tools*
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


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "BeanUtils vs ProperyUtils" Watch "BeanUtils vs ProperyUtils" New topic
Author

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?

TIA
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19722
    
  20

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 ]

SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: BeanUtils vs ProperyUtils