| Summary: | JavaFieldJDOMAdapter causing StringIndexOutOfBoundsException | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP Java EE Tools | Reporter: | Carl Anderson <ccc> | ||||
| Component: | jst.jem | Assignee: | Carl Anderson <ccc> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Chuck Bridgham <cbridgha> | ||||
| Severity: | major | ||||||
| Priority: | P3 | Flags: | cbridgha:
review+
|
||||
| Version: | 1.5.5 | ||||||
| Target Milestone: | 1.5.5 P | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 247732 | ||||||
| Attachments: |
|
||||||
|
Description
Carl Anderson
Created attachment 112804 [details]
Check to make sure the initializer is for this variable
The code correctly identifies that the end of the variable declaration is the comma, and correctly locates the equals sign, but does not check to make sure that the equals sign is before the end of the variable declaration. Thus, when substring is called, the first value is larger than the second value, and thus the StringIndexOutOfBoundsException occurs.
Also, please note that this initialization is valid syntax, and that the initialization is only for the variable next to the equals sign (and not the entire list of variables).
approve - simple fix This change was committed to R1_5_5_patches on 9/24. |