diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/expressions/TestJPQLScalarExpressions.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/expressions/TestJPQLScalarExpressions.java index 177307a82..8fa5f966e 100644 --- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/expressions/TestJPQLScalarExpressions.java +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jpql/expressions/TestJPQLScalarExpressions.java @@ -83,7 +83,11 @@ public class TestJPQLScalarExpressions extends AbstractTestCase { query.setFirstResult(1); query.setMaxResults(4); List rs = query.getResultList(); - assertTrue((Long)((Object[]) rs.get(0))[1] > 0); + Object val = ((Object[]) rs.get(0))[1]; + if (val instanceof Integer) + assertTrue((Integer) val > 0); + else if (val instanceof Long) + assertTrue((Long) val > 0); } }