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

Unused ArrayList is created in RequestEngine.addHooks

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • P5
    • Resolution: Fixed
    • 17, 18
    • 18
    • hotspot
    • None
    • jfr
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: