dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #31358
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15962: minor npe check in object filter
------------------------------------------------------------
revno: 15962
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-07-04 10:18:31 +0700
message:
minor npe check in object filter
modified:
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/objectfilter/DefaultObjectFilterService.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/objectfilter/DefaultObjectFilterService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/objectfilter/DefaultObjectFilterService.java 2014-06-20 11:14:18 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/objectfilter/DefaultObjectFilterService.java 2014-07-04 03:18:31 +0000
@@ -76,9 +76,14 @@
return list;
}
- @SuppressWarnings( "unchecked" )
+ @SuppressWarnings("unchecked")
private <T> boolean evaluateWithFilters( T object, Filters filters )
{
+ if ( object == null )
+ {
+ return false;
+ }
+
Schema schema = schemaService.getDynamicSchema( object.getClass() );
for ( String field : filters.getFilters().keySet() )