Revision: 1483
          http://stripes.svn.sourceforge.net/stripes/?rev=1483&view=rev
Author:   bengunter
Date:     2012-03-24 18:17:17 +0000 (Sat, 24 Mar 2012)
Log Message:
-----------
Applied NPE fix for STS-845 from 1.5.x branch r1482

Revision Links:
--------------
    http://stripes.svn.sourceforge.net/stripes/?rev=1482&view=rev

Modified Paths:
--------------
    
trunk/stripes/src/net/sourceforge/stripes/controller/DefaultActionBeanPropertyBinder.java

Property Changed:
----------------
    trunk/


Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.5.x:1463-1464,1466,1468-1469,1471,1473,1475,1477-1478
   + /branches/1.5.x:1463-1464,1466,1468-1469,1471,1473,1475,1477-1478,1482

Modified: 
trunk/stripes/src/net/sourceforge/stripes/controller/DefaultActionBeanPropertyBinder.java
===================================================================
--- 
trunk/stripes/src/net/sourceforge/stripes/controller/DefaultActionBeanPropertyBinder.java
   2012-03-24 18:13:27 UTC (rev 1482)
+++ 
trunk/stripes/src/net/sourceforge/stripes/controller/DefaultActionBeanPropertyBinder.java
   2012-03-24 18:17:17 UTC (rev 1483)
@@ -357,7 +357,7 @@
      * @param targetType the declared type of the property on the ActionBean
      * @throws Exception if the property cannot be bound for any reason
      */
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings({ "unchecked", "rawtypes" })
     protected void bindNonNullValue(ActionBean bean,
             PropertyExpressionEvaluation propertyEvaluation, List<Object> 
valueOrValues,
             Class targetType, Class scalarType) throws Exception {
@@ -743,7 +743,7 @@
      * @return List<Object> a List of objects containing only objects of the 
desired type. It is
      *         not guaranteed to be the same length as the values array passed 
in.
      */
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings({ "unchecked", "rawtypes" })
     protected List<Object> convert(ActionBean bean, ParameterName 
propertyName, String[] values,
                                    Class<?> declaredType, Class<?> scalarType,
                                    ValidationMetadata validationInfo, 
List<ValidationError> errors)
@@ -794,7 +794,7 @@
                 value = CryptoUtil.decrypt(value);
             }
 
-            if (!"".equals(value)) {
+            if (value != null && value.length() > 0) {
                 try {
                     Object retval = null;
                     if (converter != null) {

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to