Project

General

Profile

Bug #2096

no NPE generated in certain cases

Added by Constantin Asofiei about 11 years ago. Updated about 11 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:

0%

billable:
No
vendor_id:
GCD
case_num:
version:

History

#1 Updated by Constantin Asofiei about 11 years ago

There is a weird behavior in TRPL. The following code doesn't generate a NPE (when it should have NPEd):

   <rule-set>
       <variable name="ch" type="java.lang.String"/>
       <init-rules>
           <rule>ch = null</rule>
           <rule>ch.equals("bar") or ch.equals("foo") /* no NPE is generated here */
              <action>printfln("aaa")</action>
           </rule>
       </init-rules>
   </rule-set>

while the next one does:
   <rule-set>
       <variable name="ch" type="java.lang.String"/>
       <init-rules>
           <rule>ch = null</rule>
           <rule>ch.equals("bar") /* NPE is generated here */
              <action>printfln("aaa")</action>
           </rule>
       </init-rules>
   </rule-set>

Also available in: Atom PDF