Author: amilas
Date: Sat May  1 05:11:59 2010
New Revision: 939924

URL: http://svn.apache.org/viewvc?rev=939924&view=rev
Log:
reformat the code

Modified:
    
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService.java

Modified: 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService.java?rev=939924&r1=939923&r2=939924&view=diff
==============================================================================
--- 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService.java
 Sat May  1 05:11:59 2010
@@ -1306,36 +1306,36 @@ public class AxisService extends AxisDes
                ArrayList<XmlSchema> schemas = getSchema();
 
                // a name is present - try to pump the requested schema
-               if (!"".equals(xsd)) {
-                       XmlSchema schema = (XmlSchema) 
schemaMappingtable.get(xsd);
-                       if (schema == null) {
-                               int dotIndex = xsd.indexOf('.');
-                               if (dotIndex > 0) {
-                                       String schemaKey = xsd.substring(0, 
dotIndex);
-                                       schema = (XmlSchema) 
schemaMappingtable.get(schemaKey);
-                               }
-                       }
-                       if (schema != null) {
-                               // schema is there - pump it outs
-                               schema.write(new OutputStreamWriter(out, 
"UTF8"));
-                               out.flush();
-                       } else {
-                            // make sure we are only serving .xsd files and 
ignore requests with
-                            // ".." in the name.
-                            if (xsd.endsWith(".xsd") && xsd.indexOf("..") == 
-1) {
-                               InputStream in = 
getClassLoader().getResourceAsStream(
-                                               DeploymentConstants.META_INF + 
"/" + xsd);
-                               if (in != null) {
-                                    IOUtils.copy(in, out, true);
-                               } else {
-                                    // Can't find the schema
-                                    return -1;
-                               }
-                            } else {
-                                // bad schema request
-                                return -1;
-                            }
-                       }
+        if (!"".equals(xsd)) {
+            XmlSchema schema = (XmlSchema) schemaMappingtable.get(xsd);
+            if (schema == null) {
+                int dotIndex = xsd.indexOf('.');
+                if (dotIndex > 0) {
+                    String schemaKey = xsd.substring(0, dotIndex);
+                    schema = (XmlSchema) schemaMappingtable.get(schemaKey);
+                }
+            }
+            if (schema != null) {
+                // schema is there - pump it outs
+                schema.write(new OutputStreamWriter(out, "UTF8"));
+                out.flush();
+            } else {
+                // make sure we are only serving .xsd files and ignore 
requests with
+                // ".." in the name.
+                if (xsd.endsWith(".xsd") && xsd.indexOf("..") == -1) {
+                    InputStream in = getClassLoader().getResourceAsStream(
+                            DeploymentConstants.META_INF + "/" + xsd);
+                    if (in != null) {
+                        IOUtils.copy(in, out, true);
+                    } else {
+                        // Can't find the schema
+                        return -1;
+                    }
+                } else {
+                    // bad schema request
+                    return -1;
+                }
+            }
                } else if (schemas.size() > 1) {
                        // multiple schemas are present and the user specified
                        // no name - in this case we cannot possibly pump a 
schema


Reply via email to