dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #25520
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12685: minor fix in WebUtils
------------------------------------------------------------
revno: 12685
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-10-15 16:57:03 +0200
message:
minor fix in WebUtils
modified:
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/utils/WebUtils.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-web/dhis-web-api/src/main/java/org/hisp/dhis/api/utils/WebUtils.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/utils/WebUtils.java 2013-10-15 10:43:45 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/utils/WebUtils.java 2013-10-15 14:57:03 +0000
@@ -40,9 +40,10 @@
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Date;
import java.util.List;
-import static org.hisp.dhis.system.util.PredicateUtils.alwaysTrue;
+import static org.hisp.dhis.system.util.PredicateUtils.*;
/**
* @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
@@ -127,7 +128,7 @@
generateLinks( object, true );
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings( "unchecked" )
public static void generateLinks( Object object, boolean deep )
{
if ( object == null )
@@ -141,7 +142,9 @@
identifiableObject.setHref( ContextUtils.getPathWithUid( identifiableObject ) );
}
- Collection<Field> fields = ReflectionUtils.collectFields( object.getClass(), alwaysTrue );
+ List<Field> fields = new ArrayList<Field>();
+ fields.addAll( ReflectionUtils.collectFields( object.getClass(), idObjects ) );
+ fields.addAll( ReflectionUtils.collectFields( object.getClass(), idObjectCollections ) );
if ( !deep )
{