Bug #6810
NPE in PreselectQuery.assembleFromClause
Start date:
Due date:
% Done:
100%
billable:
No
vendor_id:
GCD
case_num:
History
#2 Updated by Constantin Asofiei over 1 year ago
- % Done changed from 0 to 100
- Priority changed from Normal to High
- Assignee set to Constantin Asofiei
- Status changed from New to Review
This test:
define temp-table tt1 no-undo field f1 as character initial ? field f2 as character initial ? field f3 as character initial ? index ix4 is primary unique f1 f2. define temp-table tt2 no-undo field f1 as character initial ? field f2 as character initial ? field f3 as character initial ? field f5 as character initial ? field f6 as character initial ? field f7 as character initial ? index ix4 is primary unique f1 f2 f5 f6. create tt1. tt1.f1 = "a". tt1.f2 = "b". tt1.f3 = "c". create tt2. tt2.f1 = "a". tt2.f2 = "b". tt2.f3 = "f3". tt2.f5 = "f5". tt2.f6 = "f6". tt2.f7 = "f7". for first tt1, each tt2 where tt2.f1 = tt1.f1 and tt2.f2 = tt1.f2: message tt1.f1 tt1.f2 tt2.f1 tt2.f2 tt2.f3 tt2.f5 tt2.f6 tt2.f7. end.
gets this NPE:
Caused by: java.lang.NullPointerException at com.goldencode.p2j.persist.PreselectQuery.assembleFromClause(PreselectQuery.java:4572) at com.goldencode.p2j.persist.PreselectQuery.lambda$0(PreselectQuery.java:6453) at com.goldencode.p2j.jmx.NanoTimer.timer(NanoTimer.java:126) at com.goldencode.p2j.persist.PreselectQuery.assembleHQL(PreselectQuery.java:6458) at com.goldencode.p2j.persist.PreselectQuery.execute(PreselectQuery.java:5120) at com.goldencode.p2j.persist.AdaptiveQuery.execute(AdaptiveQuery.java:2859) at com.goldencode.p2j.persist.PreselectQuery.first(PreselectQuery.java:2447) at com.goldencode.p2j.persist.AdaptiveQuery.first(AdaptiveQuery.java:1232) at com.goldencode.p2j.persist.CompoundQuery.processComponent(CompoundQuery.java:3102) at com.goldencode.p2j.persist.CompoundQuery.retrieveImpl(CompoundQuery.java:2711) at com.goldencode.p2j.persist.CompoundQuery.retrieve(CompoundQuery.java:2122) at com.goldencode.p2j.persist.CompoundQuery.retrieve(CompoundQuery.java:2007) at com.goldencode.p2j.persist.CompoundQuery.iterate(CompoundQuery.java:797) at com.goldencode.testcases.Tjoin.lambda$2(Tjoin.java:51)
The fix is in 6129a/14420