Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-5868

Small logic error in axis2-kernel ParameterIncludeImpl.java

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.7.6
    • 1.7.7
    • kernel
    • None

    Description

      Found small bug in the axis2-kernel ParameterIncludeImpl.java.

      The "parameters.put(param.getName(), param)" is always performed twice.

      It looks like a copy/paste mistake when moving the "put" into the try block, the original line was not removed and remains outside of the try block. In the worst-case scenario, the ConcurrentModificationException would not be caught as expected.

      public void addParameter(Parameter param) {
        if (param != null) {
          synchronized (parameters) {
            parameters.put(param.getName(), param);
            try {
              parameters.put(param.getName(), param);
            } catch (ConcurrentModificationException cme) {
              ...
            }
        }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            JWT007 Jeff Thomas
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: