test/jdk/sun/security/ssl/AppOutputStream/NoExceptionOnClose.java
changeset 50768 68fa3d4026ea
parent 47216 71c04702a3d5
--- a/test/jdk/sun/security/ssl/AppOutputStream/NoExceptionOnClose.java	Mon Jun 25 21:22:16 2018 +0300
+++ b/test/jdk/sun/security/ssl/AppOutputStream/NoExceptionOnClose.java	Mon Jun 25 13:41:39 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,14 +21,16 @@
  * questions.
  */
 
+//
+// SunJSSE does not support dynamic system properties, no way to re-use
+// system properties in samevm/agentvm mode.
+//
+
 /*
  * @test 1.3 01/03/08
  * @bug 4378397
  * @summary  JSSE socket output stream doesn't throw after socket is closed
  * @run main/othervm NoExceptionOnClose
- *
- *     SunJSSE does not support dynamic system properties, no way to re-use
- *     system properties in samevm/agentvm mode.
  * @author Jaya Hangal
  */
 
@@ -152,11 +154,11 @@
         try {
             sslOS.write(22);
             sslOS.flush();
-        } catch (SocketException socketClosed) {
+        } catch (SSLException | SocketException socketClosed) {
                 System.out.println("Received \"" + socketClosed.getMessage()
                         + "\" exception as expected");
                 isSocketClosedThrown = true;
-          }
+        }
         if (!isSocketClosedThrown) {
                 throw new Exception("No Exception thrown on write() after"
                                 + " close()");