ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 10360] New: - NullPointerException in JspC.isCompileNeeded
Date Sun, 30 Jun 2002 16:13:43 GMT
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: ant-dev@jakarta.apache.org
        ReportedBy: jpl@remotejava.com


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:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message