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

Dubious collection management in sun.net.www.http.KeepAliveCache

XMLWordPrintable

    • b28
    • Not verified

        FULL PRODUCT VERSION :


        A DESCRIPTION OF THE PROBLEM :
        On line 127 of KeepAliveCache.java (http://hg.openjdk.java.net/jdk9/dev/jdk/file/5a6df35b0f97/src/java.base/share/classes/sun/net/www/http/KeepAliveCache.java#l127) I found the following piece of code:

            v.remove(h);

        This strikes me as dubious, since h is of type HttpClient, but v is a vector of KeepAliveEntry objects. These two classes are unrelated, so I don't think v can ever contain h, and the call probably does nothing.


        REPRODUCIBILITY :
        This bug can be reproduced always.

              clanger Christoph Langer
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: