xiaomaguoguo / svg-android

Automatically exported from code.google.com/p/svg-android
1 stars 0 forks source link

java.lang.NumberFormatException #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Parse the attached file.

What is the expected output? What do you see instead?
Instead of SVG object I got the following exception:
java.lang.NumberFormatException: 5.000000e
at 
org.apache.harmony.luni.util.FloatingPointParser.initialParse(FloatingPointParse
r.java:116)
at 
org.apache.harmony.luni.util.FloatingPointParser.parseFloat(FloatingPointParser.
java:310)
at java.lang.Float.parseFloat(Float.java:327)
at com.larvalabs.svgandroid.SVGParser.parseNumbers(Unknown Source)
at com.larvalabs.svgandroid.SVGParser.parseTransform(Unknown Source)
at com.larvalabs.svgandroid.SVGParser.access$600(Unknown Source)
at com.larvalabs.svgandroid.SVGParser$SVGHandler.doGradient(Unknown Source)
at com.larvalabs.svgandroid.SVGParser$SVGHandler.startElement(Unknown Source)
at org.apache.harmony.xml.ExpatParser.startElement(ExpatParser.java:145)
at org.apache.harmony.xml.ExpatParser.append(Native Method)
at org.apache.harmony.xml.ExpatParser.parseFragment(ExpatParser.java:506)
at org.apache.harmony.xml.ExpatParser.parseDocument(ExpatParser.java:467)
at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:329)
at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:286)
... 15 more

What version of the product are you using? On what operating system?
1.1

Please provide any additional information below.

Original issue reported on code.google.com by ivan.tru...@gmail.com on 18 May 2011 at 8:29

Attachments:

GoogleCodeExporter commented 9 years ago
I have the same issue. Version used is 1.1, file was created with Inkscape.

Original comment by gerald.g...@gmail.com on 30 Sep 2011 at 5:32

Attachments:

GoogleCodeExporter commented 9 years ago
yeah anything e-7 gets cut off because of the case '-'.  I just removed that 
case.

Original comment by snoop...@gmail.com on 5 Jan 2012 at 6:42

GoogleCodeExporter commented 9 years ago
Thanks for clearing that up. I just ran into the same problem.

The case '-' is in SVGParser.java at line 249.

Original comment by snoe...@gmail.com on 21 Feb 2012 at 2:53