Error in displaying unspent gold value of value greater than 999

Description

This may be a code bug.

When a character's unspent gold is greater than 999 (or less than -999), an error message is displayed in the console, and no value is printed on the preview character sheet. My guess is that it's being confused by the comma. I haven't checked this on other OSes.

Here is the error message:
06:55:52.23 SEVERE Character-Sheet-Refresher-Thread ExportHandler:2075 Error replacing GOLD.TRUNC
java.lang.NumberFormatException: For input string: "1,000"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1241)
at java.lang.Float.valueOf(Float.java:417)
at pcgen.io.ExportHandler.mathMode(ExportHandler.java:1253)
at pcgen.io.ExportHandler.replaceToken(ExportHandler.java:2026)
at pcgen.io.ExportHandler.replaceLine(ExportHandler.java:1909)
at pcgen.io.ExportHandler.processLoop(ExportHandler.java:1170)
at pcgen.io.ExportHandler.loopFOR(ExportHandler.java:1102)
at pcgen.io.ExportHandler.write(ExportHandler.java:257)
at pcgen.gui2.facade.CharacterFacadeImpl.export(CharacterFacadeImpl.java:2677)
at pcgen.gui2.csheet.CharacterSheetPanel$DocumentConstructor.call(CharacterSheetPanel.java:232)
at pcgen.gui2.csheet.CharacterSheetPanel$DocumentConstructor.call(CharacterSheetPanel.java:225)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

Environment

None

Activity

Show:
Douglas Limmer
June 1, 2014, 8:50 AM

I believe I am using the 6.03.00 Alpha that is linked to on the Get Pcgen section of the PCGen webpage. I'll try an autobuild.

I don't know if my system has a locale, and I'm not sure how to set it. I'm using US numbering (commas for thousands separators), if that's what you mean.

Douglas Limmer
June 1, 2014, 8:58 AM

I just downloaded the most recent autobuild, and the same error is occurring.

Stefan Radermacher
June 1, 2014, 8:59 AM

Thanks, I will check it out.

Stefan Radermacher
June 1, 2014, 10:43 AM

Fixed as of revision 23995.

Please try with a new autobuild when available.

Douglas Limmer
June 4, 2014, 5:05 PM

I tried an autobuild (downloaded 8:00 pm Eastern Time, USA) and it worked! Thanks!

Fixed

Assignee

Stefan Radermacher

Reporter

Douglas Limmer

Labels

None

Theme

None

Epic/Theme

None

Pending User Input

None

Components

Fix versions

Affects versions

Priority

Minor
Configure