java-tools / fixedformat4j

Automatically exported from code.google.com/p/fixedformat4j
0 stars 0 forks source link

Loading and exporting records with numeric fields with empty strings to read is not consistent #29

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Load a record with a numeric field and an empty string to read.
2. Export the same record
3. Compare the two strings

What is the expected output? What do you see instead?

Since there is no data to be read, I would expect the numeric variables to be 
null and not zero. When I export the same records, I find zeros where there was 
none in the initial data. There is no way to differenciate no data from zeros.

What version of the product are you using? On what Java version?
fixedformat4j 1.3.4, java 1.6

Please provide any additional information below.

The problem comes from the remove functions in the sign enum.

      if (StringUtils.isEmpty(result)) {
        result = "0";
      }

Original issue reported on code.google.com by jeanphil...@gmail.com on 8 Aug 2011 at 6:00