--- a/jdk/test/java/net/URL/GetContent.java Tue Jul 20 10:41:50 2010 -0400
+++ b/jdk/test/java/net/URL/GetContent.java Wed Jul 21 13:29:26 2010 +0100
@@ -53,11 +53,13 @@
// wait for client to read response - otherwise http
// client get error and re-establish connection
- Thread.currentThread().sleep(2000);
+ Thread.sleep(2000);
s.close();
} catch (Exception e) {
e.printStackTrace();
+ } finally {
+ try { ss.close(); } catch (IOException unused) {}
}
}
@@ -81,8 +83,6 @@
error = false;
}
- ss.close();
-
if (error)
throw new RuntimeException("No IOException generated.");
}