=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ConversionUtils.java' --- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ConversionUtils.java 2009-11-02 15:55:44 +0000 +++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ConversionUtils.java 2009-11-09 13:59:20 +0000 @@ -106,4 +106,24 @@ return Integer.parseInt( string ); } + + + /** + * Test whether the object is an array or a Collection. + * + * @param value the object. + * @return true if the object is an array or a Collection, false otherwise. + */ + public static boolean isCollection( Object value ) + { + if ( value != null ) + { + if ( value.getClass().isArray() || value instanceof Collection ) + { + return true; + } + } + + return false; + } }