You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by gd...@apache.org on 2007/03/29 20:49:16 UTC

svn commit: r523794 [6/8] - in /webservices/axis2/trunk/java/modules: adb/src/org/apache/axis2/databinding/ adb/src/org/apache/axis2/databinding/i18n/ adb/src/org/apache/axis2/databinding/typemapping/ adb/src/org/apache/axis2/databinding/types/ adb/src...

Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/rpc/receivers/RPCUtil.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/rpc/receivers/RPCUtil.java?view=diff&rev=523794&r1=523793&r2=523794
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/rpc/receivers/RPCUtil.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/rpc/receivers/RPCUtil.java Thu Mar 29 11:49:12 2007
@@ -1,6 +1,9 @@
 package org.apache.axis2.rpc.receivers;
 
-import org.apache.axiom.om.*;
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMNamespace;
+import org.apache.axiom.om.OMText;
 import org.apache.axiom.om.impl.builder.StAXOMBuilder;
 import org.apache.axiom.om.impl.llom.factory.OMXMLBuilderFactory;
 import org.apache.axiom.om.util.Base64;
@@ -11,15 +14,15 @@
 import org.apache.axis2.databinding.typemapping.SimpleTypeMapper;
 import org.apache.axis2.databinding.utils.BeanUtil;
 import org.apache.axis2.databinding.utils.reader.NullXMLStreamReader;
-import org.apache.axis2.description.AxisService;
 import org.apache.axis2.description.AxisMessage;
+import org.apache.axis2.description.AxisService;
 import org.apache.axis2.engine.ObjectSupplier;
 import org.apache.axis2.util.StreamWrapper;
-import org.apache.ws.java2wsdl.utils.TypeTable;
+import org.apache.ws.commons.schema.XmlSchemaComplexType;
 import org.apache.ws.commons.schema.XmlSchemaElement;
 import org.apache.ws.commons.schema.XmlSchemaObjectCollection;
 import org.apache.ws.commons.schema.XmlSchemaSequence;
-import org.apache.ws.commons.schema.XmlSchemaComplexType;
+import org.apache.ws.java2wsdl.utils.TypeTable;
 
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLStreamReader;
@@ -59,13 +62,13 @@
         if (resObject != null) {
             //simple type
             if (resObject instanceof OMElement) {
-                OMElement result = (OMElement) resObject;
+                OMElement result = (OMElement)resObject;
                 bodyContent = fac.createOMElement(
                         method.getName() + "Response", ns);
                 OMElement resWrapper;
                 if (qualified) {
                     resWrapper = fac.createOMElement(RETURN_WRAPPER, ns.getNamespaceURI(),
-                            ns.getPrefix());
+                                                     ns.getPrefix());
                 } else {
                     resWrapper = fac.createOMElement(RETURN_WRAPPER, null);
                 }
@@ -93,7 +96,7 @@
                     returnWrapper = new QName(RETURN_WRAPPER);
                 }
                 XMLStreamReader xr = BeanUtil.getPullParser(resObject,
-                        returnWrapper, typeTable, qualified);
+                                                            returnWrapper, typeTable, qualified);
                 StAXOMBuilder stAXOMBuilder =
                         OMXMLBuilderFactory.createStAXOMBuilder(
                                 OMAbstractFactory.getOMFactory(), new StreamWrapper(xr));
@@ -109,7 +112,8 @@
     }
 
     public static Object[] processRequest(OMElement methodElement,
-                                          Method method, ObjectSupplier objectSupplier) throws AxisFault {
+                                          Method method, ObjectSupplier objectSupplier)
+            throws AxisFault {
         Class[] parameters = method.getParameterTypes();
         return BeanUtil.deserialize(methodElement, parameters, objectSupplier);
     }
@@ -120,15 +124,15 @@
                                                TypeTable typeTable) {
         if (qualified) {
             return BeanUtil.getOMElement(resname, objs,
-                    new QName(resname.getNamespaceURI(),
-                            RETURN_WRAPPER,
-                            resname.getPrefix()),
-                    qualified,
-                    typeTable);
+                                         new QName(resname.getNamespaceURI(),
+                                                   RETURN_WRAPPER,
+                                                   resname.getPrefix()),
+                                         qualified,
+                                         typeTable);
         } else {
             return BeanUtil.getOMElement(resname, objs,
-                    new QName(RETURN_WRAPPER), qualified,
-                    typeTable);
+                                         new QName(RETURN_WRAPPER), qualified,
+                                         typeTable);
         }
     }
 
@@ -137,16 +141,16 @@
                                                        TypeTable typeTable) {
         if (qualified) {
             return BeanUtil.getOMElement(resname, objs,
-                    new QName(resname.getNamespaceURI(),
-                            RETURN_WRAPPER,
-                            resname.getPrefix()),
-                    qualified,
-                    typeTable);
+                                         new QName(resname.getNamespaceURI(),
+                                                   RETURN_WRAPPER,
+                                                   resname.getPrefix()),
+                                         qualified,
+                                         typeTable);
         } else {
             return BeanUtil.getOMElement(resname, objs,
-                    new QName(RETURN_WRAPPER),
-                    qualified,
-                    typeTable);
+                                         new QName(RETURN_WRAPPER),
+                                         qualified,
+                                         typeTable);
         }
     }
 
@@ -159,13 +163,13 @@
                                        OMElement bodyContent,
                                        MessageContext outMessage
     ) throws Exception {
-         QName elementQName = outMessage.getAxisMessage().getElementQName();
+        QName elementQName = outMessage.getAxisMessage().getElementQName();
         if (resObject == null) {
             QName resName;
             if (service.isElementFormDefault()) {
                 resName = new QName(service.getSchematargetNamespace(),
-                        RETURN_WRAPPER,
-                        service.getSchematargetNamespacePrefix());
+                                    RETURN_WRAPPER,
+                                    service.getSchematargetNamespacePrefix());
             } else {
                 resName = new QName(RETURN_WRAPPER);
             }
@@ -175,19 +179,19 @@
                     OMXMLBuilderFactory.createStAXOMBuilder(
                             OMAbstractFactory.getSOAP11Factory(), parser);
             ns = fac.createOMNamespace(service.getSchematargetNamespace(),
-                    service.getSchematargetNamespacePrefix());
+                                       service.getSchematargetNamespacePrefix());
             OMElement bodyChild = fac.createOMElement(method.getName() + "Response", ns);
             bodyChild.addChild(stAXOMBuilder.getDocumentElement());
             envelope.getBody().addChild(bodyChild);
         } else {
             if (resObject instanceof Object[]) {
                 QName resName = new QName(elementQName.getNamespaceURI(),
-                        method.getName() + "Response",
-                        elementQName.getPrefix());
+                                          method.getName() + "Response",
+                                          elementQName.getPrefix());
                 OMElement bodyChild = RPCUtil.getResponseElement(resName,
-                        (Object[]) resObject,
-                        service.isElementFormDefault(),
-                        service.getTypeTable());
+                                                                 (Object[])resObject,
+                                                                 service.isElementFormDefault(),
+                                                                 service.getTypeTable());
                 envelope.getBody().addChild(bodyChild);
             } else {
                 if (resObject.getClass().isArray()) {
@@ -195,7 +199,7 @@
                     Object objArray [];
                     if (resObject instanceof byte[]) {
                         objArray = new Object[1];
-                        objArray[0] = Base64.encode((byte[]) resObject);
+                        objArray[0] = Base64.encode((byte[])resObject);
                     } else {
                         objArray = new Object[length];
                         for (int i = 0; i < length; i++) {
@@ -204,52 +208,55 @@
                     }
 
                     QName resName = new QName(elementQName.getNamespaceURI(),
-                            method.getName() + "Response",
-                            elementQName.getPrefix());
+                                              method.getName() + "Response",
+                                              elementQName.getPrefix());
                     OMElement bodyChild = RPCUtil.getResponseElementForArray(resName,
-                            objArray, service.isElementFormDefault(), service.getTypeTable());
+                                                                             objArray,
+                                                                             service.isElementFormDefault(),
+                                                                             service.getTypeTable());
                     envelope.getBody().addChild(bodyChild);
                 } else {
-                    if(SimpleTypeMapper.isCollection(resObject.getClass())){
-                        Collection collection = (Collection) resObject;
+                    if (SimpleTypeMapper.isCollection(resObject.getClass())) {
+                        Collection collection = (Collection)resObject;
                         int size = collection.size();
                         Object values [] = new Object[size];
                         int count = 0;
-                        for (Iterator iterator = collection.iterator(); iterator.hasNext();)
-                        {
+                        for (Iterator iterator = collection.iterator(); iterator.hasNext();) {
                             values[count] = iterator.next();
                             count ++;
 
                         }
                         QName resName = new QName(elementQName.getNamespaceURI(),
-                                method.getName() + "Response",
-                                elementQName.getPrefix());
+                                                  method.getName() + "Response",
+                                                  elementQName.getPrefix());
                         OMElement bodyChild = RPCUtil.getResponseElement(resName,
-                                values,
-                                service.isElementFormDefault(),
-                                service.getTypeTable());
+                                                                         values,
+                                                                         service.isElementFormDefault(),
+                                                                         service.getTypeTable());
                         envelope.getBody().addChild(bodyChild);
-                    } else if (SimpleTypeMapper.isDataHandler(resObject.getClass())){
-                        OMElement resElemt =  fac.createOMElement(method.getName() + "Response" ,ns);
-                        OMText text = fac.createOMText(resObject,true);
+                    } else if (SimpleTypeMapper.isDataHandler(resObject.getClass())) {
+                        OMElement resElemt = fac.createOMElement(method.getName() + "Response", ns);
+                        OMText text = fac.createOMText(resObject, true);
                         OMElement returnElement;
-                        if(service.isElementFormDefault()){
-                            returnElement=   fac.createOMElement(RETURN_WRAPPER ,ns);
+                        if (service.isElementFormDefault()) {
+                            returnElement = fac.createOMElement(RETURN_WRAPPER, ns);
                         } else {
-                            returnElement=   fac.createOMElement(RETURN_WRAPPER ,null);
+                            returnElement = fac.createOMElement(RETURN_WRAPPER, null);
                         }
                         returnElement.addChild(text);
                         resElemt.addChild(returnElement);
                         envelope.getBody().addChild(resElemt);
-                    }  else {
+                    } else {
                         if (service.isElementFormDefault()) {
                             RPCUtil.processResponse(fac, resObject, bodyContent, ns,
-                                    envelope, method, service.isElementFormDefault(),
-                                    service.getTypeTable());
+                                                    envelope, method,
+                                                    service.isElementFormDefault(),
+                                                    service.getTypeTable());
                         } else {
                             RPCUtil.processResponse(fac, resObject, bodyContent, ns,
-                                    envelope, method, service.isElementFormDefault(),
-                                    null);
+                                                    envelope, method,
+                                                    service.isElementFormDefault(),
+                                                    null);
                         }
                     }
                 }
@@ -260,22 +267,24 @@
 
     /**
      * This can be used to get the part name of the response
+     *
      * @param outMessage : AxisMessage
      * @return String
      */
-    private static  String getReturnName(AxisMessage outMessage){
-        if(outMessage!=null){
-            Object element=  outMessage.getSchemaElement();
-            if(element instanceof XmlSchemaComplexType){
-                XmlSchemaComplexType xmlSchemaComplexType = (XmlSchemaComplexType) element;
+    private static String getReturnName(AxisMessage outMessage) {
+        if (outMessage != null) {
+            Object element = outMessage.getSchemaElement();
+            if (element instanceof XmlSchemaComplexType) {
+                XmlSchemaComplexType xmlSchemaComplexType = (XmlSchemaComplexType)element;
                 Object particle = xmlSchemaComplexType.getParticle();
-                if(particle instanceof XmlSchemaSequence ){
-                    XmlSchemaSequence xmlSchemaSequence = (XmlSchemaSequence) particle;
+                if (particle instanceof XmlSchemaSequence) {
+                    XmlSchemaSequence xmlSchemaSequence = (XmlSchemaSequence)particle;
                     Object items = xmlSchemaSequence.getItems();
-                    if(items instanceof XmlSchemaObjectCollection){
-                        XmlSchemaObjectCollection xmlSchemaObjectCollection = (XmlSchemaObjectCollection) items;
-                        Object schemaElement=  xmlSchemaObjectCollection.getItem(0);
-                        if(schemaElement instanceof XmlSchemaElement){
+                    if (items instanceof XmlSchemaObjectCollection) {
+                        XmlSchemaObjectCollection xmlSchemaObjectCollection =
+                                (XmlSchemaObjectCollection)items;
+                        Object schemaElement = xmlSchemaObjectCollection.getItem(0);
+                        if (schemaElement instanceof XmlSchemaElement) {
                             return ((XmlSchemaElement)schemaElement).getName();
                         }
                     }

Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/rpc/receivers/ejb/EJBUtil.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/rpc/receivers/ejb/EJBUtil.java?view=diff&rev=523794&r1=523793&r2=523794
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/rpc/receivers/ejb/EJBUtil.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/rpc/receivers/ejb/EJBUtil.java Thu Mar 29 11:49:12 2007
@@ -1,6 +1,10 @@
 package org.apache.axis2.rpc.receivers.ejb;
 
-import edu.emory.mathcs.backport.java.util.concurrent.*;
+import edu.emory.mathcs.backport.java.util.concurrent.CountDownLatch;
+import edu.emory.mathcs.backport.java.util.concurrent.ExecutorService;
+import edu.emory.mathcs.backport.java.util.concurrent.LinkedBlockingQueue;
+import edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor;
+import edu.emory.mathcs.backport.java.util.concurrent.TimeUnit;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.description.AxisService;
@@ -10,9 +14,9 @@
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import java.lang.reflect.Method;
-import java.util.Properties;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
+import java.util.Properties;
 /*
 * Copyright 2004,2005 The Apache Software Foundation.
 *
@@ -43,8 +47,11 @@
     private static ExecutorService workerPool = null;
 
     static {
-        workerPool = new ThreadPoolExecutor(1, 50, 150L, TimeUnit.SECONDS, new LinkedBlockingQueue(),
-                new DefaultThreadFactory(new ThreadGroup("EJB provider thread group"), "EJBProvider"));
+        workerPool =
+                new ThreadPoolExecutor(1, 50, 150L, TimeUnit.SECONDS, new LinkedBlockingQueue(),
+                                       new DefaultThreadFactory(
+                                               new ThreadGroup("EJB provider thread group"),
+                                               "EJBProvider"));
     }
 
     /**
@@ -66,7 +73,7 @@
             throw AxisFault.makeFault(e);
         }
 
-        if (worker.getException()!=null) {
+        if (worker.getException() != null) {
             throw AxisFault.makeFault(worker.getException());
         }
 
@@ -84,7 +91,8 @@
         private Exception exception = null;
         private Object returnedValue = null;
 
-        public EJBClientWorker(MessageContext msgContext, CountDownLatch startLatch, CountDownLatch stopLatch) {
+        public EJBClientWorker(MessageContext msgContext, CountDownLatch startLatch,
+                               CountDownLatch stopLatch) {
             this.msgContext = msgContext;
             this.startLatch = startLatch;
             this.stopLatch = stopLatch;
@@ -97,7 +105,8 @@
                 AccessController.doPrivileged(
                         new PrivilegedAction() {
                             public Object run() {
-                                Thread.currentThread().setContextClassLoader(service.getClassLoader());
+                                Thread.currentThread()
+                                        .setContextClassLoader(service.getClassLoader());
                                 return null;
                             }
                         }
@@ -105,7 +114,7 @@
                 Parameter remoteHomeName = service.getParameter(EJB_HOME_INTERFACE_NAME);
                 Parameter localHomeName = service.getParameter(EJB_LOCAL_HOME_INTERFACE_NAME);
                 Parameter jndiName = service.getParameter(EJB_JNDI_NAME);
-                Parameter homeName = (remoteHomeName != null ? remoteHomeName:localHomeName);
+                Parameter homeName = (remoteHomeName != null ? remoteHomeName : localHomeName);
 
                 if (jndiName == null || jndiName.getValue() == null) {
                     throw new AxisFault("jndi name is not specified");
@@ -116,9 +125,12 @@
 
                 // we create either the ejb using either the RemoteHome or LocalHome object
                 if (remoteHomeName != null)
-                    returnedValue = createRemoteEJB(msgContext, ((String) jndiName.getValue()).trim(), ((String) homeName.getValue()).trim());
+                    returnedValue = createRemoteEJB(msgContext,
+                                                    ((String)jndiName.getValue()).trim(),
+                                                    ((String)homeName.getValue()).trim());
                 else
-                    returnedValue = createLocalEJB(msgContext, ((String) jndiName.getValue()).trim(), ((String) homeName.getValue()).trim());
+                    returnedValue = createLocalEJB(msgContext, ((String)jndiName.getValue()).trim(),
+                                                   ((String)homeName.getValue()).trim());
             } catch (Exception e) {
                 e.printStackTrace();
                 exception = e;
@@ -130,13 +142,14 @@
         /**
          * Create an EJB using a remote home object
          *
-         * @param msgContext the message context
+         * @param msgContext   the message context
          * @param beanJndiName The JNDI name of the EJB remote home class
-         * @param homeName the name of the home interface class
+         * @param homeName     the name of the home interface class
          * @return an EJB
          * @throws Exception If fails
          */
-        private Object createRemoteEJB(MessageContext msgContext, String beanJndiName, String homeName) throws Exception {
+        private Object createRemoteEJB(MessageContext msgContext, String beanJndiName,
+                                       String homeName) throws Exception {
             // Get the EJB Home object from JNDI
             Object ejbHome = getEJBHome(msgContext.getAxisService(), beanJndiName);
             Class cls = getContextClassLoader().loadClass(homeName);
@@ -152,13 +165,14 @@
         /**
          * Create an EJB using a local home object
          *
-         * @param msgContext the message context
+         * @param msgContext   the message context
          * @param beanJndiName The JNDI name of the EJB local home class
-         * @param homeName the name of the home interface class
+         * @param homeName     the name of the home interface class
          * @return an EJB
          * @throws Exception if fails
          */
-        private Object createLocalEJB(MessageContext msgContext, String beanJndiName, String homeName)
+        private Object createLocalEJB(MessageContext msgContext, String beanJndiName,
+                                      String homeName)
                 throws Exception {
             // Get the EJB Home object from JNDI
             Object ejbHome = getEJBHome(msgContext.getAxisService(), beanJndiName);
@@ -182,10 +196,11 @@
         }
 
         /**
-         * Common routine to do the JNDI lookup on the Home interface object
-         * username and password for jndi lookup are got from the configuration or from
-         * the messageContext if not found in the configuration
-         * @param service AxisService object
+         * Common routine to do the JNDI lookup on the Home interface object username and password
+         * for jndi lookup are got from the configuration or from the messageContext if not found in
+         * the configuration
+         *
+         * @param service      AxisService object
          * @param beanJndiName JNDI name of the EJB home object
          * @return EJB home object
          * @throws AxisFault If fals
@@ -205,7 +220,8 @@
                 if (username != null) {
                     if (properties == null)
                         properties = new Properties();
-                    properties.setProperty(Context.SECURITY_PRINCIPAL, ((String) username.getValue()).trim());
+                    properties.setProperty(Context.SECURITY_PRINCIPAL,
+                                           ((String)username.getValue()).trim());
                 }
 
                 // password
@@ -213,7 +229,8 @@
                 if (password != null) {
                     if (properties == null)
                         properties = new Properties();
-                    properties.setProperty(Context.SECURITY_CREDENTIALS, ((String) password.getValue()).trim());
+                    properties.setProperty(Context.SECURITY_CREDENTIALS,
+                                           ((String)password.getValue()).trim());
                 }
 
                 // factory class
@@ -221,7 +238,8 @@
                 if (factoryClass != null) {
                     if (properties == null)
                         properties = new Properties();
-                    properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, ((String) factoryClass.getValue()).trim());
+                    properties.setProperty(Context.INITIAL_CONTEXT_FACTORY,
+                                           ((String)factoryClass.getValue()).trim());
                 }
 
                 // contextUrl
@@ -229,7 +247,8 @@
                 if (contextUrl != null) {
                     if (properties == null)
                         properties = new Properties();
-                    properties.setProperty(Context.PROVIDER_URL, ((String) contextUrl.getValue()).trim());
+                    properties.setProperty(Context.PROVIDER_URL,
+                                           ((String)contextUrl.getValue()).trim());
                 }
 
                 // get context using these properties
@@ -272,7 +291,7 @@
         }
 
         private ClassLoader getContextClassLoader() {
-            return (ClassLoader) AccessController.doPrivileged(
+            return (ClassLoader)AccessController.doPrivileged(
                     new PrivilegedAction() {
                         public Object run() {
                             return Thread.currentThread().getContextClassLoader();

Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/util/ArrayStack.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/util/ArrayStack.java?view=diff&rev=523794&r1=523793&r2=523794
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/util/ArrayStack.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/util/ArrayStack.java Thu Mar 29 11:49:12 2007
@@ -19,18 +19,16 @@
 import java.util.EmptyStackException;
 
 /**
- * An implementation of the {@link java.util.Stack} API that is based on an
- * <code>ArrayList</code> instead of a <code>Vector</code>, so it is not
- * synchronized to protect against multi-threaded access.  The implementation
- * is therefore operates faster in environments where you do not need to
+ * An implementation of the {@link java.util.Stack} API that is based on an <code>ArrayList</code>
+ * instead of a <code>Vector</code>, so it is not synchronized to protect against multi-threaded
+ * access.  The implementation is therefore operates faster in environments where you do not need to
  * worry about multiple thread contention.
- * <p>
- * The removal order of an <code>ArrayStack</code> is based on insertion
- * order: The most recently added element is removed first.  The iteration
- * order is <i>not</i> the same as the removal order.  The iterator returns
- * elements from the bottom up, whereas the {@link #remove()} method removes
+ * <p/>
+ * The removal order of an <code>ArrayStack</code> is based on insertion order: The most recently
+ * added element is removed first.  The iteration order is <i>not</i> the same as the removal order.
+ *  The iterator returns elements from the bottom up, whereas the {@link #remove()} method removes
  * them from the top down.
- * <p>
+ * <p/>
  * Unlike <code>Stack</code>, <code>ArrayStack</code> accepts null entries.
  */
 public class ArrayStack extends ArrayList {
@@ -39,8 +37,8 @@
     private static final long serialVersionUID = 2130079159931574599L;
 
     /**
-     * Constructs a new empty <code>ArrayStack</code>. The initial size
-     * is controlled by <code>ArrayList</code> and is currently 10.
+     * Constructs a new empty <code>ArrayStack</code>. The initial size is controlled by
+     * <code>ArrayList</code> and is currently 10.
      */
     public ArrayStack() {
         super();
@@ -49,9 +47,8 @@
     /**
      * Constructs a new empty <code>ArrayStack</code> with an initial size.
      *
-     * @param initialSize  the initial size to use
-     * @throws IllegalArgumentException  if the specified initial size
-     *  is negative
+     * @param initialSize the initial size to use
+     * @throws IllegalArgumentException if the specified initial size is negative
      */
     public ArrayStack(int initialSize) {
         super(initialSize);
@@ -59,9 +56,9 @@
 
     /**
      * Return <code>true</code> if this stack is currently empty.
-     * <p>
-     * This method exists for compatibility with <code>java.util.Stack</code>.
-     * New users of this class should use <code>isEmpty</code> instead.
+     * <p/>
+     * This method exists for compatibility with <code>java.util.Stack</code>. New users of this
+     * class should use <code>isEmpty</code> instead.
      *
      * @return true if the stack is currently empty
      */
@@ -73,7 +70,7 @@
      * Returns the top item off of this stack without removing it.
      *
      * @return the top item on the stack
-     * @throws EmptyStackException  if the stack is empty
+     * @throws EmptyStackException if the stack is empty
      */
     public Object peek() throws EmptyStackException {
         int n = size();
@@ -85,13 +82,12 @@
     }
 
     /**
-     * Returns the n'th item down (zero-relative) from the top of this
-     * stack without removing it.
+     * Returns the n'th item down (zero-relative) from the top of this stack without removing it.
      *
-     * @param n  the number of items down to go
+     * @param n the number of items down to go
      * @return the n'th item on the stack, zero relative
-     * @throws EmptyStackException  if there are not enough items on the
-     *  stack to satisfy this request
+     * @throws EmptyStackException if there are not enough items on the stack to satisfy this
+     *                             request
      */
     public Object peek(int n) throws EmptyStackException {
         int m = (size() - n) - 1;
@@ -106,7 +102,7 @@
      * Pops the top item off of this stack and return it.
      *
      * @return the top item on the stack
-     * @throws EmptyStackException  if the stack is empty
+     * @throws EmptyStackException if the stack is empty
      */
     public Object pop() throws EmptyStackException {
         int n = size();
@@ -118,10 +114,10 @@
     }
 
     /**
-     * Pushes a new item onto the top of this stack. The pushed item is also
-     * returned. This is equivalent to calling <code>add</code>.
+     * Pushes a new item onto the top of this stack. The pushed item is also returned. This is
+     * equivalent to calling <code>add</code>.
      *
-     * @param item  the item to be added
+     * @param item the item to be added
      * @return the item just pushed
      */
     public Object push(Object item) {
@@ -130,14 +126,12 @@
     }
 
     /**
-     * Returns the one-based position of the distance from the top that the
-     * specified object exists on this stack, where the top-most element is
-     * considered to be at distance <code>1</code>.  If the object is not
-     * present on the stack, return <code>-1</code> instead.  The
-     * <code>equals()</code> method is used to compare to the items
-     * in this stack.
+     * Returns the one-based position of the distance from the top that the specified object exists
+     * on this stack, where the top-most element is considered to be at distance <code>1</code>.  If
+     * the object is not present on the stack, return <code>-1</code> instead.  The
+     * <code>equals()</code> method is used to compare to the items in this stack.
      *
-     * @param object  the object to be searched for
+     * @param object the object to be searched for
      * @return the 1-based depth into the stack of the object, or -1 if not found
      */
     public int search(Object object) {
@@ -146,7 +140,7 @@
         while (i >= 0) {
             Object current = get(i);
             if ((object == null && current == null) ||
-                (object != null && object.equals(current))) {
+                    (object != null && object.equals(current))) {
                 return n;
             }
             i--;
@@ -159,7 +153,7 @@
      * Returns the element on the top of the stack.
      *
      * @return the element on the top of the stack
-     * @throws EmptyStackException  if the stack is empty
+     * @throws EmptyStackException if the stack is empty
      */
     public Object get() {
         int size = size();
@@ -173,7 +167,7 @@
      * Removes the element on the top of the stack.
      *
      * @return the removed element
-     * @throws EmptyStackException  if the stack is empty
+     * @throws EmptyStackException if the stack is empty
      */
     public Object remove() {
         int size = size();

Modified: webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/ADBSOAPModelBuilderTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/ADBSOAPModelBuilderTest.java?view=diff&rev=523794&r1=523793&r2=523794
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/ADBSOAPModelBuilderTest.java (original)
+++ webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/ADBSOAPModelBuilderTest.java Thu Mar 29 11:49:12 2007
@@ -67,7 +67,8 @@
         propertyList.add("Apache");
         QName projectQName = new QName("Person");
 
-        XMLStreamReader pullParser =new ADBXMLStreamReaderImpl(projectQName, propertyList.toArray(), null);
+        XMLStreamReader pullParser =
+                new ADBXMLStreamReaderImpl(projectQName, propertyList.toArray(), null);
         ADBSOAPModelBuilder builder = new ADBSOAPModelBuilder(
                 pullParser, OMAbstractFactory.getSOAP11Factory());
 
@@ -110,7 +111,7 @@
 
         String s2 = writer.toString();
 
-        assertXMLEqual(s2,xml);
+        assertXMLEqual(s2, xml);
     }
 
     private SOAPEnvelope getTestEnvelope() {
@@ -123,13 +124,14 @@
 
         ADBSOAPModelBuilder builder = new ADBSOAPModelBuilder(request
                 .getPullParser(CreateAccountRequest.MY_QNAME),
-                OMAbstractFactory.getSOAP11Factory());
+                                                              OMAbstractFactory.getSOAP11Factory());
 
         return builder.getEnvelope();
     }
 
     public void testConvertToDOOM2() throws Exception {
-        String xml = "<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\"><soapenv:Header /><soapenv:Body><ns1:createAccountRequest xmlns:ns1=\"http://www.wso2.com/types\"><ns1:clientinfo><name xmlns=\"\">bob</name><ssn xmlns=\"\">123456789</ssn></ns1:clientinfo><password xmlns=\"\">passwd</password></ns1:createAccountRequest></soapenv:Body></soapenv:Envelope>";
+        String xml =
+                "<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\"><soapenv:Header /><soapenv:Body><ns1:createAccountRequest xmlns:ns1=\"http://www.wso2.com/types\"><ns1:clientinfo><name xmlns=\"\">bob</name><ssn xmlns=\"\">123456789</ssn></ns1:clientinfo><password xmlns=\"\">passwd</password></ns1:createAccountRequest></soapenv:Body></soapenv:Envelope>";
 
         CreateAccountRequest request = new CreateAccountRequest();
         ClientInfo clientInfo = new ClientInfo();
@@ -140,11 +142,14 @@
 
         ADBSOAPModelBuilder builder = new ADBSOAPModelBuilder(request
                 .getPullParser(CreateAccountRequest.MY_QNAME),
-                OMAbstractFactory.getSOAP11Factory());
+                                                              OMAbstractFactory.getSOAP11Factory());
 
         SOAPEnvelope env = builder.getEnvelope();
 
-        StAXSOAPModelBuilder builder2 = new StAXSOAPModelBuilder(getTestEnvelope().getXMLStreamReaderWithoutCaching(), DOOMAbstractFactory.getSOAP11Factory(), SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);
+        StAXSOAPModelBuilder builder2 = new StAXSOAPModelBuilder(
+                getTestEnvelope().getXMLStreamReaderWithoutCaching(),
+                DOOMAbstractFactory.getSOAP11Factory(),
+                SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);
         SOAPEnvelope envelope = builder2.getSOAPEnvelope();
         envelope.build();
 

Modified: webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/ClientInfo.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/ClientInfo.java?view=diff&rev=523794&r1=523793&r2=523794
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/ClientInfo.java (original)
+++ webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/ClientInfo.java Thu Mar 29 11:49:12 2007
@@ -23,9 +23,7 @@
 
 package org.apache.axis2.databinding;
 
-/**
- * ClientInfo bean class
- */
+/** ClientInfo bean class */
 
 public class ClientInfo
         implements org.apache.axis2.databinding.ADBBean {
@@ -43,9 +41,7 @@
     public ClientInfo() {
     }
 
-    /**
-     * field for Name
-     */
+    /** field for Name */
     protected java.lang.String localName;
 
 
@@ -70,9 +66,7 @@
     }
 
 
-    /**
-     * field for Ssn
-     */
+    /** field for Ssn */
     protected java.lang.String localSsn;
 
 
@@ -97,9 +91,7 @@
     }
 
 
-    /**
-     * databinding method to get an XML representation of this object
-     */
+    /** databinding method to get an XML representation of this object */
     public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName) {
 
 
@@ -108,11 +100,12 @@
 
 
         elementList.add(new javax.xml.namespace.QName("http://www.wso2.com/types",
-                "name"));
-        elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localName));
+                                                      "name"));
+        elementList
+                .add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localName));
 
         elementList.add(new javax.xml.namespace.QName("http://www.wso2.com/types",
-                "ssn"));
+                                                      "ssn"));
         elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localSsn));
 
 
@@ -122,14 +115,11 @@
 
     }
 
-    /**
-     * Factory class that keeps the parse method
-     */
+    /** Factory class that keeps the parse method */
     public static class Factory {
-        /**
-         * static method to create the object
-         */
-        public static ClientInfo parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception {
+        /** static method to create the object */
+        public static ClientInfo parse(javax.xml.stream.XMLStreamReader reader)
+                throws java.lang.Exception {
             ClientInfo object = new ClientInfo();
             try {
                 int event = reader.getEventType();
@@ -150,7 +140,8 @@
 
                             String content = reader.getElementText();
                             object.setName(
-                                    org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
+                                    org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
+                                            content));
                             count++;
 
 
@@ -161,7 +152,8 @@
 
                             String content = reader.getElementText();
                             object.setSsn(
-                                    org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
+                                    org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
+                                            content));
                             count++;
 
 

Modified: webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/CreateAccountRequest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/CreateAccountRequest.java?view=diff&rev=523794&r1=523793&r2=523794
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/CreateAccountRequest.java (original)
+++ webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/CreateAccountRequest.java Thu Mar 29 11:49:12 2007
@@ -23,9 +23,7 @@
 
 package org.apache.axis2.databinding;
 
-/**
- * CreateAccountRequest bean class
- */
+/** CreateAccountRequest bean class */
 
 public class CreateAccountRequest implements
         org.apache.axis2.databinding.ADBBean {
@@ -33,14 +31,12 @@
     public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName(
             "http://www.wso2.com/types", "createAccountRequest", "ns1");
 
-    /**
-     * field for ClientInfo
-     */
+    /** field for ClientInfo */
     protected ClientInfo localClientInfo;
 
     /**
      * Auto generated getter method
-     * 
+     *
      * @return com.wso2.www.types.ClientInfo
      */
     public ClientInfo getClientInfo() {
@@ -49,23 +45,20 @@
 
     /**
      * Auto generated setter method
-     * 
-     * @param param
-     *            ClientInfo
+     *
+     * @param param ClientInfo
      */
     public void setClientInfo(ClientInfo param) {
 
         this.localClientInfo = param;
     }
 
-    /**
-     * field for Password
-     */
+    /** field for Password */
     protected java.lang.String localPassword;
 
     /**
      * Auto generated getter method
-     * 
+     *
      * @return java.lang.String
      */
     public java.lang.String getPassword() {
@@ -74,19 +67,15 @@
 
     /**
      * Auto generated setter method
-     * 
-     * @param param
-     *            Password
+     *
+     * @param param Password
      */
     public void setPassword(java.lang.String param) {
 
         this.localPassword = param;
     }
 
-    /**
-     * databinding method to get an XML representation of this object
-     * 
-     */
+    /** databinding method to get an XML representation of this object */
     public javax.xml.stream.XMLStreamReader getPullParser(
             javax.xml.namespace.QName qName) {
 
@@ -107,13 +96,9 @@
 
     }
 
-    /**
-     * Factory class that keeps the parse method
-     */
+    /** Factory class that keeps the parse method */
     public static class Factory {
-        /**
-         * static method to create the object
-         */
+        /** static method to create the object */
         public static CreateAccountRequest parse(
                 javax.xml.stream.XMLStreamReader reader)
                 throws java.lang.Exception {

Modified: webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/utils/ConverterUtilTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/utils/ConverterUtilTest.java?view=diff&rev=523794&r1=523793&r2=523794
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/utils/ConverterUtilTest.java (original)
+++ webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/utils/ConverterUtilTest.java Thu Mar 29 11:49:12 2007
@@ -2,10 +2,13 @@
 
 import junit.framework.TestCase;
 
-import java.util.*;
 import java.math.BigInteger;
-import java.lang.reflect.Array;
 import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+import java.util.TimeZone;
 /*
  * Copyright 2004,2005 The Apache Software Foundation.
  *
@@ -24,9 +27,7 @@
 
 public class ConverterUtilTest extends TestCase {
 
-    /**
-     * Test conversion of Big Integer
-     */
+    /** Test conversion of Big Integer */
     public void testBigInteger() {
         List l = new ArrayList();
         l.add("23445");
@@ -42,9 +43,7 @@
 
     }
 
-    /**
-     * integer arrays
-     */
+    /** integer arrays */
     public void testInt() {
         List l = new ArrayList();
         l.add("23445");
@@ -60,9 +59,7 @@
 
     }
 
-    /**
-     * boolean arrays
-     */
+    /** boolean arrays */
     public void testBool() {
         List l = new ArrayList();
         l.add("true");
@@ -118,13 +115,13 @@
 
     }
 
-    public void testConvertToDateString(){
+    public void testConvertToDateString() {
         Date date = new Date();
         String dateString = ConverterUtil.convertToString(date);
         System.out.println("Date ==> " + dateString);
     }
 
-    public void testConvertToDate(){
+    public void testConvertToDate() {
 
         Date date;
         SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd Z");

Modified: webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/utils/NamedStaxOMBuilderTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/utils/NamedStaxOMBuilderTest.java?view=diff&rev=523794&r1=523793&r2=523794
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/utils/NamedStaxOMBuilderTest.java (original)
+++ webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/utils/NamedStaxOMBuilderTest.java Thu Mar 29 11:49:12 2007
@@ -6,7 +6,6 @@
 import org.apache.axis2.util.StreamWrapper;
 
 import javax.xml.namespace.QName;
-import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamReader;
 import java.io.StringReader;
 /*
@@ -27,36 +26,34 @@
 
 public class NamedStaxOMBuilderTest extends TestCase {
 
-    public void testNamedOMBuilder() throws Exception{
+    public void testNamedOMBuilder() throws Exception {
 
-        String xmlDoc="<wrapper><myIntVal>200</myIntVal></wrapper>";
+        String xmlDoc = "<wrapper><myIntVal>200</myIntVal></wrapper>";
         XMLStreamReader reader = StAXUtils.createXMLStreamReader(
                 new StringReader(xmlDoc));
 
-        NamedStaxOMBuilder  sm = new NamedStaxOMBuilder(reader,new QName("wrapper"));
+        NamedStaxOMBuilder sm = new NamedStaxOMBuilder(reader, new QName("wrapper"));
         OMElement elt = sm.getOMElement();
 
         assertNotNull(elt);
-        assertEquals(elt.getLocalName(),"wrapper");
-
-
+        assertEquals(elt.getLocalName(), "wrapper");
 
 
     }
 
-    public void testNamedOMBuilder1() throws Exception{
+    public void testNamedOMBuilder1() throws Exception {
 
-        String xmlDoc="<wrapper><myIntVal>200</myIntVal></wrapper>";
+        String xmlDoc = "<wrapper><myIntVal>200</myIntVal></wrapper>";
         XMLStreamReader reader = StAXUtils.createXMLStreamReader(
                 new StringReader(xmlDoc));
 
         //move upto the  myIntVal start element first
         boolean done = false;
         QName nameToMatch = new QName("myIntVal");
-        while(!done){
-            if (reader.isStartElement() && nameToMatch.equals(reader.getName())){
+        while (!done) {
+            if (reader.isStartElement() && nameToMatch.equals(reader.getName())) {
                 done = true;
-            }else{
+            } else {
                 reader.next();
             }
         }
@@ -65,14 +62,12 @@
         //they expect the *next* event to be the start element (not the
         //current one) So we need the wrapper to simulate a full fledged
         //
-        NamedStaxOMBuilder  sm = new NamedStaxOMBuilder(
-                new StreamWrapper(reader),nameToMatch);
+        NamedStaxOMBuilder sm = new NamedStaxOMBuilder(
+                new StreamWrapper(reader), nameToMatch);
         OMElement elt = sm.getOMElement();
 
         assertNotNull(elt);
-        assertEquals(elt.getLocalName(),"myIntVal");
-
-
+        assertEquals(elt.getLocalName(), "myIntVal");
 
 
     }

Modified: webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/utils/PrintEvents.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/utils/PrintEvents.java?view=diff&rev=523794&r1=523793&r2=523794
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/utils/PrintEvents.java (original)
+++ webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/utils/PrintEvents.java Thu Mar 29 11:49:12 2007
@@ -57,8 +57,8 @@
                 int start = xmlr.getTextStart();
                 int length = xmlr.getTextLength();
                 System.out.print(new String(xmlr.getTextCharacters(),
-                        start,
-                        length));
+                                            start,
+                                            length));
                 break;
 
             case XMLStreamConstants.PROCESSING_INSTRUCTION:
@@ -73,8 +73,8 @@
                 start = xmlr.getTextStart();
                 length = xmlr.getTextLength();
                 System.out.print(new String(xmlr.getTextCharacters(),
-                        start,
-                        length));
+                                            start,
+                                            length));
                 System.out.print("]]>");
                 break;
 

Modified: webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/utils/SimpleArrayReaderStateMachineTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/utils/SimpleArrayReaderStateMachineTest.java?view=diff&rev=523794&r1=523793&r2=523794
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/utils/SimpleArrayReaderStateMachineTest.java (original)
+++ webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/utils/SimpleArrayReaderStateMachineTest.java Thu Mar 29 11:49:12 2007
@@ -1,15 +1,13 @@
 package org.apache.axis2.databinding.utils;
 
 import junit.framework.TestCase;
+import org.apache.axiom.om.util.StAXUtils;
 
 import javax.xml.namespace.QName;
-import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamConstants;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
 import java.io.StringReader;
-
-import org.apache.axiom.om.util.StAXUtils;
 /*
  * Copyright 2004,2005 The Apache Software Foundation.
  *
@@ -28,12 +26,13 @@
 
 public class SimpleArrayReaderStateMachineTest extends TestCase {
 
-    public void testStateMachine() throws Exception{
-        String xmlDoc="<wrapper><myIntVal>200</myIntVal><myIntVal>200</myIntVal><myIntVal>200</myIntVal>" +
-                "<myIntVal>200</myIntVal><myIntVal>200</myIntVal><myIntVal>200</myIntVal></wrapper>";
+    public void testStateMachine() throws Exception {
+        String xmlDoc =
+                "<wrapper><myIntVal>200</myIntVal><myIntVal>200</myIntVal><myIntVal>200</myIntVal>" +
+                        "<myIntVal>200</myIntVal><myIntVal>200</myIntVal><myIntVal>200</myIntVal></wrapper>";
         XMLStreamReader reader = StAXUtils.createXMLStreamReader(
                 new StringReader(xmlDoc));
-        SimpleArrayReaderStateMachine  sm = new SimpleArrayReaderStateMachine();
+        SimpleArrayReaderStateMachine sm = new SimpleArrayReaderStateMachine();
         sm.setElementNameToTest(new QName("myIntVal"));
         try {
             sm.read(reader);
@@ -41,25 +40,27 @@
             e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
         }
 
-        assertEquals(6,sm.getTextArray().length);
+        assertEquals(6, sm.getTextArray().length);
 
     }
 
-    public void testStateMachine3() throws Exception{
-        String xmlDoc="<wrapper><myIntVal>200</myIntVal><myIntVal>200</myIntVal><myIntVal>200</myIntVal>" +
-                "<myIntVal>200</myIntVal><myIntVal>200</myIntVal><myIntVal>200</myIntVal></wrapper>";
+    public void testStateMachine3() throws Exception {
+        String xmlDoc =
+                "<wrapper><myIntVal>200</myIntVal><myIntVal>200</myIntVal><myIntVal>200</myIntVal>" +
+                        "<myIntVal>200</myIntVal><myIntVal>200</myIntVal><myIntVal>200</myIntVal></wrapper>";
         XMLStreamReader reader = StAXUtils.createXMLStreamReader(
                 new StringReader(xmlDoc));
 
-        while(reader.hasNext()){
+        while (reader.hasNext()) {
             int event = reader.next();
-            if (event== XMLStreamConstants.START_ELEMENT && "myIntVal".equals(reader.getLocalName())){
+            if (event == XMLStreamConstants.START_ELEMENT &&
+                    "myIntVal".equals(reader.getLocalName())) {
                 break;
             }
 
         }
 
-        SimpleArrayReaderStateMachine  sm = new SimpleArrayReaderStateMachine();
+        SimpleArrayReaderStateMachine sm = new SimpleArrayReaderStateMachine();
         sm.setElementNameToTest(new QName("myIntVal"));
         try {
             sm.read(reader);
@@ -67,15 +68,15 @@
             e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
         }
 
-        assertEquals(6,sm.getTextArray().length);
+        assertEquals(6, sm.getTextArray().length);
 
     }
 
-    public void testStateMachine2() throws Exception{
-        String xmlDoc="<wrapper><myIntVal>200</myIntVal></wrapper>";
+    public void testStateMachine2() throws Exception {
+        String xmlDoc = "<wrapper><myIntVal>200</myIntVal></wrapper>";
         XMLStreamReader reader = StAXUtils.createXMLStreamReader(
                 new StringReader(xmlDoc));
-        SimpleArrayReaderStateMachine  sm = new SimpleArrayReaderStateMachine();
+        SimpleArrayReaderStateMachine sm = new SimpleArrayReaderStateMachine();
         sm.setElementNameToTest(new QName("myIntVal"));
         try {
             sm.read(reader);
@@ -83,14 +84,14 @@
             e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
         }
 
-        assertEquals("200",sm.getTextArray()[0]);
+        assertEquals("200", sm.getTextArray()[0]);
     }
 
-     public void testStateMachineEmptyArray() throws Exception{
-        String xmlDoc="<wrapper></wrapper>";
+    public void testStateMachineEmptyArray() throws Exception {
+        String xmlDoc = "<wrapper></wrapper>";
         XMLStreamReader reader = StAXUtils.createXMLStreamReader(
                 new StringReader(xmlDoc));
-        SimpleArrayReaderStateMachine  sm = new SimpleArrayReaderStateMachine();
+        SimpleArrayReaderStateMachine sm = new SimpleArrayReaderStateMachine();
         sm.setElementNameToTest(new QName("myIntVal"));
         try {
             sm.read(reader);
@@ -98,7 +99,7 @@
 
         }
 
-        assertEquals(0,sm.getTextArray().length);
+        assertEquals(0, sm.getTextArray().length);
 
 
     }

Modified: webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/utils/SimpleElementReaderStateMachineTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/utils/SimpleElementReaderStateMachineTest.java?view=diff&rev=523794&r1=523793&r2=523794
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/utils/SimpleElementReaderStateMachineTest.java (original)
+++ webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/utils/SimpleElementReaderStateMachineTest.java Thu Mar 29 11:49:12 2007
@@ -1,14 +1,12 @@
 package org.apache.axis2.databinding.utils;
 
 import junit.framework.TestCase;
+import org.apache.axiom.om.util.StAXUtils;
 
 import javax.xml.namespace.QName;
-import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
 import java.io.StringReader;
-
-import org.apache.axiom.om.util.StAXUtils;
 /*
  * Copyright 2004,2005 The Apache Software Foundation.
  *
@@ -27,11 +25,11 @@
 
 public class SimpleElementReaderStateMachineTest extends TestCase {
 
-    public void testStateMachine() throws Exception{
-        String xmlDoc="<myIntVal>200</myIntVal>";
+    public void testStateMachine() throws Exception {
+        String xmlDoc = "<myIntVal>200</myIntVal>";
         XMLStreamReader reader = StAXUtils.createXMLStreamReader(
                 new StringReader(xmlDoc));
-        SimpleElementReaderStateMachine  sm = new SimpleElementReaderStateMachine();
+        SimpleElementReaderStateMachine sm = new SimpleElementReaderStateMachine();
         sm.setElementNameToTest(new QName("myIntVal"));
         try {
             sm.read(reader);
@@ -39,14 +37,14 @@
             e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
         }
 
-        assertEquals("200",sm.getText());
+        assertEquals("200", sm.getText());
     }
 
-     public void testStateMachine2() throws Exception{
-        String xmlDoc="<wrapper><myIntVal>200</myIntVal></wrapper>";
+    public void testStateMachine2() throws Exception {
+        String xmlDoc = "<wrapper><myIntVal>200</myIntVal></wrapper>";
         XMLStreamReader reader = StAXUtils.createXMLStreamReader(
                 new StringReader(xmlDoc));
-        SimpleElementReaderStateMachine  sm = new SimpleElementReaderStateMachine();
+        SimpleElementReaderStateMachine sm = new SimpleElementReaderStateMachine();
         sm.setElementNameToTest(new QName("myIntVal"));
         try {
             sm.read(reader);
@@ -54,14 +52,14 @@
             e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
         }
 
-        assertEquals("200",sm.getText());
+        assertEquals("200", sm.getText());
     }
 
-     public void testStateMachine3() throws Exception{
-        String xmlDoc="<myIntVal>200<a/></myIntVal>";
+    public void testStateMachine3() throws Exception {
+        String xmlDoc = "<myIntVal>200<a/></myIntVal>";
         XMLStreamReader reader = StAXUtils.createXMLStreamReader(
                 new StringReader(xmlDoc));
-        SimpleElementReaderStateMachine  sm = new SimpleElementReaderStateMachine();
+        SimpleElementReaderStateMachine sm = new SimpleElementReaderStateMachine();
         sm.setElementNameToTest(new QName("myIntVal"));
         try {
             sm.read(reader);



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