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

Unused ArrayList is created in RequestEngine.addHooks

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P5 P5
    • 18
    • 17, 18
    • hotspot
    • None
    • jfr
    • b26

      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);
          }

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

              Created:
              Updated:
              Resolved: