DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG� RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=32642>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND� INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=32642 Summary: Copy Specific Properties Product: Commons Version: unspecified Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P5 Component: Bean Utilities AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] In building an application my team came across a need to copy specific properties only. I realize this is a trivial enhancement however it would save others who find the same need from coding a solution themselves. Below is an implementation ( The one we used ). ------------Code------------- public static void copyProperties(Object to, Object from, String[] properties) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { for (int idx = 0; idx < properties.length; idx++) { copyProperty( to, propertyNames[i], getPropertyUtils().getProperty( from, propertyNames[i])); } } -------------Code--------------- -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
