Bug 42435 - Insufficient error report from Jasper
Summary: Insufficient error report from Jasper
Status: RESOLVED DUPLICATE of bug 42314
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Jasper (show other bugs)
Version: 5.0.23
Hardware: Other other
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-16 07:02 UTC by Jochen Wiedmann
Modified: 2007-05-16 15:38 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jochen Wiedmann 2007-05-16 07:02:57 UTC
The method DefaultErrorHandler.javacError(JavacErrorDetail[]) contains the
following code:

    for (int i=0; i < details.length; i++) {
        if (details[i].getJspBeginLineNumber() >= 0) {
             ...
        }
    }

Basically, this means, that error details are skipped, if the line number is -1.
Unfortunately, there are cases, when the compiler reports events with -1.

I propose, to change this code to look like in jasper 6:

        for (int i=0; i < details.length; i++) {
            if (details[i].getJspBeginLineNumber() >= 0) {
                args = new Object[] {
                        new Integer(details[i].getJspBeginLineNumber()), 
                        details[i].getJspFileName() };
                buf.append(Localizer.getMessage("jsp.error.single.line.number",
                        args));
                buf.append("\n"); 
            }
            
            buf.append(
                    Localizer.getMessage("jsp.error.corresponding.servlet"));
            buf.append(details[i].getErrorMessage());
            buf.append("\n\n");
        }
Comment 1 Mark Thomas 2007-05-16 15:38:09 UTC

*** This bug has been marked as a duplicate of 42314 ***