Revision: 1740 http://svn.sourceforge.net/spring-rich-c/?rev=1740&view=rev Author: jhoskens Date: 2007-04-05 04:24:07 -0700 (Thu, 05 Apr 2007)
Log Message: ----------- convertPrimitiveToWrapper method must take null values into account to avoid NPE. (Class=null means not determined) Modified Paths: -------------- trunk/spring-richclient/core/src/main/java/org/springframework/richclient/util/ClassUtils.java Modified: trunk/spring-richclient/core/src/main/java/org/springframework/richclient/util/ClassUtils.java =================================================================== --- trunk/spring-richclient/core/src/main/java/org/springframework/richclient/util/ClassUtils.java 2007-04-04 09:49:47 UTC (rev 1739) +++ trunk/spring-richclient/core/src/main/java/org/springframework/richclient/util/ClassUtils.java 2007-04-05 11:24:07 UTC (rev 1740) @@ -226,8 +226,16 @@ primativeToWrapperMap.put(double.class, Double.class); } + /** + * Gets the equivalent class to convert to if the given clazz is a + * primitive. + * + * @param clazz + * Class to examin. + * @return the class to convert to or the inputted clazz. + */ public static Class convertPrimitiveToWrapper(Class clazz) { - if (!clazz.isPrimitive()) + if (clazz == null || !clazz.isPrimitive()) return clazz; return (Class)primativeToWrapperMap.get(clazz); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ spring-rich-c-cvs mailing list spring-rich-c-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spring-rich-c-cvs