Index: trunk/src/com/kitfox/svg/xml/XMLParseUtil.java
===================================================================
--- trunk/src/com/kitfox/svg/xml/XMLParseUtil.java	(revision 10866)
+++ trunk/src/com/kitfox/svg/xml/XMLParseUtil.java	(revision 11525)
@@ -4,14 +4,14 @@
  * All rights reserved.
  *
- * Redistribution and use in source and binary forms, with or 
+ * Redistribution and use in source and binary forms, with or
  * without modification, are permitted provided that the following
  * conditions are met:
  *
- *   - Redistributions of source code must retain the above 
+ *   - Redistributions of source code must retain the above
  *     copyright notice, this list of conditions and the following
  *     disclaimer.
  *   - Redistributions in binary form must reproduce the above
  *     copyright notice, this list of conditions and the following
- *     disclaimer in the documentation and/or other materials 
+ *     disclaimer in the documentation and/or other materials
  *     provided with the distribution.
  *
@@ -27,6 +27,6 @@
  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE. 
- * 
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
  * Mark McKay can be contacted at mark@kitfox.com.  Salamander and other
  * projects can be found at http://www.kitfox.com
@@ -37,10 +37,14 @@
 package com.kitfox.svg.xml;
 
-import com.kitfox.svg.SVGConst;
-import java.awt.*;
-import java.util.*;
-import java.util.regex.*;
+import java.awt.Toolkit;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
 import java.util.logging.Level;
 import java.util.logging.Logger;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import com.kitfox.svg.SVGConst;
 
 /**
@@ -63,5 +67,5 @@
         matchWs.reset(list);
 
-        LinkedList matchList = new LinkedList();
+        LinkedList<String> matchList = new LinkedList<>();
         while (matchWs.find())
         {
@@ -70,19 +74,9 @@
 
         String[] retArr = new String[matchList.size()];
-        return (String[])matchList.toArray(retArr);
+        return matchList.toArray(retArr);
     }
 
     public static double parseDouble(String val)
     {
-        /*
-        if (val == null) return 0.0;
-
-        double retVal = 0.0;
-        try
-        { retVal = Double.parseDouble(val); }
-        catch (Exception e)
-        {}
-        return retVal;
-         */
         return findDouble(val);
     }
@@ -103,5 +97,5 @@
         catch (StringIndexOutOfBoundsException e)
         {
-            Logger.getLogger(SVGConst.SVG_LOGGER).log(Level.WARNING, 
+            Logger.getLogger(SVGConst.SVG_LOGGER).log(Level.WARNING,
                 "XMLParseUtil: regex parse problem: '" + val + "'", e);
         }
@@ -112,10 +106,10 @@
         double retVal = 0;
         try
-        { 
-            retVal = Double.parseDouble(val); 
-            
+        {
+            retVal = Double.parseDouble(val);
+
             float pixPerInch;
             try {
-                pixPerInch = (float)Toolkit.getDefaultToolkit().getScreenResolution();
+                pixPerInch = Toolkit.getDefaultToolkit().getScreenResolution();
             }
             catch (NoClassDefFoundError err)
@@ -126,5 +120,5 @@
             final float inchesPerCm = .3936f;
             final String units = fpMatch.group(6);
-            
+
             if ("%".equals(units)) retVal /= 100;
             else if ("in".equals(units))
@@ -166,5 +160,5 @@
         fpMatch.reset(list);
 
-        LinkedList doubList = new LinkedList();
+        LinkedList<Double> doubList = new LinkedList<>();
         while (fpMatch.find())
         {
@@ -174,9 +168,9 @@
 
         double[] retArr = new double[doubList.size()];
-        Iterator it = doubList.iterator();
+        Iterator<Double> it = doubList.iterator();
         int idx = 0;
         while (it.hasNext())
         {
-            retArr[idx++] = ((Double)it.next()).doubleValue();
+            retArr[idx++] = it.next().doubleValue();
         }
 
@@ -216,5 +210,5 @@
         fpMatch.reset(list);
 
-        LinkedList floatList = new LinkedList();
+        LinkedList<Float> floatList = new LinkedList<>();
         while (fpMatch.find())
         {
@@ -224,9 +218,9 @@
 
         float[] retArr = new float[floatList.size()];
-        Iterator it = floatList.iterator();
+        Iterator<Float> it = floatList.iterator();
         int idx = 0;
         while (it.hasNext())
         {
-            retArr[idx++] = ((Float)it.next()).floatValue();
+            retArr[idx++] = it.next().floatValue();
         }
 
@@ -261,5 +255,5 @@
         intMatch.reset(list);
 
-        LinkedList intList = new LinkedList();
+        LinkedList<Integer> intList = new LinkedList<>();
         while (intMatch.find())
         {
@@ -269,9 +263,9 @@
 
         int[] retArr = new int[intList.size()];
-        Iterator it = intList.iterator();
+        Iterator<Integer> it = intList.iterator();
         int idx = 0;
         while (it.hasNext())
         {
-            retArr[idx++] = ((Integer)it.next()).intValue();
+            retArr[idx++] = it.next().intValue();
         }
 
@@ -307,5 +301,5 @@
      * @param map - A map to which these styles will be added
      */
-    public static HashMap parseStyle(String styleString, HashMap map) {
+    public static HashMap<String, StyleAttribute> parseStyle(String styleString, HashMap<String, StyleAttribute> map) {
         final Pattern patSemi = Pattern.compile(";");
 
