dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #31209
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15887: Fix for csv import and DataElementDomain enum
------------------------------------------------------------
revno: 15887
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-06-27 17:01:00 +0200
message:
Fix for csv import and DataElementDomain enum
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementDomain.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-api/src/main/java/org/hisp/dhis/dataelement/DataElementDomain.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementDomain.java 2014-06-16 05:13:31 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementDomain.java 2014-06-27 15:01:00 +0000
@@ -38,24 +38,24 @@
private final String value;
+ private DataElementDomain( String value )
+ {
+ this.value = value;
+ }
+
public static DataElementDomain fromValue( String value )
{
for ( DataElementDomain domainType : DataElementDomain.values() )
{
- if ( domainType.getValue().equals( value ) )
+ if ( domainType.getValue().equalsIgnoreCase( value ) )
{
return domainType;
}
}
- throw new IllegalArgumentException();
+ return null;
}
- DataElementDomain( String value )
- {
- this.value = value;
- }
-
public String getValue()
{
return value;