Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8272780

ServerNotifForwarder.removeNotificationListener() incorrect exception handling.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 18
    • Fix Version/s: tbd
    • Component/s: core-svc
    • Labels:
      None

      Description


      Reported on serviceability-dev:
      https://mail.openjdk.java.net/pipermail/serviceability-dev/2021-August/038964.html


      jdk/src/java.management/share/classes/com/sun/jmx/remote/internal/ServerNotifForwarder.java

      ..contains a method: removeNotificationListener(ObjectName name, Integer[] listenerIDs)

      ..which looks like it intends to keep the first Exception thrown, and throw that after the loop, but not to stop the loop attempting all removeNotificationListener() calls.

      So it would make sense to assign the caught Exception to re, only if re IS null, but the condition looks wrong, so currently this method never throws an Exception. It has been like this forever.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            kevinw Kevin Walls
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: