cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bimargul...@apache.org
Subject svn commit: r725554 - in /cxf/trunk/distribution/src/main/release/samples/aegis_standalone/src/org/apache/cxf/demo/aegis: commands/ReadZoo.java commands/WriteZoo.java types/Zoo.java
Date Thu, 11 Dec 2008 02:56:04 GMT
Author: bimargulies
Date: Wed Dec 10 18:56:04 2008
New Revision: 725554

URL: http://svn.apache.org/viewvc?rev=725554&view=rev
Log:
Fix checkstyle errors.

Modified:
    cxf/trunk/distribution/src/main/release/samples/aegis_standalone/src/org/apache/cxf/demo/aegis/commands/ReadZoo.java
    cxf/trunk/distribution/src/main/release/samples/aegis_standalone/src/org/apache/cxf/demo/aegis/commands/WriteZoo.java
    cxf/trunk/distribution/src/main/release/samples/aegis_standalone/src/org/apache/cxf/demo/aegis/types/Zoo.java

Modified: cxf/trunk/distribution/src/main/release/samples/aegis_standalone/src/org/apache/cxf/demo/aegis/commands/ReadZoo.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/aegis_standalone/src/org/apache/cxf/demo/aegis/commands/ReadZoo.java?rev=725554&r1=725553&r2=725554&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/aegis_standalone/src/org/apache/cxf/demo/aegis/commands/ReadZoo.java
(original)
+++ cxf/trunk/distribution/src/main/release/samples/aegis_standalone/src/org/apache/cxf/demo/aegis/commands/ReadZoo.java
Wed Dec 10 18:56:04 2008
@@ -35,41 +35,41 @@
 /**
  * 
  */
-public class ReadZoo {
+public final class ReadZoo {
 
-	private XMLInputFactory inputFactory;
-	private String inputPathname;
+    private XMLInputFactory inputFactory;
+    private String inputPathname;
 
-	private ReadZoo() {
-		inputFactory = XMLInputFactory.newInstance();
-	}
+    private ReadZoo() {
+        inputFactory = XMLInputFactory.newInstance();
+    }
 
-	private void go() throws Exception {
-		AegisContext context;
+    private void go() throws Exception {
+        AegisContext context;
 
-		context = new AegisContext();
-		Set<Class<?>> rootClasses = new HashSet<Class<?>>();
-		rootClasses.add(Zoo.class);
-		context.setRootClasses(rootClasses);
-		context.initialize();
-		AegisReader<XMLStreamReader> reader = context.createXMLStreamReader();
-		FileInputStream input = new FileInputStream(inputPathname);
-		XMLStreamReader xmlReader = inputFactory.createXMLStreamReader(input);
-		Zoo zoo = (Zoo)reader.read(xmlReader);
-		System.out.println("Name " + zoo.getName());
-		System.out.println("Founder " + zoo.getFounder());
-		for(Map.Entry<String, Animal> e : zoo.getAnimals().entrySet()) {
-			System.out.println(e.getKey() + " -> " + e.getValue().getName());
-		}
-	}
+        context = new AegisContext();
+        Set<Class<?>> rootClasses = new HashSet<Class<?>>();
+        rootClasses.add(Zoo.class);
+        context.setRootClasses(rootClasses);
+        context.initialize();
+        AegisReader<XMLStreamReader> reader = context.createXMLStreamReader();
+        FileInputStream input = new FileInputStream(inputPathname);
+        XMLStreamReader xmlReader = inputFactory.createXMLStreamReader(input);
+        Zoo zoo = (Zoo)reader.read(xmlReader);
+        System.out.println("Name " + zoo.getName());
+        System.out.println("Founder " + zoo.getFounder());
+        for (Map.Entry<String, Animal> e : zoo.getAnimals().entrySet()) {
+            System.out.println(e.getKey() + " -> " + e.getValue().getName());
+        }
+    }
 
-	/**
-	 * @param args
-	 * @throws Exception
-	 */
-	public static void main(String[] args) throws Exception {
-		ReadZoo rz = new ReadZoo();
-		rz.inputPathname = args[0];
-		rz.go();
-	}
+    /**
+     * @param args
+     * @throws Exception
+     */
+    public static void main(String[] args) throws Exception {
+        ReadZoo rz = new ReadZoo();
+        rz.inputPathname = args[0];
+        rz.go();
+    }
 }

Modified: cxf/trunk/distribution/src/main/release/samples/aegis_standalone/src/org/apache/cxf/demo/aegis/commands/WriteZoo.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/aegis_standalone/src/org/apache/cxf/demo/aegis/commands/WriteZoo.java?rev=725554&r1=725553&r2=725554&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/aegis_standalone/src/org/apache/cxf/demo/aegis/commands/WriteZoo.java
(original)
+++ cxf/trunk/distribution/src/main/release/samples/aegis_standalone/src/org/apache/cxf/demo/aegis/commands/WriteZoo.java
Wed Dec 10 18:56:04 2008
@@ -25,12 +25,12 @@
 import java.util.Map;
 import java.util.Set;
 
-import javanet.staxutils.IndentingXMLStreamWriter;
-
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLOutputFactory;
 import javax.xml.stream.XMLStreamWriter;
 
+import javanet.staxutils.IndentingXMLStreamWriter;
+
 import org.apache.cxf.aegis.AegisContext;
 import org.apache.cxf.aegis.AegisWriter;
 import org.apache.cxf.aegis.type.Type;
@@ -40,17 +40,17 @@
 /**
  * 
  */
-public class WriteZoo {
+public final class WriteZoo {
     private XMLOutputFactory outputFactory;
     private String outputPathname;
-    
+
     private WriteZoo() {
         outputFactory = XMLOutputFactory.newInstance();
     }
-    
+
     private void go() throws Exception {
         AegisContext context;
-        
+
         context = new AegisContext();
         context.setWriteXsiTypes(true);
         Set<Class<?>> rootClasses = new HashSet<Class<?>>();
@@ -61,15 +61,14 @@
         FileOutputStream output = new FileOutputStream(outputPathname);
         XMLStreamWriter xmlWriter = outputFactory.createXMLStreamWriter(output);
         IndentingXMLStreamWriter indentWriter = new IndentingXMLStreamWriter(xmlWriter);
-        
+
         Zoo zoo = populateZoo();
         Type aegisType = context.getTypeMapping().getType(zoo.getClass());
-        writer.write(zoo, new QName("urn:aegis:demo", "zoo"),
-                      false, indentWriter, aegisType);
+        writer.write(zoo, new QName("urn:aegis:demo", "zoo"), false, indentWriter, aegisType);
         xmlWriter.close();
         output.close();
     }
-    
+
     private Zoo populateZoo() {
         Zoo zoo = new Zoo();
         zoo.setFounder("Noah");
@@ -90,7 +89,7 @@
 
     /**
      * @param args
-     * @throws Exception 
+     * @throws Exception
      */
     public static void main(String[] args) throws Exception {
         WriteZoo wz = new WriteZoo();

Modified: cxf/trunk/distribution/src/main/release/samples/aegis_standalone/src/org/apache/cxf/demo/aegis/types/Zoo.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/aegis_standalone/src/org/apache/cxf/demo/aegis/types/Zoo.java?rev=725554&r1=725553&r2=725554&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/aegis_standalone/src/org/apache/cxf/demo/aegis/types/Zoo.java
(original)
+++ cxf/trunk/distribution/src/main/release/samples/aegis_standalone/src/org/apache/cxf/demo/aegis/types/Zoo.java
Wed Dec 10 18:56:04 2008
@@ -27,15 +27,14 @@
 public class Zoo {
     private String name;
     private String founder;
-    
+    private Map<String, Animal> animals;
+
     public String getFounder() {
         return founder;
     }
     public void setFounder(String founder) {
         this.founder = founder;
     }
-    private Map<String, Animal> animals;
-    
     
     public String getName() {
         return name;



Mime
View raw message