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 de...@apache.org on 2007/02/06 11:19:36 UTC

svn commit: r504063 - in /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2: client/ context/ description/

Author: deepal
Date: Tue Feb  6 02:19:35 2007
New Revision: 504063

URL: http://svn.apache.org/viewvc?view=rev&rev=504063
Log:
I went through the code base and found the following issues in the code base , I fixed few of them and please fix the rest.

- operationContext.getServiceContext will always return ServiceContext so no need to cast
- If you are not using a varible pls remove that
 - If  needsToBeReconciled  is a boolean variable then we do not need to check that as follows 
       i f (needsToBeReconciled == false)
- By default java assign NULL value to any object so following code not that useful
  ConfigurationContext activeCC = null
- What is the use of following 
   MessageContext value = (MessageContext) workingSet.get((Object)keyObj);
 As I know any object in Java is drive from Object class , so no need to cast to Object class

- Removed a number of unused variables from MC
- When you do smt like following 
   "key ["+(String)key+"]";
  Its automatically call , key.toString(); so you do not need to cast that to String (Why do we do , smt that compiler suppose to do )
- Have a look at the following condition checking , seems very funny :) , if the operationContext  is null you can not come to the second condition checking.
    if (operationContext != null) {
            if ((operationContext!=null) && (serviceContext != null) && (operationContext.getParent() == null)) {
                operationContext.setParent(serviceContext);
            }
- Pls pls do not use StringTokenizer it is very slow , use String.split
- If you do not know how to write code , pls do not do so
- What is the meaning of calling
  String key ="smt";
  key.toString();
- Very nice coding
   qnameAsString = "NULL";
  Why dont you use 
   qnameAsString = null;
- Everyone knows that LinkedList extend from Collection class so why do we need the following line
    ArrayList tmpMetaDataList = new ArrayList((Collection)metaDataEntries);
- Look at the following
    if (mdObj.isListEmpty() == false)
    {
                            tmpHasList = "has list";
     }
   (This is not acceptable in Axis2 code base , pls pls remove that)
- What are you trying to achive from the following line of code
   amTmpName = new String(ObjectStateUtils.EMPTY_MARKER);
- No , I do not keep the following in Axis2 code base (sorry guys)
                String tmpClassNameStr = "null";
                String tmpQNameAsStr   = "null";
- Pls careful look at the following code  (Whats wrong with that :)  , I know Java is smart enough to compile this code )
            ServiceGroupContext existingSGC = null;

            ServiceGroupContext sgc = cc.getServiceGroupContext(groupName);

            if (existingSGC == null)
            {
                // could not find an existing ServiceGroupContext
                // use the restored object
                metaParent.activate(cc);

                // set parent 
                this.setParent(metaParent);
            }

Modified:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/Options.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/OperationContext.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ServiceContext.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ServiceGroupContext.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/Options.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/Options.java?view=diff&rev=504063&r1=504062&r2=504063
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/Options.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/Options.java Tue Feb  6 02:19:35 2007
@@ -1027,11 +1027,11 @@
         //           the class name
         //           the active or empty flag
         //           the data length, if appropriate
-        //           the data   
+        //           the data
 
         //---------------------------------------------------------
-        // in order to handle future changes to the message 
-        // context definition, be sure to maintain the 
+        // in order to handle future changes to the message
+        // context definition, be sure to maintain the
         // object level identifiers
         //---------------------------------------------------------
         // serialization version ID
@@ -1067,7 +1067,7 @@
         // String messageId
         ObjectStateUtils.writeString(out, messageId, logCorrelationIDString + ".messageId");
 
-        // String object id 
+        // String object id
         ObjectStateUtils.writeString(out, logCorrelationIDString, logCorrelationIDString + ".logCorrelationIDString");
 
         //---------------------------------------------------------
@@ -1083,7 +1083,7 @@
             ObjectStateUtils.writeObject(out, faultTo, logCorrelationIDString + ".faultTo");
         }
         catch (Exception e1) {
-            // note that the utility class will provide the trace for the 
+            // note that the utility class will provide the trace for the
             // exception so we won't have to
             // so just consume the exception for now
         }
@@ -1093,7 +1093,7 @@
             ObjectStateUtils.writeObject(out, from, logCorrelationIDString + ".from");
         }
         catch (Exception e2) {
-            // note that the utility class will provide the trace for the 
+            // note that the utility class will provide the trace for the
             // exception so we won't have to
             // so just consume the exception for now
         }
@@ -1103,7 +1103,7 @@
             ObjectStateUtils.writeObject(out, replyTo, logCorrelationIDString + ".replyTo");
         }
         catch (Exception e3) {
-            // note that the utility class will provide the trace for the 
+            // note that the utility class will provide the trace for the
             // exception so we won't have to
             // so just consume the exception for now
         }
@@ -1113,7 +1113,7 @@
             ObjectStateUtils.writeObject(out, to, logCorrelationIDString + ".to");
         }
         catch (Exception e4) {
-            // note that the utility class will provide the trace for the 
+            // note that the utility class will provide the trace for the
             // exception so we won't have to
             // so just consume the exception for now
         }
@@ -1146,7 +1146,7 @@
         // collections and lists
         //---------------------------------------------------------
 
-        // List relationships, which is an array of RelatesTo objects 
+        // List relationships, which is an array of RelatesTo objects
         ArrayList tmp = null;
 
         if (relationships != null) {
@@ -1177,7 +1177,7 @@
             ObjectStateUtils.writeObject(out, parent, logCorrelationIDString + ".parent");
         }
         catch (Exception e5) {
-            // note that the utility class will provide the trace for the 
+            // note that the utility class will provide the trace for the
             // exception so we won't have to
             // so just consume the exception for now
         }
@@ -1248,7 +1248,7 @@
         // String messageId
         messageId = ObjectStateUtils.readString(in, "Options.messageId");
 
-        // String object id 
+        // String object id
         logCorrelationIDString = ObjectStateUtils.readString(in, "Options.logCorrelationIDString");
 
         // trace point
@@ -1289,7 +1289,7 @@
         // collections and lists
         //---------------------------------------------------------
 
-        // List relationships, which is an array of RelatesTo objects 
+        // List relationships, which is an array of RelatesTo objects
         ArrayList tmpAL1 = ObjectStateUtils.readArrayList(in, "Options.relationships");
         if (tmpAL1 != null) {
             relationships = new ArrayList(tmpAL1);
@@ -1347,7 +1347,7 @@
      */
     public void activate(ConfigurationContext cc) {
         // see if there's any work to do
-        if (needsToBeReconciled == false) {
+        if (!needsToBeReconciled) {
             // return quick
             return;
         }
@@ -1355,7 +1355,7 @@
         String logCorrelationIDString = getLogCorrelationIDString();
         // use the supplied configuration context
 
-        // get the axis configuration 
+        // get the axis configuration
         AxisConfiguration axisConfig = cc.getAxisConfiguration();
 
         // We previously saved metaTransportIn; restore it
@@ -1412,8 +1412,6 @@
         if (metaListener != null) {
             // see if we can find an existing object
             String listenerClass = metaListener.getClassName();
-            TransportListener tmpListener = ObjectStateUtils.findTransportListener(axisConfig, listenerClass);
-
             log.trace(logCorrelationIDString + "activate():  TransportListener found for [" + listenerClass + "] ");
         } else {
             listener = null;
@@ -1572,8 +1570,8 @@
         if ((this.properties != null) && (obj.getProperties() != null)) {
             if (!this.properties.equals(obj.getProperties())) {
                 // This is a strict test.
-                // Returns true if the given object is also a map 
-                // and the two maps represent the same mappings. 
+                // Returns true if the given object is also a map
+                // and the two maps represent the same mappings.
                 return false;
             }
         } else if ((this.properties == null) && (obj.getProperties() == null)) {

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java?view=diff&rev=504063&r1=504062&r2=504063
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java Tue Feb  6 02:19:35 2007
@@ -63,14 +63,12 @@
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.LinkedHashMap;
 import java.util.LinkedList;
 import java.util.Map;
-import java.util.StringTokenizer;
 
 /**
  * MessageContext holds service specific state information.
@@ -455,24 +453,6 @@
     private transient MetaDataEntry metaAxisServiceGroup = null;
 
     /**
-     * The OperationContext metadata will be used during
-     * activate to finish restoring the object
-     */
-    private transient OperationContext metaOperationContext = null;
-
-    /**
-     * The ServiceContext metadata will be used during
-     * activate to finish restoring the object, if needed
-     */
-    private transient ServiceContext metaServiceContext = null;
-
-    /**
-     * The ServiceGroupContext metadata will be used during
-     * activate to finish restoring the object, if needed
-     */
-    private transient ServiceGroupContext metaServiceGroupContext = null;
-
-    /**
      * The TransportOutDescription metadata will be used during
      * activate to match up with an existing object
      */
@@ -1319,7 +1299,7 @@
         this.setParent(operationContext);
 
         if (operationContext != null) {
-            if ((operationContext != null) && (serviceContext != null) && (operationContext.getParent() == null)) {
+            if ((serviceContext != null) && (operationContext.getParent() == null)) {
                 operationContext.setParent(serviceContext);
             }
 
@@ -1647,17 +1627,6 @@
     }
 
     /**
-     * Get the class name from the key generated by generateSelfManagedDataKey()
-     *
-     * @param key The key
-     * @return The class name
-     */
-    private String getClassNameFromSelfManagedDataKey(String key) {
-        StringTokenizer tokenizer = new StringTokenizer(key, selfManagedDataDelimiter);
-        return tokenizer.nextToken();
-    }
-
-    /**
      * Add a key-value pair of self managed data to the set associated with
      * this message context.
      * <p/>
@@ -1700,10 +1669,8 @@
      * @return TRUE if the key exists, FALSE otherwise
      */
     public boolean containsSelfManagedDataKey(Class clazz, Object key) {
-        if (selfManagedDataMap != null) {
-            return selfManagedDataMap.containsKey(generateSelfManagedDataKey(clazz, key));
-        }
-        return false;
+        return selfManagedDataMap != null && selfManagedDataMap.containsKey
+                (generateSelfManagedDataKey(clazz, key));
     }
 
     /**
@@ -1757,7 +1724,7 @@
                 Object key = it2.next();
                 Handler value = (Handler) map.get(key);
                 String name = value.getName();
-                log.trace(getLogIDString() + ":flattenPhaseListToHandlers():  key [" + (String) key + "]    handler name [" + name + "]");
+                log.trace(getLogIDString() + ":flattenPhaseListToHandlers():  key [" +  key + "]    handler name [" + name + "]");
             }
         }
 
@@ -1886,7 +1853,7 @@
                 if (SelfManagedDataManager.class.isAssignableFrom(handler.getClass())) {
                     // only call the handler's serializeSelfManagedData if it implements SelfManagedDataManager
 
-                    log.trace("MessageContext:serializeSelfManagedDataHelper(): calling handler  [" + handler.getClass().getName() + "]  name [" + handler.getName().toString() + "]   serializeSelfManagedData method");
+                    log.trace("MessageContext:serializeSelfManagedDataHelper(): calling handler  [" + handler.getClass().getName() + "]  name [" + handler.getName() + "]   serializeSelfManagedData method");
 
                     ByteArrayOutputStream baos_fromHandler = ((SelfManagedDataManager) handler).serializeSelfManagedData(this);
 
@@ -1894,12 +1861,12 @@
                         baos_fromHandler.close();
 
                         try {
-                            SelfManagedDataHolder selfManagedDataHolder = new SelfManagedDataHolder(handler.getClass().getName(), handler.getName().toString(), baos_fromHandler.toByteArray());
+                            SelfManagedDataHolder selfManagedDataHolder = new SelfManagedDataHolder(handler.getClass().getName(), handler.getName(), baos_fromHandler.toByteArray());
                             selfManagedDataHolderList.add(selfManagedDataHolder);
                             selfManagedDataHandlerCount++;
                         }
                         catch (Exception exc) {
-                            log.trace("MessageContext:serializeSelfManagedData(): exception [" + exc.getClass().getName() + "][" + exc.getMessage() + "]  in setting up SelfManagedDataHolder object for [" + handler.getClass().getName() + " / " + handler.getName().toString() + "] ", exc);
+                            log.trace("MessageContext:serializeSelfManagedData(): exception [" + exc.getClass().getName() + "][" + exc.getMessage() + "]  in setting up SelfManagedDataHolder object for [" + handler.getClass().getName() + " / " + handler.getName() + "] ", exc);
                         }
                     }
                 }
@@ -1937,7 +1904,7 @@
                 if (handler instanceof Phase) {
                     handler_toreturn = deserialize_getHandlerFromExecutionChain(((Phase) handler).getHandlers().iterator(), classname, qNameAsString);
                 } else if ((handler.getClass().getName().equals(classname))
-                        && (handler.getName().toString().equals(qNameAsString))) {
+                        && (handler.getName().equals(qNameAsString))) {
                     handler_toreturn = (SelfManagedDataManager) handler;
                 }
             }
@@ -2201,7 +2168,6 @@
             // put the metadata on each member of the list into a buffer
 
             // match the current index with the actual saved list
-            int executionChainEntry = 0;
             int nextIndex = 0;
 
             Iterator i = executionChain.iterator();
@@ -2209,24 +2175,22 @@
             while (i.hasNext()) {
                 Object obj = i.next();
                 String objClass = obj.getClass().getName();
-                int objClassLength = objClass.length();
-
                 // start the meta data entry for this object
                 MetaDataEntry mdEntry = new MetaDataEntry();
                 mdEntry.setClassName(objClass);
 
                 // get the correct object-specific name
-                String qnameAsString = null;
+                String qnameAsString ;
 
                 if (obj instanceof Phase) {
                     Phase phaseObj = (Phase) obj;
-                    qnameAsString = phaseObj.getName().toString();
+                    qnameAsString = phaseObj.getName();
 
                     // add the list of handlers to the meta data
                     setupPhaseList(phaseObj, mdEntry);
                 } else if (obj instanceof Handler) {
                     Handler handlerObj = (Handler) obj;
-                    qnameAsString = handlerObj.getName().toString();
+                    qnameAsString = handlerObj.getName();
                 } else {
                     // TODO: will there be any other kinds of objects in the execution Chain?
                     qnameAsString = "NULL";
@@ -2235,7 +2199,6 @@
                 mdEntry.setQName(qnameAsString);
 
                 // update the index for the entry in the chain
-                executionChainEntry++;
 
                 log.trace(logCorrelationIDString + ":writeExternal(): ***BEFORE OBJ WRITE*** executionChain entry class [" + objClass + "] qname [" + qnameAsString + "]");
 
@@ -2318,24 +2281,22 @@
             while (inIterator.hasNext()) {
                 Object inObj = inIterator.next();
                 String inObjClass = inObj.getClass().getName();
-                int inObjClassLength = inObjClass.length();
-
                 // start the meta data entry for this object
                 MetaDataEntry inMdEntry = new MetaDataEntry();
                 inMdEntry.setClassName(inObjClass);
 
                 // get the correct object-specific name
-                String inQnameAsString = null;
+                String inQnameAsString ;
 
                 if (inObj instanceof Phase) {
                     Phase inPhaseObj = (Phase) inObj;
-                    inQnameAsString = inPhaseObj.getName().toString();
+                    inQnameAsString = inPhaseObj.getName();
 
                     // add the list of handlers to the meta data
                     setupPhaseList(inPhaseObj, inMdEntry);
                 } else if (inObj instanceof Handler) {
                     Handler inHandlerObj = (Handler) inObj;
-                    inQnameAsString = inHandlerObj.getName().toString();
+                    inQnameAsString = inHandlerObj.getName();
                 } else {
                     // TODO: will there be any other kinds of objects in the list
                     inQnameAsString = "NULL";
@@ -2353,7 +2314,10 @@
                 // will be attempted
                 inExecNextIndex++;
 
-                log.trace(logCorrelationIDString + ":writeExternal(): ***AFTER Inbound Executed List OBJ WRITE*** inboundExecutedPhases entry class [" + inObjClass + "] qname [" + inQnameAsString + "]");
+                log.trace(logCorrelationIDString + ":writeExternal(): " +
+                        "***AFTER Inbound Executed List OBJ WRITE*** " +
+                        "inboundExecutedPhases entry class [" + inObjClass + "] " +
+                        "qname [" + inQnameAsString + "]");
 
             } // end while entries in execution chain
 
@@ -2425,24 +2389,22 @@
             while (outIterator.hasNext()) {
                 Object outObj = outIterator.next();
                 String outObjClass = outObj.getClass().getName();
-                int outObjClassLength = outObjClass.length();
-
                 // start the meta data entry for this object
                 MetaDataEntry outMdEntry = new MetaDataEntry();
                 outMdEntry.setClassName(outObjClass);
 
                 // get the correct object-specific name
-                String outQnameAsString = null;
+                String outQnameAsString;
 
                 if (outObj instanceof Phase) {
                     Phase outPhaseObj = (Phase) outObj;
-                    outQnameAsString = outPhaseObj.getName().toString();
+                    outQnameAsString = outPhaseObj.getName();
 
                     // add the list of handlers to the meta data
                     setupPhaseList(outPhaseObj, outMdEntry);
                 } else if (outObj instanceof Handler) {
                     Handler outHandlerObj = (Handler) outObj;
-                    outQnameAsString = outHandlerObj.getName().toString();
+                    outQnameAsString = outHandlerObj.getName();
                 } else {
                     // TODO: will there be any other kinds of objects in the list
                     outQnameAsString = "NULL";
@@ -2559,7 +2521,7 @@
             out.writeBoolean(ObjectStateUtils.EMPTY_OBJECT);
         } else {
             out.writeBoolean(ObjectStateUtils.ACTIVE_OBJECT);
-            metaAxisService = new MetaDataEntry(axisService.getClass().getName(), axisService.getName().toString());
+            metaAxisService = new MetaDataEntry(axisService.getClass().getName(), axisService.getName());
             ObjectStateUtils.writeObject(out, metaAxisService, logCorrelationIDString + ".metaAxisService");
         }
 
@@ -2674,7 +2636,7 @@
             String amTmpName = axisMessage.getName();
 
             if (amTmpName == null) {
-                amTmpName = new String(ObjectStateUtils.EMPTY_MARKER);
+                amTmpName = ObjectStateUtils.EMPTY_MARKER;
                 axisMessage.setName(amTmpName);
             }
 
@@ -2739,7 +2701,7 @@
 
         HashMap tmpHashMap = null;
 
-        if ((tmpMap != null) && (tmpMap.isEmpty() == false)) {
+        if ((tmpMap != null) && (!tmpMap.isEmpty())) {
             tmpHashMap = new HashMap(tmpMap);
         }
 
@@ -2845,7 +2807,7 @@
         // message
         //---------------------------------------------------------
 
-        String msgDesc = in.readUTF();
+        in.readUTF();
         boolean gotMsg = in.readBoolean();
 
         if (gotMsg == ObjectStateUtils.ACTIVE_OBJECT) {
@@ -2856,7 +2818,7 @@
             byte[] buffer = new byte[msgSize];
 
             int bytesRead = 0;
-            int numberOfBytesLastRead = 0;
+            int numberOfBytesLastRead ;
 
             while (bytesRead < msgSize) {
                 numberOfBytesLastRead = in.read(buffer, bytesRead, msgSize - bytesRead);
@@ -2877,14 +2839,14 @@
             log.trace(logCorrelationIDString + ":readExternal(): msg  charSetEnc=[" + charSetEnc + "]  namespaceURI=[" + namespaceURI + "]  msgSize=[" + msgSize + "]   bytesRead [" + bytesRead + "]");
             log.trace(logCorrelationIDString + ":readExternal(): msg  [" + tmpMsg + "]");
 
-            ByteArrayInputStream msgBuffer = null;
+            ByteArrayInputStream msgBuffer ;
 
             if (bytesRead > 0) {
                 msgBuffer = new ByteArrayInputStream(buffer);
 
                 // convert what was saved into the soap envelope
 
-                XMLStreamReader xmlreader = null;
+                XMLStreamReader xmlreader ;
 
                 try {
                     if (persistedWithOptimizedMTOM) {
@@ -2953,7 +2915,7 @@
         currentPhaseIndex = 0;
         metaExecutionChain = null;
 
-        String execChainDesc = in.readUTF();
+         in.readUTF();
         boolean gotChain = in.readBoolean();
 
         if (gotChain == ObjectStateUtils.ACTIVE_OBJECT) {
@@ -2982,8 +2944,8 @@
                 MetaDataEntry mdObj = (MetaDataEntry) tmpObj;
 
                 // get the class name, then add it to the list
-                String tmpClassNameStr = "null";
-                String tmpQNameAsStr = "null";
+                String tmpClassNameStr ;
+                String tmpQNameAsStr ;
                 String tmpHasList = "no list";
 
                 if (mdObj != null) {
@@ -2998,7 +2960,7 @@
 
                         tmpQNameAsStr = mdObj.getQNameAsString();
 
-                        if (mdObj.isListEmpty() == false) {
+                        if (!mdObj.isListEmpty()) {
                             tmpHasList = "has list";
                         }
 
@@ -3049,7 +3011,7 @@
         inboundExecutedPhases = null;
         metaInboundExecuted = null;
 
-        String inExecDesc = in.readUTF();
+        in.readUTF();
         boolean gotInExecList = in.readBoolean();
 
         if (gotInExecList == ObjectStateUtils.ACTIVE_OBJECT) {
@@ -3075,8 +3037,8 @@
                 MetaDataEntry mdObj = (MetaDataEntry) tmpObj;
 
                 // get the class name, then add it to the list
-                String tmpClassNameStr = "null";
-                String tmpQNameAsStr = "null";
+                String tmpClassNameStr ;
+                String tmpQNameAsStr ;
                 String tmpHasList = "no list";
 
                 if (mdObj != null) {
@@ -3091,7 +3053,7 @@
 
                         tmpQNameAsStr = mdObj.getQNameAsString();
 
-                        if (mdObj.isListEmpty() == false) {
+                        if (!mdObj.isListEmpty()) {
                             tmpHasList = "has list";
                         }
 
@@ -3142,7 +3104,7 @@
         outboundExecutedPhases = null;
         metaOutboundExecuted = null;
 
-        String outExecDesc = in.readUTF();
+        in.readUTF();
         boolean gotOutExecList = in.readBoolean();
 
         if (gotOutExecList == ObjectStateUtils.ACTIVE_OBJECT) {
@@ -3168,8 +3130,8 @@
                 MetaDataEntry mdObj = (MetaDataEntry) tmpObj;
 
                 // get the class name, then add it to the list
-                String tmpClassNameStr = "null";
-                String tmpQNameAsStr = "null";
+                String tmpClassNameStr;
+                String tmpQNameAsStr ;
                 String tmpHasList = "no list";
 
                 if (mdObj != null) {
@@ -3184,7 +3146,7 @@
 
                         tmpQNameAsStr = mdObj.getQNameAsString();
 
-                        if (mdObj.isListEmpty() == false) {
+                        if (!mdObj.isListEmpty()) {
                             tmpHasList = "has list";
                         }
 
@@ -3223,7 +3185,7 @@
         // axisOperation is not usable until the meta data has been reconciled
         axisOperation = null;
 
-        String axisOpMarker = ObjectStateUtils.readString(in, "MessageContext.axisOperation");
+        ObjectStateUtils.readString(in, "MessageContext.axisOperation");
 
         boolean metaAxisOperationIsActive = in.readBoolean();
 
@@ -3248,7 +3210,7 @@
         // axisService is not usable until the meta data has been reconciled
         axisService = null;
 
-        String axisServMarker = ObjectStateUtils.readString(in, "MessageContext.axisService");
+        ObjectStateUtils.readString(in, "MessageContext.axisService");
 
         boolean metaAxisServiceIsActive = in.readBoolean();
 
@@ -3268,7 +3230,7 @@
         // serviceContext
         //-------------------------
 
-        String servCtxMarker = ObjectStateUtils.readString(in, "MessageContext.serviceContext");
+        ObjectStateUtils.readString(in, "MessageContext.serviceContext");
 
         boolean servCtxActive = in.readBoolean();
 
@@ -3298,7 +3260,7 @@
         // axisServiceGroup is not usable until the meta data has been reconciled
         axisServiceGroup = null;
 
-        String axisServGrpMarker = ObjectStateUtils.readString(in, "MessageContext.axisServiceGroup");
+        ObjectStateUtils.readString(in, "MessageContext.axisServiceGroup");
 
         boolean metaAxisServiceGrpIsActive = in.readBoolean();
 
@@ -3317,7 +3279,7 @@
         // serviceGroupContext
         //-----------------------------
 
-        String servGrpCtxMarker = ObjectStateUtils.readString(in, "MessageContext.serviceGroupContext");
+        ObjectStateUtils.readString(in, "MessageContext.serviceGroupContext");
 
         boolean servGrpCtxActive = in.readBoolean();
 
@@ -3347,7 +3309,7 @@
         // axisMessage is not usable until the meta data has been reconciled
         axisMessage = null;
 
-        String axisMsgMarker = ObjectStateUtils.readString(in, "MessageContext.axisMessage");
+        ObjectStateUtils.readString(in, "MessageContext.axisMessage");
 
         boolean metaAxisMessageIsActive = in.readBoolean();
 
@@ -3409,7 +3371,7 @@
         // special data
         //---------------------------------------------------------
 
-        String selfManagedDataMarker = ObjectStateUtils.readString(in, "MessageContext.selfManagedData");
+       ObjectStateUtils.readString(in, "MessageContext.selfManagedData");
 
         boolean gotSelfManagedData = in.readBoolean();
 
@@ -3449,7 +3411,7 @@
      */
     public void activate(ConfigurationContext cc) {
         // see if there's any work to do
-        if (needsToBeReconciled == false) {
+        if (!needsToBeReconciled) {
             // return quick
             return;
         }
@@ -3631,7 +3593,7 @@
         if (metaInboundExecuted != null) {
             log.trace(logCorrelationIDString + ":activate(): reconciling the inbound executed chain...");
 
-            if (inboundReset == false) {
+            if (!(inboundReset)) {
                 inboundExecutedPhases = restoreExecutedList(inboundExecutedPhases, metaInboundExecuted);
             }
         }
@@ -3644,7 +3606,7 @@
         if (metaOutboundExecuted != null) {
             log.trace(logCorrelationIDString + ":activate(): reconciling the outbound executed chain...");
 
-            if (outboundReset == false) {
+            if (!(outboundReset)) {
                 outboundExecutedPhases = restoreExecutedList(outboundExecutedPhases, metaOutboundExecuted);
             }
         }
@@ -3683,7 +3645,7 @@
      */
     public void activateWithOperationContext(OperationContext operationCtx) {
         // see if there's any work to do
-        if (needsToBeReconciled == false) {
+        if (!(needsToBeReconciled)) {
             // return quick
             return;
         }
@@ -3838,7 +3800,7 @@
         if (metaInboundExecuted != null) {
             log.trace(logCorrelationIDString + ":activateWithOperationContext(): reconciling the inbound executed chain...");
 
-            if (inboundReset == false) {
+            if (!(inboundReset)) {
                 inboundExecutedPhases = restoreExecutedList(inboundExecutedPhases, metaInboundExecuted);
             }
         }
@@ -3851,7 +3813,7 @@
         if (metaOutboundExecuted != null) {
             log.trace(logCorrelationIDString + ":activateWithOperationContext(): reconciling the outbound executed chain...");
 
-            if (outboundReset == false) {
+            if (!(outboundReset)) {
                 outboundExecutedPhases = restoreExecutedList(outboundExecutedPhases, metaOutboundExecuted);
             }
         }
@@ -3931,7 +3893,7 @@
 
         // get a list of existing handler/phase objects for the restored objects
 
-        ArrayList tmpMetaDataList = new ArrayList((Collection) metaDataEntries);
+        ArrayList tmpMetaDataList = new ArrayList( metaDataEntries);
 
         ArrayList existingList = restoreHandlerList(tmpMetaDataList);
 
@@ -3944,10 +3906,10 @@
         LinkedList returnedList = new LinkedList();
 
         if (base != null) {
-            returnedList.addAll((Collection) base);
+            returnedList.addAll( base);
         }
 
-        returnedList.addAll((Collection) existingList);
+        returnedList.addAll(existingList);
 
         return returnedList;
     }
@@ -3975,32 +3937,30 @@
         int listSize = handlers.size();
 
         if (listSize > 0) {
-            int nextIndex = 0;
 
             Iterator i = handlers.iterator();
 
             while (i.hasNext()) {
                 Object obj = i.next();
                 String objClass = obj.getClass().getName();
-                int objClassLength = objClass.length();
 
                 // start the meta data entry for this object
                 MetaDataEntry mdEntry = new MetaDataEntry();
                 mdEntry.setClassName(objClass);
 
                 // get the correct object-specific name
-                String qnameAsString = null;
+                String qnameAsString ;
 
                 if (obj instanceof Phase) {
                     // nested condition, the phase object contains another phase!
                     Phase phaseObj = (Phase) obj;
-                    qnameAsString = phaseObj.getName().toString();
+                    qnameAsString = phaseObj.getName();
 
                     // add the list of handlers to the meta data
                     setupPhaseList(phaseObj, mdEntry);
                 } else if (obj instanceof Handler) {
                     Handler handlerObj = (Handler) obj;
-                    qnameAsString = handlerObj.getName().toString();
+                    qnameAsString = handlerObj.getName();
                 } else {
                     // TODO: will there be any other kinds of objects 
                     // in the list?

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/OperationContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/OperationContext.java?view=diff&rev=504063&r1=504062&r2=504063
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/OperationContext.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/OperationContext.java Tue Feb  6 02:19:35 2007
@@ -279,9 +279,8 @@
             return null;
         }
 
-        MessageContext mc = (MessageContext) messageContexts.get(messageLabel); 
+        return (MessageContext) messageContexts.get(messageLabel);
 
-        return mc;
     }
 
     public HashMap getMessageContexts() {
@@ -365,7 +364,7 @@
 
         HashMap tmpHashMap = null;
 
-        if ((tmpMap != null) && (tmpMap.isEmpty()==false))
+        if ((tmpMap != null) && (!tmpMap.isEmpty()))
         {
             tmpHashMap = new HashMap(tmpMap);
         }
@@ -405,7 +404,7 @@
         else
         {
         	out.writeBoolean(ObjectStateUtils.ACTIVE_OBJECT);
-        	metaAxisService = new MetaDataEntry(axisService.getClass().getName(), axisService.getName().toString());
+        	metaAxisService = new MetaDataEntry(axisService.getClass().getName(), axisService.getName());
         	ObjectStateUtils.writeObject(out, metaAxisService, logCorrelationIDString+".metaAxisService");
         }
         
@@ -413,7 +412,7 @@
         //---------------------------------------------------------
         // parent 
         //---------------------------------------------------------
-        ServiceContext myParent = (ServiceContext) this.getServiceContext();
+        ServiceContext myParent = this.getServiceContext();
 
         ObjectStateUtils.writeObject(out, myParent, logCorrelationIDString+".parent ServiceContext"); 
 
@@ -434,7 +433,7 @@
         // first deal with the original messageContexts table
         HashMap tmpMsgCtxMap = null;
 
-        if ((messageContexts != null) && (messageContexts.isEmpty()==false))
+        if ((messageContexts != null) && (!messageContexts.isEmpty()))
         {
             // create a table of the non-isolated message contexts
             workingSet = new HashMap();
@@ -456,7 +455,7 @@
                 // check to see if this message context was isolated
                 if (isolatedMessageContexts != null)
                 {
-                    if (isolatedMessageContexts.isEmpty() == false)
+                    if (!isolatedMessageContexts.isEmpty())
                     {
                         // see if the message context was previously isolated
                         MessageContext valueIsolated = (MessageContext) isolatedMessageContexts.get(keyObj);
@@ -605,7 +604,7 @@
         // axisOperation is not usable until the meta data has been reconciled
         axisOperation = null;
 
-        String axisOpMarker = ObjectStateUtils.readString(in, "OperationContext.axisOperation");
+        ObjectStateUtils.readString(in, "OperationContext.axisOperation");
 
         boolean metaAxisOperationIsActive = in.readBoolean();
 
@@ -621,7 +620,7 @@
 
         // axisService is not usable until the meta data has been reconciled
 
-        String axisServMarker = ObjectStateUtils.readString(in, "OperationContext.axisService");
+        ObjectStateUtils.readString(in, "OperationContext.axisService");
         
         boolean metaAxisServiceIsActive = in.readBoolean();
 
@@ -678,7 +677,7 @@
     public void activate(ConfigurationContext cc)
     {
         // see if there's any work to do
-        if (needsToBeReconciled == false)
+        if (!needsToBeReconciled)
         {
             // return quick
             return;
@@ -779,7 +778,7 @@
         // reseed the operation context map
 
         ServiceContext serv = getServiceContext();
-        ConfigurationContext activeCC = null;
+        ConfigurationContext activeCC ;
         if (serv != null)
         {
             activeCC = serv.getConfigurationContext();
@@ -807,7 +806,7 @@
         // to call this operation context object so we don't
         // need to handle the metaMessagecontextMap table here
 
-        if ((workingSet != null) && (workingSet.isEmpty()==false))
+        if ((workingSet != null) && (!workingSet.isEmpty()))
         {
             Set keySet = workingSet.keySet();
             Iterator itKeys = keySet.iterator();
@@ -958,7 +957,7 @@
     public void restoreMessageContext(MessageContext msg)
     {
         // see if the activation has been done
-        if (needsToBeReconciled == true)
+        if (needsToBeReconciled)
         {
             // nope, need to do the activation first
             log.trace(logCorrelationIDString+":restoreMessageContext(): *** WARNING : need to invoke activate() prior to restoring the MessageContext to the list.");
@@ -984,7 +983,7 @@
         // the specified message context object matches any
         // of the metadata entries.  
 
-        if ((metaMessageContextMap != null) && (metaMessageContextMap.isEmpty() == false))
+        if ((metaMessageContextMap != null) && (!metaMessageContextMap.isEmpty()))
         {
             Iterator itMeta = metaMessageContextMap.keySet().iterator();
 
@@ -993,7 +992,7 @@
                 String keyM = (String) itMeta.next();
 
                 MetaDataEntry valueM = (MetaDataEntry) metaMessageContextMap.get(keyM);
-                String valueM_ID = null;
+                String valueM_ID ;
 
                 if (valueM != null)
                 {
@@ -1023,7 +1022,7 @@
         }
         else 
         // see if we can put the msg directly in the messageContexts table
-        if ((messageContexts != null) && (messageContexts.isEmpty() == false))
+        if ((messageContexts != null) && (!messageContexts.isEmpty()))
         {
             Iterator itList = messageContexts.keySet().iterator();
 
@@ -1032,7 +1031,7 @@
                 String key = (String) itList.next();
 
                 MessageContext value = (MessageContext) messageContexts.get(key);
-                String valueID = null;
+                String valueID ;
 
                 if (value != null)
                 {
@@ -1168,18 +1167,5 @@
     {
         return logCorrelationIDString;
     }
-
-
-    /**
-     * Trace a warning message, if needed, indicating that this 
-     * object needs to be activated before accessing certain fields.
-     * 
-     * @param methodname The method where the warning occurs
-     */
-    private void checkActivateWarning(String methodname)
-    {
-        if (needsToBeReconciled) {
-            log.warn(logCorrelationIDString+":"+methodname+"(): ****WARNING**** "+myClassName+".activate(configurationContext) needs to be invoked.");
-        }
-    }
+    
 }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ServiceContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ServiceContext.java?view=diff&rev=504063&r1=504062&r2=504063
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ServiceContext.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ServiceContext.java Tue Feb  6 02:19:35 2007
@@ -35,9 +35,7 @@
 import java.io.Externalizable;
 import java.io.IOException;
 import java.io.ObjectInput;
-import java.io.ObjectInputStream;
 import java.io.ObjectOutput;
-import java.io.ObjectOutputStream;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -373,7 +371,7 @@
 
         HashMap tmpHashMap = null;
 
-        if ((tmpMap != null) && (tmpMap.isEmpty()==false))
+        if ((tmpMap != null) && (!tmpMap.isEmpty()))
         {
             tmpHashMap = new HashMap(tmpMap);
         }
@@ -395,7 +393,7 @@
         else
         {
         	out.writeBoolean(ObjectStateUtils.ACTIVE_OBJECT);
-        	metaAxisService = new MetaDataEntry(axisService.getClass().getName(), axisService.getName().toString());
+        	metaAxisService = new MetaDataEntry(axisService.getClass().getName(), axisService.getName());
         	ObjectStateUtils.writeObject(out, metaAxisService, "ServiceContext.metaAxisService");
         }
         
@@ -500,7 +498,7 @@
 
         // axisService is not usable until the meta data has been reconciled
 
-        String axisServMarker = ObjectStateUtils.readString(in, "ServiceContext.axisService");
+        ObjectStateUtils.readString(in, "ServiceContext.axisService");
         
         boolean metaAxisServiceIsActive = in.readBoolean();
 
@@ -551,7 +549,7 @@
     public void activate(ConfigurationContext cc)
     {
         // see if there's any work to do
-        if (needsToBeReconciled == false)
+        if (!needsToBeReconciled)
         {
             // return quick
             return;
@@ -696,10 +694,10 @@
      * (data).
      * <P>
      * 
-     * @param srvctx  The object to compare with
      * @return TRUE if this object is equivalent with the specified object
      *              that is, key fields match
      *         FALSE, otherwise
+     * @param ctx
      */
     public boolean isEquivalent(ServiceContext ctx)
     {

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ServiceGroupContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ServiceGroupContext.java?view=diff&rev=504063&r1=504062&r2=504063
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ServiceGroupContext.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ServiceGroupContext.java Tue Feb  6 02:19:35 2007
@@ -31,12 +31,9 @@
 import java.io.Externalizable;
 import java.io.IOException;
 import java.io.ObjectInput;
-import java.io.ObjectInputStream;
 import java.io.ObjectOutput;
-import java.io.ObjectOutputStream;
 import java.util.HashMap;
 import java.util.Iterator;
-import java.util.HashMap;
 import java.util.Map;
 
 public class ServiceGroupContext extends AbstractContext implements Externalizable {
@@ -216,9 +213,7 @@
         }
 
         // a map allows a null key
-        ServiceContext sc = (ServiceContext) serviceContextMap.get(name);
-
-        return sc;
+        return (ServiceContext) serviceContextMap.get(name);
     }
 
 
@@ -228,7 +223,6 @@
      * of service contexts for this service group
      * context.
      * 
-     * @param name The AxisService associated with the ServiceContext
      *
      * @return The ServiceContext associated with the AxisService
      *         or null, if none can be found
@@ -245,9 +239,7 @@
             return null;
         }
 
-        ServiceContext sc = (ServiceContext) serviceContextMap.get(axisSrv.getName());
-
-        return sc;
+        return (ServiceContext) serviceContextMap.get(axisSrv.getName());
     }
 
     /**                         
@@ -323,7 +315,7 @@
 
         HashMap tmpHashMap = null;
 
-        if ((tmpMap != null) && (tmpMap.isEmpty()==false))
+        if ((tmpMap != null) && (!tmpMap.isEmpty()))
         {
             tmpHashMap = new HashMap(tmpMap);
         }
@@ -436,7 +428,7 @@
         // axisServiceGroup is not usable until the meta data has been reconciled
         axisServiceGroup = null;
 
-        String axisServGrpMarker = ObjectStateUtils.readString(in, "ServiceGroupContext.axisServiceGroup");
+        ObjectStateUtils.readString(in, "ServiceGroupContext.axisServiceGroup");
         
         boolean metaAxisServiceGrpIsActive = in.readBoolean();
 
@@ -485,7 +477,7 @@
     public void activate(ConfigurationContext cc)
     {
         // see if there's any work to do
-        if (needsToBeReconciled == false)
+        if (!needsToBeReconciled)
         {
             // return quick
             return;

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java?view=diff&rev=504063&r1=504062&r2=504063
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java Tue Feb  6 02:19:35 2007
@@ -687,7 +687,7 @@
         return getEPRs(requestIP);
     }
 
-    private String[] getEPRs(String requestIP) throws AxisFault {
+    private String[] getEPRs(String requestIP) {
         AxisConfiguration axisConfig = getAxisConfiguration();
         ArrayList eprList = new ArrayList();
         if (enableAllTransports) {



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


code review (was: Re: [Axis2] Re: svn commit: r504063 - in /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2: client/ context/ description/)

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
+1 indeed! 

However, for community health, let's everyone please be a bit tolerant /
patient / extra polite when asking the other to review/correct. I'm
referring to the tone of the emails .. we're all here to make axis2
great so there's no need to assume otherwise from anyone. (Yes this goes
for me too!)

After all we have Hani look after us to really pick on any mistakes we
make.

Sanjiva.

On Wed, 2007-02-07 at 11:24 +0530, Deepal Jayasinghe wrote:
> Hi Bill;
> 
> I will revert that change since that not going to cost me :)
> Btw I am very happy the current approach , every one looking at the
> commiter messages and going through them, it definitely help to improve
> the code quality
> 
> Thanks
> Deepal
> 
> Deepal Jayasinghe wrote:
> 
> >Hi Bill;
> >
> >Well you can -1 if I have done something wrong (please go ahead and
> >revert if I have done smt wrong), but the changes that I did was not bad
> >as what I fixed in the code base.
> >(http://marc.theaimsgroup.com/?l=axis-cvs&m=117075720119300&w=2)
> >
> >Dint you see the code like following in the MessagConetxt ,
> > if  (operationContext != null) {
> >       if ((operationContext!=null) && (serviceContext != null)
> >
> >So is that the readability you are talking about :)
> >
> >Bill Nagy wrote:
> >
> >  
> >
> >>Whoa, don't have a conniption there.  I hate to point this out, but
> >>changes like this:
> >>
> >>On Tue, 2007-02-06 at 10:19 +0000, deepal@apache.org wrote:
> >> 
> >>
> >>    
> >>
> >>>-        if (selfManagedDataMap != null) {
> >>>-            return
> >>>selfManagedDataMap.containsKey(generateSelfManagedDataKey(clazz,
> >>>key));
> >>>-        }
> >>>-        return false;
> >>>+        return selfManagedDataMap != null &&
> >>>selfManagedDataMap.containsKey
> >>>+                (generateSelfManagedDataKey(clazz, key)); 
> >>>   
> >>>
> >>>      
> >>>
> >>are bad software engineering -- in case that you missed it, compilers
> >>have been improved to allow developers to actually write code in a
> >>readable fashion (yes, even for small devices.)  Repeat after me,
> >>verbosity (including accurate comments) is good software engineering and
> >>allows the code to be more easily understood and bugs caught more
> >>quickly -- the compiler will optimize. 
> >>
> >>So, -1.
> >>
> >>BTW, please fix your editor to stop altering what I assume to be
> >>whitespace.
> >>
> >>    
> >>
> >Yes , there was a issues with the editor and now I have fixed that.
> >
> >Thanks
> >Deepal
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
> >For additional commands, e-mail: axis-cvs-help@ws.apache.org
> >
> >
> >
> >  
> >
> 
-- 
Sanjiva Weerawarana, Ph.D.
Founder & Director; Lanka Software Foundation; http://www.opensource.lk/
Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
Director; Open Source Initiative; http://www.opensource.org/
Member; Apache Software Foundation; http://www.apache.org/
Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/


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


Re: [Axis2] Re: svn commit: r504063 - in /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2: client/ context/ description/

Posted by Deepal Jayasinghe <de...@opensource.lk>.
Hi Bill;

I will revert that change since that not going to cost me :)
Btw I am very happy the current approach , every one looking at the
commiter messages and going through them, it definitely help to improve
the code quality

Thanks
Deepal

Deepal Jayasinghe wrote:

>Hi Bill;
>
>Well you can -1 if I have done something wrong (please go ahead and
>revert if I have done smt wrong), but the changes that I did was not bad
>as what I fixed in the code base.
>(http://marc.theaimsgroup.com/?l=axis-cvs&m=117075720119300&w=2)
>
>Dint you see the code like following in the MessagConetxt ,
> if  (operationContext != null) {
>       if ((operationContext!=null) && (serviceContext != null)
>
>So is that the readability you are talking about :)
>
>Bill Nagy wrote:
>
>  
>
>>Whoa, don't have a conniption there.  I hate to point this out, but
>>changes like this:
>>
>>On Tue, 2007-02-06 at 10:19 +0000, deepal@apache.org wrote:
>> 
>>
>>    
>>
>>>-        if (selfManagedDataMap != null) {
>>>-            return
>>>selfManagedDataMap.containsKey(generateSelfManagedDataKey(clazz,
>>>key));
>>>-        }
>>>-        return false;
>>>+        return selfManagedDataMap != null &&
>>>selfManagedDataMap.containsKey
>>>+                (generateSelfManagedDataKey(clazz, key)); 
>>>   
>>>
>>>      
>>>
>>are bad software engineering -- in case that you missed it, compilers
>>have been improved to allow developers to actually write code in a
>>readable fashion (yes, even for small devices.)  Repeat after me,
>>verbosity (including accurate comments) is good software engineering and
>>allows the code to be more easily understood and bugs caught more
>>quickly -- the compiler will optimize. 
>>
>>So, -1.
>>
>>BTW, please fix your editor to stop altering what I assume to be
>>whitespace.
>>
>>    
>>
>Yes , there was a issues with the editor and now I have fixed that.
>
>Thanks
>Deepal
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
>For additional commands, e-mail: axis-cvs-help@ws.apache.org
>
>
>
>  
>

-- 
Thanks,
Deepal
................................................................
"The highest tower is built one brick at a time"



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


Re: [Axis2] Re: svn commit: r504063 - in /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2: client/ context/ description/

Posted by Deepal Jayasinghe <de...@opensource.lk>.
Hi Bill;

I will revert that change since that not going to cost me :)
Btw I am very happy the current approach , every one looking at the
commiter messages and going through them, it definitely help to improve
the code quality

Thanks
Deepal

Deepal Jayasinghe wrote:

>Hi Bill;
>
>Well you can -1 if I have done something wrong (please go ahead and
>revert if I have done smt wrong), but the changes that I did was not bad
>as what I fixed in the code base.
>(http://marc.theaimsgroup.com/?l=axis-cvs&m=117075720119300&w=2)
>
>Dint you see the code like following in the MessagConetxt ,
> if  (operationContext != null) {
>       if ((operationContext!=null) && (serviceContext != null)
>
>So is that the readability you are talking about :)
>
>Bill Nagy wrote:
>
>  
>
>>Whoa, don't have a conniption there.  I hate to point this out, but
>>changes like this:
>>
>>On Tue, 2007-02-06 at 10:19 +0000, deepal@apache.org wrote:
>> 
>>
>>    
>>
>>>-        if (selfManagedDataMap != null) {
>>>-            return
>>>selfManagedDataMap.containsKey(generateSelfManagedDataKey(clazz,
>>>key));
>>>-        }
>>>-        return false;
>>>+        return selfManagedDataMap != null &&
>>>selfManagedDataMap.containsKey
>>>+                (generateSelfManagedDataKey(clazz, key)); 
>>>   
>>>
>>>      
>>>
>>are bad software engineering -- in case that you missed it, compilers
>>have been improved to allow developers to actually write code in a
>>readable fashion (yes, even for small devices.)  Repeat after me,
>>verbosity (including accurate comments) is good software engineering and
>>allows the code to be more easily understood and bugs caught more
>>quickly -- the compiler will optimize. 
>>
>>So, -1.
>>
>>BTW, please fix your editor to stop altering what I assume to be
>>whitespace.
>>
>>    
>>
>Yes , there was a issues with the editor and now I have fixed that.
>
>Thanks
>Deepal
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
>For additional commands, e-mail: axis-cvs-help@ws.apache.org
>
>
>
>  
>

-- 
Thanks,
Deepal
................................................................
"The highest tower is built one brick at a time"



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


Re: [Axis2] Re: svn commit: r504063 - in /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2: client/ context/ description/

Posted by Deepal Jayasinghe <de...@opensource.lk>.
Hi Bill;

Well you can -1 if I have done something wrong (please go ahead and
revert if I have done smt wrong), but the changes that I did was not bad
as what I fixed in the code base.
(http://marc.theaimsgroup.com/?l=axis-cvs&m=117075720119300&w=2)

Dint you see the code like following in the MessagConetxt ,
 if  (operationContext != null) {
       if ((operationContext!=null) && (serviceContext != null)

So is that the readability you are talking about :)

Bill Nagy wrote:

>Whoa, don't have a conniption there.  I hate to point this out, but
>changes like this:
>
>On Tue, 2007-02-06 at 10:19 +0000, deepal@apache.org wrote:
>  
>
>>-        if (selfManagedDataMap != null) {
>>-            return
>>selfManagedDataMap.containsKey(generateSelfManagedDataKey(clazz,
>>key));
>>-        }
>>-        return false;
>>+        return selfManagedDataMap != null &&
>>selfManagedDataMap.containsKey
>>+                (generateSelfManagedDataKey(clazz, key)); 
>>    
>>
>
>are bad software engineering -- in case that you missed it, compilers
>have been improved to allow developers to actually write code in a
>readable fashion (yes, even for small devices.)  Repeat after me,
>verbosity (including accurate comments) is good software engineering and
>allows the code to be more easily understood and bugs caught more
>quickly -- the compiler will optimize. 
>
>So, -1.
>
>BTW, please fix your editor to stop altering what I assume to be
>whitespace.
>
Yes , there was a issues with the editor and now I have fixed that.

Thanks
Deepal


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


Re: [Axis2] Re: svn commit: r504063 - in /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2: client/ context/ description/

Posted by Deepal Jayasinghe <de...@opensource.lk>.
Hi Bill;

Well you can -1 if I have done something wrong (please go ahead and
revert if I have done smt wrong), but the changes that I did was not bad
as what I fixed in the code base.
(http://marc.theaimsgroup.com/?l=axis-cvs&m=117075720119300&w=2)

Dint you see the code like following in the MessagConetxt ,
 if  (operationContext != null) {
       if ((operationContext!=null) && (serviceContext != null)

So is that the readability you are talking about :)

Bill Nagy wrote:

>Whoa, don't have a conniption there.  I hate to point this out, but
>changes like this:
>
>On Tue, 2007-02-06 at 10:19 +0000, deepal@apache.org wrote:
>  
>
>>-        if (selfManagedDataMap != null) {
>>-            return
>>selfManagedDataMap.containsKey(generateSelfManagedDataKey(clazz,
>>key));
>>-        }
>>-        return false;
>>+        return selfManagedDataMap != null &&
>>selfManagedDataMap.containsKey
>>+                (generateSelfManagedDataKey(clazz, key)); 
>>    
>>
>
>are bad software engineering -- in case that you missed it, compilers
>have been improved to allow developers to actually write code in a
>readable fashion (yes, even for small devices.)  Repeat after me,
>verbosity (including accurate comments) is good software engineering and
>allows the code to be more easily understood and bugs caught more
>quickly -- the compiler will optimize. 
>
>So, -1.
>
>BTW, please fix your editor to stop altering what I assume to be
>whitespace.
>
Yes , there was a issues with the editor and now I have fixed that.

Thanks
Deepal


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


[Axis2] Re: svn commit: r504063 - in /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2: client/ context/ description/

Posted by Bill Nagy <na...@watson.ibm.com>.
Whoa, don't have a conniption there.  I hate to point this out, but
changes like this:

On Tue, 2007-02-06 at 10:19 +0000, deepal@apache.org wrote:
> -        if (selfManagedDataMap != null) {
> -            return
> selfManagedDataMap.containsKey(generateSelfManagedDataKey(clazz,
> key));
> -        }
> -        return false;
> +        return selfManagedDataMap != null &&
> selfManagedDataMap.containsKey
> +                (generateSelfManagedDataKey(clazz, key)); 

are bad software engineering -- in case that you missed it, compilers
have been improved to allow developers to actually write code in a
readable fashion (yes, even for small devices.)  Repeat after me,
verbosity (including accurate comments) is good software engineering and
allows the code to be more easily understood and bugs caught more
quickly -- the compiler will optimize. 

So, -1.

BTW, please fix your editor to stop altering what I assume to be
whitespace.

-Bill



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


[Axis2] Re: svn commit: r504063 - in /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2: client/ context/ description/

Posted by Bill Nagy <na...@watson.ibm.com>.
Whoa, don't have a conniption there.  I hate to point this out, but
changes like this:

On Tue, 2007-02-06 at 10:19 +0000, deepal@apache.org wrote:
> -        if (selfManagedDataMap != null) {
> -            return
> selfManagedDataMap.containsKey(generateSelfManagedDataKey(clazz,
> key));
> -        }
> -        return false;
> +        return selfManagedDataMap != null &&
> selfManagedDataMap.containsKey
> +                (generateSelfManagedDataKey(clazz, key)); 

are bad software engineering -- in case that you missed it, compilers
have been improved to allow developers to actually write code in a
readable fashion (yes, even for small devices.)  Repeat after me,
verbosity (including accurate comments) is good software engineering and
allows the code to be more easily understood and bugs caught more
quickly -- the compiler will optimize. 

So, -1.

BTW, please fix your editor to stop altering what I assume to be
whitespace.

-Bill



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