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

Unused ArrayList is created in RequestEngine.addHooks

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P5
    • Resolution: Fixed
    • Affects Version/s: 17, 18
    • Fix Version/s: 18
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
      jfr
    • Resolved In Build:
      b26

      Description

      Local ArrayList<RequestHook> is created in the method RequestEngine.addHooks. Elements are added to it, but then content is unused. Seems leftovers from some refactoring.

          static void addHooks(List<RequestHook> newEntries) {
              List<RequestHook> addEntries = new ArrayList<>();
              for (RequestHook rh : newEntries) {
                  rh.type.setEventHook(true);
                  addEntries.add(rh);
                  logHook("Added", rh.type);
              }
              entries.addAll(newEntries);
          }

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              aturbanov Andrey Turbanov
              Reporter:
              aturbanov Andrey Turbanov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: