Issue #1164: NPE using AND TRUE in WHERE clause

Type: Bug ReoprtVersion: 2.5.0Priority: NormalStatus: FixedReplies: 1

The following (dynamically generated) query causes an NPE:

SELECT e FROM Event e WHERE e.account=:account AND TRUE

When I change it to a trivial term which evaluates to true, it works fine:

SELECT e FROM Event e WHERE e.account=:account AND 1=1

Here is the stack trace:

om.objectdb.o.InternalException: Unexpected internal exception
[ObjectDB 2.5.0_06] Unexpected exception (Error 990)
  Generated by Java HotSpot(TM) 64-Bit Server VM 1.6.0_32 (on Windows 7 6.1).
Please report this error on
com.objectdb.o.InternalException: java.lang.NullPointerException: null
at com.objectdb.o.BIT.l(
at com.objectdb.o.WSP.f(
at com.objectdb.o.WVP.m(
at com.objectdb.o.WVP.n(
at com.objectdb.o.WVP.m(
at com.objectdb.o.WVP.j(
at com.objectdb.o.WHP.j(
at com.objectdb.o.WHP.g(
at com.objectdb.o.WHP.g(
at com.objectdb.o.QPN.d(
at com.objectdb.o.QRC.w(
at com.objectdb.o.QRM.U6(
at com.objectdb.o.MST.U6(
at com.objectdb.o.WRA.U6(
at com.objectdb.o.WSM.U6(
at com.objectdb.o.STC.r(
at com.objectdb.o.SHN.aj(
at com.objectdb.o.SHN.K(

Thank you for this report. Build 2.5.1_02 fixes this issue.

ObjectDB Support