Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-1450

Spotbugs error MS_MUTABLE_COLLECTION_PKGPROTECT in AlpnOpenListener

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 2.0.17.Final
    • None
    • Core
    • None
    • Hide
      git clone git@github.com:undertow-io/undertow.git
      mvn clean install -Dfindbugs -DskipTests
      
      Show
      git clone git@github.com:undertow-io/undertow.git mvn clean install -Dfindbugs -DskipTests

    Description

      With recent commit to master branch that fixes UNDERTOW-1448, there was introduced following spotbugs error:

      [15:57:25][Step 1/1] [INFO] --- spotbugs-maven-plugin:3.1.5:check (find-bugs) @ undertow-core ---
      [15:57:25][Step 1/1] [INFO] BugInstance size is 1
      [15:57:25][Step 1/1] [INFO] Error size is 0
      [15:57:25][Step 1/1] [INFO] Total bugs: 1
      [15:57:25][Step 1/1] [ERROR] io.undertow.server.protocol.http.AlpnOpenListener.REQUIRED_PROTOCOLS is a mutable collection which should be package protected [io.undertow.server.protocol.http.AlpnOpenListener] At AlpnOpenListener.java:[line 73] MS_MUTABLE_COLLECTION_PKGPROTECT
      

      Here is description for the issue how spotbugs explains.

      At the moment the problematic field is used only on one place and only in AlpnOpenListener class. Maybe we can change it to private or use suggested fix to use unmodifiableSet.

      Attachments

        Issue Links

          Activity

            People

              sdouglas1@redhat.com Stuart Douglas
              jstourac@redhat.com Jan Stourac
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: