← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17767: minor fix

 

------------------------------------------------------------
revno: 17767
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-12-22 10:30:50 +0100
message:
  minor fix
modified:
  dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/schema/DefaultSchemaValidator.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/schema/DefaultSchemaValidator.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/schema/DefaultSchemaValidator.java	2014-12-22 09:29:06 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/schema/DefaultSchemaValidator.java	2014-12-22 09:30:50 +0000
@@ -66,9 +66,13 @@
         {
             Object value = ReflectionUtils.invokeMethod( object, property.getGetterMethod() );
 
-            if ( !property.isNullable() && value == null )
+            if ( value == null )
             {
-                validationViolations.add( new ValidationViolation( "Property '" + property.getName() + "' can not be null." ) );
+                if ( !property.isNullable() )
+                {
+                    validationViolations.add( new ValidationViolation( "Property '" + property.getName() + "' can not be null." ) );
+                }
+
                 continue;
             }