Index: trunk/src/com/kitfox/svg/SVGLoader.java
===================================================================
--- trunk/src/com/kitfox/svg/SVGLoader.java	(revision 8084)
+++ trunk/src/com/kitfox/svg/SVGLoader.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
@@ -38,11 +38,14 @@
 
 
-import java.util.*;
-import java.net.*;
-import org.xml.sax.*;
-import org.xml.sax.helpers.DefaultHandler;
-
+import java.net.URI;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
 import java.util.logging.Level;
 import java.util.logging.Logger;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
 
 /**
@@ -52,9 +55,9 @@
 public class SVGLoader extends DefaultHandler
 {
-    final HashMap nodeClasses = new HashMap();
+    final HashMap<String, Class<?>> nodeClasses = new HashMap<>();
     //final HashMap attribClasses = new HashMap();
-    final LinkedList buildStack = new LinkedList();
-
-    final HashSet ignoreClasses = new HashSet();
+    final LinkedList<SVGElement> buildStack = new LinkedList<>();
+
+    final HashSet<String> ignoreClasses = new HashSet<>();
 
     final SVGLoaderHelper helper;
@@ -73,5 +76,5 @@
 
     final boolean verbose;
-    
+
     /** Creates a new instance of SVGLoader */
     public SVGLoader(URI xmlBase, SVGUniverse universe)
@@ -79,9 +82,9 @@
         this(xmlBase, universe, false);
     }
-    
+
     public SVGLoader(URI xmlBase, SVGUniverse universe, boolean verbose)
     {
         this.verbose = verbose;
-        
+
         diagram = new SVGDiagram(xmlBase, universe);
 
@@ -138,5 +141,6 @@
         return sb.toString();
     }
-    
+
+    @Override
     public void startDocument() throws SAXException
     {
@@ -146,4 +150,5 @@
     }
 
+    @Override
     public void endDocument() throws SAXException
     {
@@ -151,4 +156,5 @@
     }
 
+    @Override
     public void startElement(String namespaceURI, String sName, String qName, Attributes attrs) throws SAXException
     {
@@ -158,5 +164,5 @@
         }
         indent++;
-        
+
         if (skipNonSVGTagDepth != 0 || (!namespaceURI.equals("") && !namespaceURI.equals(SVGElement.SVG_NS)))
         {
@@ -164,5 +170,5 @@
             return;
         }
-        
+
         sName = sName.toLowerCase();
 
@@ -187,9 +193,9 @@
 
         try {
-            Class cls = (Class)obj;
+            Class<?> cls = (Class<?>)obj;
             SVGElement svgEle = (SVGElement)cls.newInstance();
 
             SVGElement parent = null;
-            if (buildStack.size() != 0) parent = (SVGElement)buildStack.getLast();
+            if (buildStack.size() != 0) parent = buildStack.getLast();
             svgEle.loaderStartElement(helper, attrs, parent);
 
@@ -198,5 +204,5 @@
         catch (Exception e)
         {
-            Logger.getLogger(SVGConst.SVG_LOGGER).log(Level.WARNING, 
+            Logger.getLogger(SVGConst.SVG_LOGGER).log(Level.WARNING,
                 "Could not load", e);
             throw new SAXException(e);
@@ -205,4 +211,5 @@
     }
 
+    @Override
     public void endElement(String namespaceURI, String sName, String qName)
         throws SAXException
@@ -213,5 +220,5 @@
             System.err.println(printIndent(indent, " ") + "Ending parse of tag " + sName+ ": " + namespaceURI);
         }
-        
+
         if (skipNonSVGTagDepth != 0)
         {
@@ -219,5 +226,5 @@
             return;
         }
-        
+
         sName = sName.toLowerCase();
 
@@ -230,5 +237,5 @@
 
         try {
-            SVGElement svgEle = (SVGElement)buildStack.removeLast();
+            SVGElement svgEle = buildStack.removeLast();
 
             svgEle.loaderEndElement(helper);
@@ -237,5 +244,5 @@
             if (buildStack.size() != 0)
             {
-                parent = (SVGElement)buildStack.getLast();
+                parent = buildStack.getLast();
             }
             //else loadRoot = (SVGElement)svgEle;
@@ -253,5 +260,5 @@
         catch (Exception e)
         {
-            Logger.getLogger(SVGConst.SVG_LOGGER).log(Level.WARNING, 
+            Logger.getLogger(SVGConst.SVG_LOGGER).log(Level.WARNING,
                 "Could not parse", e);
             throw new SAXException(e);
@@ -259,4 +266,5 @@
     }
 
+    @Override
     public void characters(char buf[], int offset, int len)
         throws SAXException
@@ -269,5 +277,5 @@
         if (buildStack.size() != 0)
         {
-            SVGElement parent = (SVGElement)buildStack.getLast();
+            SVGElement parent = buildStack.getLast();
             String s = new String(buf, offset, len);
             parent.loaderAddText(helper, s);
@@ -275,4 +283,5 @@
     }
 
+    @Override
     public void processingInstruction(String target, String data)
         throws SAXException
@@ -280,5 +289,5 @@
         //Check for external style sheet
     }
-    
+
 //    public SVGElement getLoadRoot() { return loadRoot; }
     public SVGDiagram getLoadedDiagram() { return diagram; }
