A couple of minor issues:

1. I wonder if "vedio" is a typo left from day 1?

  26  * @summary http://www.clipstream.com vedio does not play; read() problem

2. "serverSocket != null" checks seem to be useless (serverSocket is final and
initialized in constructor).

  87             if (serverSocket != null && !serverSocket.isClosed()) {
  93             if (serverSocket != null) {

3. java.io.Writer.write accepts int, no need for a narrowing conversion to byte

  76                         ow.write((byte) 0xff);

4. Do we need "c" here if it's not used? 

 102         int c, len = 0;
 103         while ((c = is.read()) != -1) {
 104             len++;
 105         }
 106         return len;

5. I believe we should add 8162876 to @bug

  25  * @bug 4937598

Otherwise I find this version to be more robust and readable.

Thanks,
-Pavel

> On 1 Aug 2016, at 18:59, Svetlana Nikandrova <svetlana.nikandr...@oracle.com> 
> wrote:
> 
> Hello,
> 
> please review this test clean-up. Test 
> sun/net/www/protocol/http/HttpInputStream.java fails intermittently with 
> stale threads remaining.
> I've done some refactoring to make sure that all request data is read, 
> resources are closed and I also hope test is more readable now.
> Webrev:
> http://cr.openjdk.java.net/~snikandrova/8162876/webrev.00/ 
> <http://cr.openjdk.java.net/%7Esnikandrova/8162876/webrev.00/>
> Bug:
> https://bugs.openjdk.java.net/browse/JDK-8162876
> 
> Thank you,
> Svetlana

Reply via email to