← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16338: Options, minor revert

 

------------------------------------------------------------
revno: 16338
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2014-08-07 13:46:01 +0200
message:
  Options, minor revert
modified:
  dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/Options.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/metadata/Options.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/Options.java	2014-08-07 09:15:03 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/Options.java	2014-08-07 11:46:01 +0000
@@ -101,7 +101,12 @@
     {
         return str != null ? Boolean.parseBoolean( str ) : defaultValue;
     }
-
+    
+    protected static boolean stringIsTrue( String str )
+    {
+        return stringAsBoolean( str, false );
+    }
+    
     protected static int stringAsInt( String str )
     {
         return stringAsInt( str, 0 );
@@ -157,7 +162,7 @@
     {
         String enabled = options.get( type );
 
-        return isTrue( enabled ) || ( enabled == null && assumeTrue );
+        return stringIsTrue( enabled ) || ( enabled == null && assumeTrue );
     }
 
     /**