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 8780] New: - type "int" in propertyfile task throws NullPointerException
Date Fri, 03 May 2002 16:39:29 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=8780>.
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=8780

type "int" in propertyfile task throws NullPointerException

           Summary: type "int" in propertyfile task throws
                    NullPointerException
           Product: Ant
           Version: 1.5Beta1
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Optional Tasks
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: nolan.ring@sun.com
                CC: nolan.ring@sun.com


The following xml code throws a NullPointerException:
  
<propertyfile file="buildversion.properties" comment="Date, time and build
number of most recent build"> 
<entry key="buildnum" type="int" default="0000" operation="+" pattern="0000" /> 
<entry key="builddate" type="date" default="now" pattern="yyyyMMdda" /> 
<entry key="buildlabel" value="${builddate}_${buildnum}" /> 
</propertyfile> 
<property file="buildversion.properties" /> 
<echo message="Buildlabel is ${buildlabel}" /> 
<echo message="Builddate is ${builddate}" /> 
<echo message="Buildnum is ${buildnum}" /> 

Output:

[propertyfile] Updating property file: /webapp/neo-gate/buildversion.properties
[propertyfile] java.lang.NullPointerException
[propertyfile] 	at java.text.DecimalFormat.parse(DecimalFormat.java:797)
[propertyfile] 	at java.text.NumberFormat.parse(NumberFormat.java:282)
[propertyfile] 	at 
org.apache.tools.ant.taskdefs.optional.PropertyFile$Entry.executeInteger
(PropertyFile.java:441)
[propertyfile] 	at 
org.apache.tools.ant.taskdefs.optional.PropertyFile$Entry.executeOn
(PropertyFile.java:344)
[propertyfile] 	at 
org.apache.tools.ant.taskdefs.optional.PropertyFile.executeOperation
(PropertyFile.java:198)
[propertyfile] 	at org.apache.tools.ant.taskdefs.optional.PropertyFile.execute
(PropertyFile.java:185)
[propertyfile] 	at org.apache.tools.ant.Task.perform(Task.java:313)
[propertyfile] 	at org.apache.tools.ant.Target.execute(Target.java:309)
[propertyfile] 	at org.apache.tools.ant.Target.performTasks(Target.java:334)
[propertyfile] 	at org.apache.tools.ant.Project.executeTarget(Project.java:1216)
[propertyfile] 	at org.apache.tools.ant.Project.executeTargets
(Project.java:1160)
[propertyfile] 	at org.apache.tools.ant.Main.runBuild(Main.java:605)
[propertyfile] 	at org.apache.tools.ant.Main.start(Main.java:195)
[propertyfile] 	at org.apache.tools.ant.Main.main(Main.java:234)
     [echo] Buildlabel is 20020503AM_
     [echo] Builddate is 20020503AM
     [echo] Buildnum is

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