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 49755] New: NPE on tempfile with createfile="true"
Date Mon, 16 Aug 2010 15:23:37 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=49755

           Summary: NPE on tempfile with createfile="true"
           Product: Ant
           Version: 1.8.1
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: major
          Priority: P2
         Component: Core tasks
        AssignedTo: notifications@ant.apache.org
        ReportedBy: info_issues.apache.org@nmhq.net


The following

    <tempfile property="tempfile" createfile="true"/>

results in this NPE:

    java.lang.NullPointerException
        at java.io.File.createTempFile(File.java:1780)
        at
org.apache.tools.ant.util.FileUtils.createTempFile(FileUtils.java:888)
        at org.apache.tools.ant.taskdefs.TempFile.execute(TempFile.java:158)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        [...]

Echoing the generated tempfile name via

    <tempfile property="tempfile"/>
    <echo message="${tempfile}"/>

outputs

     [echo] <current dir>\null1584622828

which suggests that the directory reference is null.

${java.io.tmpdir} is set to C:\DOCUME~1\<username>\LOCALS~1\Temp\ as expected,
so I'm not sure what the problem is.

-- 
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