dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #35832
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18348: minor
------------------------------------------------------------
revno: 18348
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2015-02-20 11:06:33 +0700
message:
minor
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/query/Operator.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/query/Typed.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/query/Operator.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/query/Operator.java 2015-02-20 03:59:30 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/query/Operator.java 2015-02-20 04:06:33 +0000
@@ -107,4 +107,9 @@
{
return typed.isValid( klass );
}
+
+ public boolean isValid( Class<?> klass )
+ {
+ return typed.isValid( klass );
+ }
}
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/query/Typed.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/query/Typed.java 2015-02-20 03:59:30 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/query/Typed.java 2015-02-20 04:06:33 +0000
@@ -48,14 +48,19 @@
public boolean isValid( Klass klass )
{
- if ( klasses.length == 0 || klass == null || klass.getKlass() == null )
+ return klass == null || isValid( klass.getKlass() );
+ }
+
+ public boolean isValid( Class<?> klass )
+ {
+ if ( klasses.length == 0 || klass == null )
{
return true;
}
for ( Class<?> k : klasses )
{
- if ( k != null && k.isAssignableFrom( klass.getKlass() ) )
+ if ( k != null && k.isAssignableFrom( klass ) )
{
return true;
}