changeset 35:4405f31bbc30

CodeCleanUP gnv/trunk@171 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Fri, 02 Oct 2009 08:49:18 +0000
parents 25fdec8b4c69
children ad381cc47217
files gnv/Changelog gnv/src/main/java/de/intevation/gnv/action/DoOutputAction.java gnv/src/main/java/de/intevation/gnv/action/SelectArtifactFactoryAction.java gnv/src/main/java/de/intevation/gnv/action/sessionmodel/SessionModelFactory.java gnv/src/main/java/de/intevation/gnv/artifactdatabase/client/ArtifactDatabaseClient.java gnv/src/main/java/de/intevation/gnv/artifactdatabase/client/DefaultArtifactDatabaseClient.java gnv/src/main/java/de/intevation/gnv/artifactdatabase/objects/Artifact.java gnv/src/main/java/de/intevation/gnv/servlet/GNVActionServlet.java gnv/src/main/java/de/intevation/gnv/util/XMLUtils.java gnv/src/main/java/de/intevation/gnv/util/XSLTransformer.java gnv/src/test/java/de/intevation/gnv/artifactdatabase/client/ArtifactDatabaseClientTestCase.java gnv/src/test/java/de/intevation/gnv/util/XSLTransformerTestCase.java
diffstat 12 files changed, 39 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- a/gnv/Changelog	Fri Oct 02 08:38:57 2009 +0000
+++ b/gnv/Changelog	Fri Oct 02 08:49:18 2009 +0000
@@ -1,3 +1,20 @@
+2009-10-02  Tim Englich  <tim.englich@intevation.de>
+
+    * src/main/java/de/intevation/gnv/util/XSLTransformer.java CLEANUP , 
+      src/main/java/de/intevation/gnv/util/XMLUtils.java CLEANUP ,
+      src/main/java/de/intevation/gnv/servlet/GNVActionServlet.java CLEANUP ,
+      src/main/java/de/intevation/gnv/artifactdatabase/objects/Artifact.java CLEANUP , 
+      src/main/java/de/intevation/gnv/artifactdatabase/client/DefaultArtifactDatabaseClient.java CLEANUP ,
+      src/main/java/de/intevation/gnv/artifactdatabase/client/ArtifactDatabaseClient.java CLEANUP ,
+      src/main/java/de/intevation/gnv/action/SelectArtifactFactoryAction.java CLEANUP , 
+      src/main/java/de/intevation/gnv/action/DoOutputAction.java CLEANUP: 
+       Change non static accesses to static members using declaring type
+       Change indirect accesses to static members to direct accesses (accesses through subtypes)
+       Remove unused imports
+       Add missing '@Override' annotations
+       Add missing '@Deprecated' annotations
+       Remove unnecessary casts
+       
 2009-10-02  Tim Englich  <tim.englich@intevation.de>
 
     * src/main/java/de/intevation/gnv/action/SelectArtifactFactoryAction.java (execute) Edited, 
--- a/gnv/src/main/java/de/intevation/gnv/action/DoOutputAction.java	Fri Oct 02 08:38:57 2009 +0000
+++ b/gnv/src/main/java/de/intevation/gnv/action/DoOutputAction.java	Fri Oct 02 08:49:18 2009 +0000
@@ -20,7 +20,6 @@
 import de.intevation.gnv.action.sessionmodel.SessionModelFactory;
 import de.intevation.gnv.artifactdatabase.client.ArtifactDatabaseClient;
 import de.intevation.gnv.artifactdatabase.client.ArtifactDatabaseClientFactory;
-import de.intevation.gnv.artifactdatabase.objects.ArtifactDescription;
 import de.intevation.gnv.artifactdatabase.objects.DefaultInputParameter;
 import de.intevation.gnv.artifactdatabase.objects.InputParameter;
 import de.intevation.gnv.artifactdatabase.objects.OutputMode;
--- a/gnv/src/main/java/de/intevation/gnv/action/SelectArtifactFactoryAction.java	Fri Oct 02 08:38:57 2009 +0000
+++ b/gnv/src/main/java/de/intevation/gnv/action/SelectArtifactFactoryAction.java	Fri Oct 02 08:49:18 2009 +0000
@@ -18,7 +18,6 @@
 import de.intevation.gnv.artifactdatabase.client.ArtifactDatabaseClient;
 import de.intevation.gnv.artifactdatabase.client.ArtifactDatabaseClientFactory;
 import de.intevation.gnv.artifactdatabase.objects.ArtifactDescription;
-import de.intevation.gnv.artifactdatabase.objects.ArtifactFactory;
 import de.intevation.gnv.artifactdatabase.objects.ArtifactObject;
 import de.intevation.gnv.util.XSLTransformer;
 
--- a/gnv/src/main/java/de/intevation/gnv/action/sessionmodel/SessionModelFactory.java	Fri Oct 02 08:38:57 2009 +0000
+++ b/gnv/src/main/java/de/intevation/gnv/action/sessionmodel/SessionModelFactory.java	Fri Oct 02 08:49:18 2009 +0000
@@ -7,8 +7,6 @@
 
 import org.apache.log4j.Logger;
 
-import de.intevation.gnv.artifactdatabase.client.DefaultArtifactDatabaseClient;
-
 /**
  * @author Tim Englich <tim.englich@intevation.de>
  *
--- a/gnv/src/main/java/de/intevation/gnv/artifactdatabase/client/ArtifactDatabaseClient.java	Fri Oct 02 08:38:57 2009 +0000
+++ b/gnv/src/main/java/de/intevation/gnv/artifactdatabase/client/ArtifactDatabaseClient.java	Fri Oct 02 08:49:18 2009 +0000
@@ -8,7 +8,6 @@
 
 import de.intevation.gnv.artifactdatabase.client.exception.ArtifactDatabaseClientException;
 import de.intevation.gnv.artifactdatabase.objects.ArtifactDescription;
-import de.intevation.gnv.artifactdatabase.objects.ArtifactFactory;
 import de.intevation.gnv.artifactdatabase.objects.ArtifactObject;
 import de.intevation.gnv.artifactdatabase.objects.ArtifactStatisticValue;
 import de.intevation.gnv.artifactdatabase.objects.InputParameter;
--- a/gnv/src/main/java/de/intevation/gnv/artifactdatabase/client/DefaultArtifactDatabaseClient.java	Fri Oct 02 08:38:57 2009 +0000
+++ b/gnv/src/main/java/de/intevation/gnv/artifactdatabase/client/DefaultArtifactDatabaseClient.java	Fri Oct 02 08:49:18 2009 +0000
@@ -208,7 +208,7 @@
     
     
     private ArtifactObject getArtifact(Document document){
-        XMLUtils xmlUtils = new XMLUtils(); 
+        XMLUtils xmlUtils = new XMLUtils();
         String uuid = xmlUtils.getStringXPath(document, "/result/uuid/@value");
         String hash = xmlUtils.getStringXPath(document, "/result/hash/@value");
         log.info("NEW Artifact: "+uuid+" / "+hash);
@@ -382,7 +382,7 @@
         }
     }
     
-    private Document createFeedRequestBody(ArtifactObject currentArtifact, 
+    private Document createFeedRequestBody(ArtifactObject currentArtifact,
                                            Collection<InputParameter> inputParameter){
         Document document = new XMLUtils().newDocument();
         Node rootNode  = this.createRootNode(document);
@@ -566,7 +566,7 @@
             }
         } catch (IOException e) {
             log.error(e,e);
-            throw new ArtifactDatabaseClientException(e); 
+            throw new ArtifactDatabaseClientException(e);
         }
         
         return result;
--- a/gnv/src/main/java/de/intevation/gnv/artifactdatabase/objects/Artifact.java	Fri Oct 02 08:38:57 2009 +0000
+++ b/gnv/src/main/java/de/intevation/gnv/artifactdatabase/objects/Artifact.java	Fri Oct 02 08:49:18 2009 +0000
@@ -6,7 +6,6 @@
 import java.util.Collection;
 import java.util.Map;
 
-import org.w3c.dom.Document;
 import org.w3c.dom.Node;
 
 /**
--- a/gnv/src/main/java/de/intevation/gnv/servlet/GNVActionServlet.java	Fri Oct 02 08:38:57 2009 +0000
+++ b/gnv/src/main/java/de/intevation/gnv/servlet/GNVActionServlet.java	Fri Oct 02 08:49:18 2009 +0000
@@ -6,7 +6,6 @@
 import javax.servlet.ServletConfig;
 import javax.servlet.ServletException;
 
-import org.apache.log4j.BasicConfigurator;
 import org.apache.log4j.Logger;
 import org.apache.log4j.PropertyConfigurator;
 import org.apache.struts.action.ActionServlet;
@@ -39,6 +38,7 @@
     /**
      * @see javax.servlet.GenericServlet#init(javax.servlet.ServletConfig)
      */
+    @Override
     public void init(ServletConfig config) throws ServletException {
         super.init(config);
         try {
--- a/gnv/src/main/java/de/intevation/gnv/util/XMLUtils.java	Fri Oct 02 08:38:57 2009 +0000
+++ b/gnv/src/main/java/de/intevation/gnv/util/XMLUtils.java	Fri Oct 02 08:49:18 2009 +0000
@@ -5,16 +5,10 @@
 import java.io.StringBufferInputStream;
 import java.io.StringWriter;
 
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.SAXException;
-
+import javax.xml.namespace.NamespaceContext;
+import javax.xml.namespace.QName;
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
-
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerConfigurationException;
@@ -23,16 +17,18 @@
 import javax.xml.transform.TransformerFactoryConfigurationError;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
 
 import org.apache.log4j.Logger;
-
-import javax.xml.xpath.XPathFactory;
-import javax.xml.xpath.XPath;
-import javax.xml.xpath.XPathExpressionException;
-import javax.xml.xpath.XPathConstants;
-
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.namespace.QName;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
 
 /**
  *  @author Sascha L. Teichmann
@@ -124,7 +120,7 @@
         }
         catch (XPathExpressionException xpee) {
             logger.error(xpee.getLocalizedMessage(), xpee);
-        }        
+        }
 
         return null;
     }
--- a/gnv/src/main/java/de/intevation/gnv/util/XSLTransformer.java	Fri Oct 02 08:38:57 2009 +0000
+++ b/gnv/src/main/java/de/intevation/gnv/util/XSLTransformer.java	Fri Oct 02 08:49:18 2009 +0000
@@ -5,7 +5,6 @@
 
 import java.io.ByteArrayOutputStream;
 import java.io.File;
-import java.io.StringBufferInputStream;
 import java.io.UnsupportedEncodingException;
 
 import javax.xml.transform.Source;
--- a/gnv/src/test/java/de/intevation/gnv/artifactdatabase/client/ArtifactDatabaseClientTestCase.java	Fri Oct 02 08:38:57 2009 +0000
+++ b/gnv/src/test/java/de/intevation/gnv/artifactdatabase/client/ArtifactDatabaseClientTestCase.java	Fri Oct 02 08:49:18 2009 +0000
@@ -7,6 +7,8 @@
 import java.util.Collection;
 import java.util.Iterator;
 
+import junit.framework.TestCase;
+
 import org.apache.log4j.BasicConfigurator;
 import org.apache.log4j.Logger;
 
@@ -17,8 +19,6 @@
 import de.intevation.gnv.artifactdatabase.objects.InputParameter;
 import de.intevation.gnv.util.XSLTransformer;
 
-import junit.framework.TestCase;
-
 /**
  * @author Tim Englich <tim.englich@intevation.de>
  *
@@ -45,6 +45,7 @@
     /**
      * @see junit.framework.TestCase#setUp()
      */
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
     }
--- a/gnv/src/test/java/de/intevation/gnv/util/XSLTransformerTestCase.java	Fri Oct 02 08:38:57 2009 +0000
+++ b/gnv/src/test/java/de/intevation/gnv/util/XSLTransformerTestCase.java	Fri Oct 02 08:49:18 2009 +0000
@@ -7,14 +7,14 @@
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
 
+import junit.framework.TestCase;
+
 import org.apache.log4j.BasicConfigurator;
 import org.apache.log4j.Logger;
 import org.w3c.dom.Document;
 
 import de.intevation.gnv.artifactdatabase.client.DefaultArtifactDatabaseClient;
 
-import junit.framework.TestCase;
-
 /**
  * @author Tim Englich <tim.englich@intevation.de>
  *

http://dive4elements.wald.intevation.org