You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by ch...@apache.org on 2006/09/16 20:28:51 UTC

svn commit: r446911 - in /webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema: XmlSchemaFacet.java XmlSchemaSerializer.java resolver/DefaultURIResolver.java

Author: chinthaka
Date: Sat Sep 16 11:28:50 2006
New Revision: 446911

URL: http://svn.apache.org/viewvc?view=rev&rev=446911
Log:
Removing redundant variable initialization

Modified:
    webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaFacet.java
    webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSerializer.java
    webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/resolver/DefaultURIResolver.java

Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaFacet.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaFacet.java?view=diff&rev=446911&r1=446910&r2=446911
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaFacet.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaFacet.java Sat Sep 16 11:28:50 2006
@@ -78,7 +78,7 @@
         if (el.getAttribute("fixed").equals("true")) {
             fixed = true;
         }
-        XmlSchemaFacet facet = null;
+        XmlSchemaFacet facet;
         if (name.equals("enumeration")) {
             facet = new XmlSchemaEnumerationFacet();
         } else if (name.equals("fractionDigits")) {

Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSerializer.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSerializer.java?view=diff&rev=446911&r1=446910&r2=446911
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSerializer.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSerializer.java Sat Sep 16 11:28:50 2006
@@ -78,7 +78,7 @@
                                       boolean serializeIncluded) throws XmlSchemaSerializerException {
 
         XmlSchemaObjectCollection items = schemaObj.getItems();
-        Document serializedSchemaDocs = null;
+        Document serializedSchemaDocs;
         try {
             DocumentBuilderFactory docFac = DocumentBuilderFactory.newInstance();
             docFac.setNamespaceAware(true);
@@ -1104,7 +1104,7 @@
                 String nodeName = unhandled[i].getNodeName();
                 if (value.indexOf(":") > -1 && !nodeName.startsWith("xmlns")) {
                     String prefix = value.substring(0, value.indexOf(":"));
-                    String oldNamespace = null;
+                    String oldNamespace;
                     if ((oldNamespace = (String) namespaces.get(prefix)) != null) {
                         value = value.substring(value.indexOf(":") + 1);
                         NamespacePrefixList ctx = schema.getNamespaceContext();
@@ -1534,7 +1534,6 @@
 
 
         if (groupRefObj.particle != null) {
-            Element particleEl;
             if (groupRefObj.particle instanceof XmlSchemaChoice)
                 serializeChoice(doc, (XmlSchemaChoice) groupRefObj.particle, schema);
             else if (groupRefObj.particle instanceof XmlSchemaSequence)

Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/resolver/DefaultURIResolver.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/resolver/DefaultURIResolver.java?view=diff&rev=446911&r1=446910&r2=446911
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/resolver/DefaultURIResolver.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/resolver/DefaultURIResolver.java Sat Sep 16 11:28:50 2006
@@ -95,7 +95,7 @@
         String path = spec.replace('\\', '/');
 
         // See if we have a good URL.
-        URL url = null;
+        URL url;
 
         try {
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org