ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 51035] New: hasmethod NullPointerException @ isMethodFound(HasMethod.java:180)
Date Wed, 06 Apr 2011 20:00:10 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=51035

           Summary: hasmethod NullPointerException @
                    isMethodFound(HasMethod.java:180)
           Product: Ant
           Version: 1.8.2
          Platform: Macintosh
        OS/Version: Mac OS X 10.5
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
        AssignedTo: notifications@ant.apache.org
        ReportedBy: kurt@intricatesoftware.com


The following condition causes ant to raise a null pointer exception:

    <condition property="boot.java.provides.latest.jdk">
        <and>
            <available
                ignoresystemclasses="true"
                classpath="${boot.java.home}/jre/lib/rt.jar"
classname="java.nio.file.Path"/>
            <hasmethod
                ignoresystemclasses="true"
                classpath="${boot.java.home}/jre/lib/rt.jar"
                classname="java.nio.file.Path" method="getFileName"/>
        </and>
    </condition>

BUILD FAILED
/Users/truk/jdk/bsd-port/langtools/make/build.xml:188:
java.lang.NullPointerException
        at
org.apache.tools.ant.taskdefs.condition.HasMethod.isMethodFound(HasMethod.java:180)
        at
org.apache.tools.ant.taskdefs.condition.HasMethod.eval(HasMethod.java:154)
        at org.apache.tools.ant.taskdefs.condition.And.eval(And.java:42)
        at
org.apache.tools.ant.taskdefs.ConditionTask.execute(ConditionTask.java:120)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:613)
        at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:154)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:613)
        at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:390)
        at
org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:180)
        at
org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:82)
        at org.apache.tools.ant.Main.runBuild(Main.java:793)
        at org.apache.tools.ant.Main.startAnt(Main.java:217)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

removing ignoresystemclasses="true" avoids the NPE but isn't the behavior I
need.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Mime
View raw message