< prev index next >

src/java.base/share/classes/sun/net/util/SocketExceptions.java

Print this page

        

@@ -42,11 +42,11 @@
      * "hostInfo" which represents the hostname and port number
      * of the remote peer relating to a socket exception.
      * The property value is a comma separated list of
      * case insignificant category names.
      */
-    private static final String enhancedTextPropname = "jdk.net.includeInExceptions";
+    private static final String enhancedTextPropname = "jdk.includeInExceptions";
 
     private static final boolean enhancedExceptionText = initTextProp();
 
     private static boolean initTextProp() {
         return AccessController.doPrivileged(new PrivilegedAction<Boolean>() {

@@ -57,11 +57,11 @@
                     if (val == null)
                         return false;
                 }
                 String[] tokens = val.split(",");
                 for (String token : tokens) {
-                    if (token.equalsIgnoreCase("hostinfo"))
+                    if (token.trim().equalsIgnoreCase("hostinfo"))
                         return true;
                 }
                 return false;
             }
         });
< prev index next >