summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/com/kitfox/svg/xml/XMLParseUtil.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/com/kitfox/svg/xml/XMLParseUtil.java b/src/main/java/com/kitfox/svg/xml/XMLParseUtil.java
index 2bc0c54..3cf1a78 100644
--- a/src/main/java/com/kitfox/svg/xml/XMLParseUtil.java
+++ b/src/main/java/com/kitfox/svg/xml/XMLParseUtil.java
@@ -252,8 +252,9 @@ public class XMLParseUtil
float retVal = 0f;
try
{
- retVal = Float.parseFloat(val);
- if (fpMatch.group(6).equals("%")) retVal /= 100;
+ retVal = Float.parseFloat(val);
+ String units = fpMatch.group(6);
+ if ("%".equals(units)) retVal /= 100;
}
catch (Exception e)
{}