DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10360>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10360

NullPointerException in JspC.isCompileNeeded

           Summary: NullPointerException in JspC.isCompileNeeded
           Product: Ant
           Version: 1.5Beta3
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Optional Tasks
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Here is a stack trace:

java.lang.NullPointerException
        at 
org.apache.tools.ant.taskdefs.optional.jsp.JspC.isCompileNeeded(JspC.java:520)
        at 
org.apache.tools.ant.taskdefs.optional.jsp.JspC.scanDir(JspC.java:494)
        at 
org.apache.tools.ant.taskdefs.optional.jsp.JspC.execute(JspC.java:409)
        at org.apache.tools.ant.Task.perform(Task.java:317)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:334)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
        at org.apache.tools.ant.Main.runBuild(Main.java:606)
        at org.apache.tools.ant.Main.start(Main.java:195)
        at org.apache.tools.ant.Main.main(Main.java:234)

Reason why this is happening:

scanDir passes a null argument to isCompileNeeded if it picks a file with 
an extension other than ".jsp". isCompileNeeded does not verify against 
null and calls exists() using the null reference. Either isCompileNeeded 
should check this or scanDir should not be invoking isCompileNeeded for 
non-JSP files at all.

I ran into this bug while trying to use jspc with the nested webapp 
element, i.e. not specifiying the pattern to match .jsp files explicitly.

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to