Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 320525 - JSP discoverer : use case with NullPointerException
Summary: JSP discoverer : use case with NullPointerException
Status: CLOSED FIXED
Alias: None
Product: MoDisco
Classification: Modeling
Component: Technologies (show other bugs)
Version: 0.9.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 0.9.0 M1   Edit
Assignee: Fabien Giquel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-21 11:55 EDT by Fabien Giquel CLA
Modified: 2010-10-18 08:34 EDT (History)
3 users (show)

See Also:
fabien.giquel: indigo+


Attachments
The JSP file in error (177 bytes, application/octet-stream)
2010-07-21 11:55 EDT, Fabien Giquel CLA
no flags Details
Patch to fix the NullPointer in JavaScript Parsing (15.31 KB, patch)
2010-07-23 06:18 EDT, Nicolas Guyomar CLA
fabien.giquel: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fabien Giquel CLA 2010-07-21 11:55:16 EDT
Created attachment 174873 [details]
The JSP file in error

The attached JSP fragment causes a NullPointerException (caused by a ArrayIndexOutOfBounds) when using the JSP discoverer
Comment 1 Nicolas Guyomar CLA 2010-07-23 06:17:27 EDT
Hi Fabien,

This bug was due to a digit (1000) sticked to the ' %> ' jsp closing tag, resulting in being interpreted as a percentage ' 1000% '

The closing tag was never encountered, that's why the parser reached the end of file still looking for it.

The attached patch detects the end of file while parsing a JavaScript element, and  log an MoDisco Info message to inform that the end of file as been reached

1. I, Nicolas Guyomar, and others contributors listed in this bug, authored
100% of the content
2. I have the rights to donate the content to Eclipse under the EPL
3. I have already provided the filled Employer Consent Forms to the Foundation


Regards

Nicolas
Comment 2 Nicolas Guyomar CLA 2010-07-23 06:18:23 EDT
Created attachment 175048 [details]
Patch to fix the NullPointer in JavaScript Parsing
Comment 3 Fabien Giquel CLA 2010-07-23 06:32:22 EDT
Thank you Nicolas for your contribution.
Your contribution is less than 250 lines.

It has been committed into SVN.

Fabien.
Comment 4 Hugo Bruneliere CLA 2010-10-05 04:23:58 EDT
The patch has been successfully applied.