You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by ve...@apache.org on 2017/08/21 20:05:03 UTC

svn commit: r1805675 - in /axis/axis2/java/core/branches/hermetic-tests: ./ etc/doap_Axis2.rdf modules/kernel/src/org/apache/axis2/description/ParameterIncludeImpl.java pom.xml

Author: veithen
Date: Mon Aug 21 20:05:03 2017
New Revision: 1805675

URL: http://svn.apache.org/viewvc?rev=1805675&view=rev
Log:
Merge latest changes from trunk.

Modified:
    axis/axis2/java/core/branches/hermetic-tests/   (props changed)
    axis/axis2/java/core/branches/hermetic-tests/etc/doap_Axis2.rdf
    axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/description/ParameterIncludeImpl.java
    axis/axis2/java/core/branches/hermetic-tests/pom.xml

Propchange: axis/axis2/java/core/branches/hermetic-tests/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Aug 21 20:05:03 2017
@@ -3,4 +3,4 @@
 /axis/axis2/java/core/branches/AXIS2-4318:1230452,1295542,1324772,1327468,1329571,1332141,1335355,1335357,1340985
 /axis/axis2/java/core/branches/AXIS2-5785:1793298-1793391
 /axis/axis2/java/core/branches/google-java-format:1800516-1800554
-/axis/axis2/java/core/trunk:1779063-1804160
+/axis/axis2/java/core/trunk:1779063-1805674

Modified: axis/axis2/java/core/branches/hermetic-tests/etc/doap_Axis2.rdf
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/etc/doap_Axis2.rdf?rev=1805675&r1=1805674&r2=1805675&view=diff
==============================================================================
--- axis/axis2/java/core/branches/hermetic-tests/etc/doap_Axis2.rdf (original)
+++ axis/axis2/java/core/branches/hermetic-tests/etc/doap_Axis2.rdf Mon Aug 21 20:05:03 2017
@@ -70,6 +70,7 @@
     <release><Version><name>Apache Axis2</name><created>2016-05-30</created><revision>1.7.3</revision></Version></release>
     <release><Version><name>Apache Axis2</name><created>2016-10-21</created><revision>1.7.4</revision></Version></release>
     <release><Version><name>Apache Axis2</name><created>2017-05-06</created><revision>1.7.5</revision></Version></release>
+    <release><Version><name>Apache Axis2</name><created>2017-07-30</created><revision>1.7.6</revision></Version></release>
      
     <repository>
       <SVNRepository>

Modified: axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/description/ParameterIncludeImpl.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/description/ParameterIncludeImpl.java?rev=1805675&r1=1805674&r2=1805675&view=diff
==============================================================================
--- axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/description/ParameterIncludeImpl.java (original)
+++ axis/axis2/java/core/branches/hermetic-tests/modules/kernel/src/org/apache/axis2/description/ParameterIncludeImpl.java Mon Aug 21 20:05:03 2017
@@ -38,13 +38,9 @@ import java.io.Externalizable;
 import java.io.IOException;
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
-import java.util.concurrent.ConcurrentHashMap;
 import java.util.ArrayList;
-import java.util.ConcurrentModificationException;
 import java.util.HashMap;
 import java.util.Iterator;
-import java.util.Map;
-
 
 /**
  * Class ParameterIncludeImpl
@@ -88,15 +84,13 @@ public class ParameterIncludeImpl
     /**
      * Field parmeters
      */
-    protected Map<String, Parameter> parameters;
+    private final HashMap<String, Parameter> parameters;
 
     /**
      * Constructor ParameterIncludeImpl.
      */
     public ParameterIncludeImpl() {
-        // Use a capacity large enough to prevent
-        // resizing
-        parameters = new HashMap<String, Parameter>(64);
+        parameters = new HashMap<String, Parameter>();
     }
 
     /**
@@ -108,26 +102,6 @@ public class ParameterIncludeImpl
         if (param != null) {
             synchronized (parameters) {
                 parameters.put(param.getName(), param);
-                try {
-                    parameters.put(param.getName(), param);
-                } catch (ConcurrentModificationException cme) {
-                    // The ParameteterIncludeImpl is supposed to be immutable after it is populated.
-                    // But alas, sometimes the callers forget and try to add new items.  If
-                    // this occurs, swap over to the slower ConcurrentHashMap and continue.
-                    if (log.isDebugEnabled()) {
-                        log.debug("ConcurrentModificationException Occured...changing to ConcurrentHashMap");
-                        log.debug("The exception is: " + cme);
-                    }
-
-                    Map newMap = new ConcurrentHashMap(parameters);
-                    newMap.put(param.getName(), param);
-                    parameters = newMap;
-                }
-
-                if (DEBUG_ENABLED) {
-                    this.debugParameterAdd(param);
-                }
-
             }
             
             if (DEBUG_ENABLED) {
@@ -138,22 +112,8 @@ public class ParameterIncludeImpl
 
     public void removeParameter(Parameter param) throws AxisFault {
         synchronized (parameters) {
-            try {
-                parameters.remove(param.getName());
-            } catch (ConcurrentModificationException cme) {
-                // The ParameteterIncludeImpl is supposed to be immutable after it is populated.
-                // But alas, sometimes the callers forget and try to add new items.  If
-                // this occurs, swap over to the slower ConcurrentHashMap and continue.
-                if (log.isDebugEnabled()) {
-                    log.debug("ConcurrentModificationException Occured...changing to ConcurrentHashMap");
-                    log.debug("The exception is: " + cme);
-                }
-
-                Map newMap = new ConcurrentHashMap(parameters);
-                newMap.remove(param.getName());
-                parameters = newMap;
-            }
-        } 
+            parameters.remove(param.getName());
+        }
     }
 
     /**
@@ -220,11 +180,13 @@ public class ParameterIncludeImpl
      * @return Returns parameter.
      */
     public Parameter getParameter(String name) {
-        return parameters.get(name);
+        synchronized (parameters) {
+            return parameters.get(name);
+        }
     }
 
     public ArrayList<Parameter> getParameters() {
-        synchronized(parameters) {
+        synchronized (parameters) {
             return new ArrayList<Parameter>(parameters.values());
         }
     }

Modified: axis/axis2/java/core/branches/hermetic-tests/pom.xml
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/hermetic-tests/pom.xml?rev=1805675&r1=1805674&r2=1805675&view=diff
==============================================================================
--- axis/axis2/java/core/branches/hermetic-tests/pom.xml (original)
+++ axis/axis2/java/core/branches/hermetic-tests/pom.xml Mon Aug 21 20:05:03 2017
@@ -1245,7 +1245,7 @@
                 <plugin>
                     <groupId>com.github.veithen.alta</groupId>
                     <artifactId>alta-maven-plugin</artifactId>
-                    <version>0.6</version>
+                    <version>0.6.1</version>
                 </plugin>
                 <plugin>
                     <groupId>org.codehaus.mojo</groupId>