| Summary: | XPATH engine generates error prone JAVA code | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Eric Labadie <labadie> |
| Component: | TPTP | Assignee: | Harm Sluiman <sluiman> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | major | ||
| Priority: | P1 | CC: | jkubasta, prafulr, sluiman, zung |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | closed460 | ||
| Bug Depends on: | 162562 | ||
| Bug Blocks: | |||
This is required for TPTP 4.2.1 I think the point is that we need error handling and in this case exception handling. I don't think the proposed code would performvery well. Note version is where the defect is found and target is where you request a fix. Here is another example:
fastXpath code generation does not add null pointer check in the generated code for complex type element in CBE which may be optional in the event object.
For example.
if ( (( obj.getMsgDataElement().getMsgId() .equals( "SSL0600S") ) || ( ( obj.getMsg().indexOf("SSL0600S") > -1 ) )) )
The correct java code would be
if ( (( obj.getMsgDataElement()!= null && obj.getMsgDataElement().getMsgId() != null && obj.getMsgDataElement().getMsgId() .equals( "SSL0600S") ) || ( ( obj.getMsg().indexOf("SSL0600S") > -1 ) )) )
Updating the version field to the right value... We have done performance measurements using a try/catch block around the generated code and the performance was worst than using the suggested code. See Praful for the measurements. Originator agree to defer to 4.3 release. Lowering the severity from blocking to major. mass update: retarget from 4.3 to 4.4. Cannot be contained in 4.3 due to resource limtation. If 162562 will be fixed this could be fixed also, if not I will return it as WONTFIX. As Harm mentioned, we need to investigate which method is better and probably let the user control this code generation behavior. Praful please attach the code snippets that you tested the performance on, also the measurements. defer, since consuming product has a work around This defect has apparently been acceptable for over 1 year and there are no longer resources in the project to work on this. Reopne when resources can be commited As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this enhancement/defect has been resolved and unverified for more than 1 year and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open. As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this enhancement/defect has been resolved and unverified for more than 1 year and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open. |
Use the XPATH engine function to generate JAVA code from an XPATH expression. The generated code doesn't check if the object exists before calling a method on the object. This code is throwing JAVA exceptions. We should change the generated code from: obj.getA().getB().getC()....equals("value") to obj!=null && obj.getA()!=null && obj.getA().getB()!=null && obj.getA().getB().getC()!=null ... equals("value")