I'm getting a NullPointerException while I'm trying to update a properties file. My
best guess is that, somehow, the 'old value' is turning out to be null, though my
echos indicate that it isn't. Below is the snipper from my build.xml, followed by the
output with th exception:
<target name="_increment-build-number">
<echo>Increment build number...</echo>
<echo message="version.a=${version.a}"/>
<echo message="version.b=${version.b}"/>
<echo message="version.c=${version.c}"/>
<echo message="version.d=${version.d}"/>
<echo message="version.build=${version.build}"/>
<propertyfile file="${version.file}" comment="Version information">
<entry key="version.build" default="00000" type="int"
operation="+" pattern="00000"/>
</propertyfile>
</target>
_increment-build-number:
[echo] Increment build number...
[echo] version.a=1
[echo] version.b=0
[echo] version.c=0
[echo] version.d=0
[echo] version.build=0
[propertyfile] Updating property file: C:\Projects\Divine\WebSelfHelp\core\CIM
Components\config\build\com.divine.cim.config.version
[propertyfile] java.lang.NullPointerException
[propertyfile] at java.text.DecimalFormat.parse(DecimalFormat.java:792)
[propertyfile] at java.text.NumberFormat.parse(NumberFormat.java:277)
[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)
Any ideas?
Regards,
Brian.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>