< prev index next >

src/java.base/share/classes/sun/security/ssl/Utilities.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 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
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -59,12 +59,12 @@
             return serverNames;
         }
 
         int size = serverNames.size();
         List<SNIServerName> sniList = (size != 0) ?
-                new ArrayList<>(serverNames) :
-                new ArrayList<>(1);
+                new ArrayList<SNIServerName>(serverNames) :
+                new ArrayList<SNIServerName>(1);
 
         boolean reset = false;
         for (int i = 0; i < size; i++) {
             SNIServerName serverName = sniList.get(i);
             if (serverName.getType() == StandardConstants.SNI_HOST_NAME) {

@@ -145,11 +145,11 @@
     }
 
     static String indent(String source, String prefix) {
         StringBuilder builder = new StringBuilder();
         if (source == null) {
-             builder.append("\n").append(prefix).append("<blank message>");
+             builder.append("\n" + prefix + "<blank message>");
         } else {
             String[] lines = lineBreakPatern.split(source);
             boolean isFirst = true;
             for (String line : lines) {
                 if (isFirst) {

@@ -230,23 +230,6 @@
             System.arraycopy(b, 1, newarray, 0, n);
             b = newarray;
         }
         return b;
     }
-
-    static void reverseBytes(byte[] arr) {
-        int i = 0;
-        int j = arr.length - 1;
-
-        while (i < j) {
-            swap(arr, i, j);
-            i++;
-            j--;
-        }
-    }
-
-    private static void swap(byte[] arr, int i, int j) {
-        byte tmp = arr[i];
-        arr[i] = arr[j];
-        arr[j] = tmp;
-    }
 }
< prev index next >