Merge "Mark Os.bind, Os.sendTo as public API"
diff --git a/dalvik/src/main/java/dalvik/annotation/optimization/DeadReferenceSafe.java b/dalvik/src/main/java/dalvik/annotation/optimization/DeadReferenceSafe.java
new file mode 100644
index 0000000..50880c8
--- /dev/null
+++ b/dalvik/src/main/java/dalvik/annotation/optimization/DeadReferenceSafe.java
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dalvik.annotation.optimization;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Allow the implementation to eliminate object references that are no longer needed, just as it
+ * would eliminate other dead variables.
+ *
+ * The annotation applies to methods of the annotated class, and to methods declared in any inner
+ * class declared inside the annotated class. It does not apply to methods declared in subclasses
+ * or superclasses. It is ignored for interfaces.
+ *
+ * The annotation promises that the implementation of this class remains correct if objects are
+ * finalized, and java.lang.ref References are enqueued, as soon as the JLS allows them to be,
+ * i.e. after they are allowed to be marked as unreachable according to the JLS. Historically, the
+ * Android runtime has garbage collected objects later than the JLS would allow, by retaining
+ * objects references that are no longer needed. Some classes that implement finalize() or make
+ * use of java.lang.ref APIs may have grown to depend on this historic Android runtime behavior.
+ *
+ * For example, consider the method
+ *
+ * <pre> {@code
+ *   void m() {
+ *     long tmpNativePtr = this.nativePtrField;
+ *     foo(tmpNativePtr);
+ *   }}</pre>
+ *
+ * where foo() accesses the memory M referenced by {@code this.nativePtrField}.  Once {@code
+ * tmpNativePtr} is computed, this object itself is no longer needed, and may be unreachable by JLS
+ * rules.  This may cause this object to be finalized, and M to be deleted, while {@code foo()} is
+ * still running and accessing M.
+ *
+ * Historically, ART has avoided this by keeping "this" reachable until {@code m()} completes.
+ * (Class file and dex level tools may not always do the same.) With this annotation, the Android
+ * runtime may no longer retain the "this" reference, again making the erroneous early
+ * finalization possible.
+ *
+ * The above example code could be made safe to annotate with {@code DeadReferenceSafe} by either
+ * adding Reference.reachabilityFence(this) to the end of {@code m()} and similar methods, or
+ * (Android-only) by declaring nativePtrField with a {@code @ReachabilitySensitive} annotation.
+ *
+ * The annotation will normally be safe for classes that do not use or rely on finalization-like
+ * cleanup mechanisms. It is unlikely to be safe for classes that use {@code java.lang.ref} or
+ * finalization but never mention {@code reachabilityFence()} or {@code @ReachabilitySensitive}.
+ *
+ * When it is safe, this annotation might result in better performance because more memory can be
+ * reclaimed earlier by the garbage collector.
+ *
+ * Since this is technically safe for all classes that follow Java language rules, we expect this
+ * to eventually become the default. This annotation allows us to selectively enable dead
+ * reference elimination during the transition, and while the details of {@code
+ * @ReachabilitySensitive} (like its name) are in flux.
+ *
+ * @hide
+ */
+@Retention(RetentionPolicy.RUNTIME)  // Let the GC or interpreter ask, if they need to.
+@Target({ElementType.TYPE})
+public @interface DeadReferenceSafe {}
diff --git a/dalvik/src/main/java/dalvik/annotation/optimization/ReachabilitySensitive.java b/dalvik/src/main/java/dalvik/annotation/optimization/ReachabilitySensitive.java
index 35a6563..4eea1a5 100644
--- a/dalvik/src/main/java/dalvik/annotation/optimization/ReachabilitySensitive.java
+++ b/dalvik/src/main/java/dalvik/annotation/optimization/ReachabilitySensitive.java
@@ -80,6 +80,6 @@
  * @hide
  */
 @Retention(RetentionPolicy.RUNTIME)  // Let the GC or interpreter ask, if they need to.
-                                     // TODO: Reconsider later. b/72332040 .
+                                     // TODO(b/72332040): Reconsider retention later.
 @Target({ElementType.FIELD, ElementType.METHOD})
 public @interface ReachabilitySensitive {}
diff --git a/dalvik/src/main/java/dalvik/system/ZygoteHooks.java b/dalvik/src/main/java/dalvik/system/ZygoteHooks.java
index 5ae9f23..13769e1 100644
--- a/dalvik/src/main/java/dalvik/system/ZygoteHooks.java
+++ b/dalvik/src/main/java/dalvik/system/ZygoteHooks.java
@@ -30,10 +30,10 @@
  */
 @libcore.api.CorePlatformApi
 public final class ZygoteHooks {
-    private long token;
+    private static long token;
 
-    @libcore.api.CorePlatformApi
-    public ZygoteHooks() {
+    /** All methods are static, no need to instantiate. */
+    private ZygoteHooks() {
     }
 
     /**
@@ -101,7 +101,7 @@
      * the child process.
      */
     @libcore.api.CorePlatformApi
-    public void preFork() {
+    public static void preFork() {
         Daemons.stop();
         token = nativePreFork();
         waitUntilAllThreadsStopped();
@@ -112,7 +112,7 @@
      * before {@code postForkChild} for system server.
      */
     @libcore.api.CorePlatformApi
-    public void postForkSystemServer() {
+    public static void postForkSystemServer() {
         nativePostForkSystemServer();
     }
 
@@ -122,7 +122,7 @@
      * {@code instructionSet} determines whether to use a native bridge.
      */
     @libcore.api.CorePlatformApi
-    public void postForkChild(int runtimeFlags, boolean isSystemServer, boolean isZygote,
+    public static void postForkChild(int runtimeFlags, boolean isSystemServer, boolean isZygote,
             String instructionSet) {
         nativePostForkChild(token, runtimeFlags, isSystemServer, isZygote, instructionSet);
 
@@ -135,7 +135,7 @@
      * {@code postForkChild}.
      */
     @libcore.api.CorePlatformApi
-    public void postForkCommon() {
+    public static void postForkCommon() {
         Daemons.startPostZygoteFork();
         nativePostZygoteFork();
     }
diff --git a/dalvik/src/main/java/org/apache/harmony/dalvik/ddmc/DdmServer.java b/dalvik/src/main/java/org/apache/harmony/dalvik/ddmc/DdmServer.java
index cfc16f1..e961d56 100644
--- a/dalvik/src/main/java/org/apache/harmony/dalvik/ddmc/DdmServer.java
+++ b/dalvik/src/main/java/org/apache/harmony/dalvik/ddmc/DdmServer.java
@@ -31,9 +31,6 @@
 @libcore.api.CorePlatformApi
 public class DdmServer {
 
-    @libcore.api.CorePlatformApi
-    public static final int CLIENT_PROTOCOL_VERSION = 1;
-
     private static HashMap<Integer,ChunkHandler> mHandlerMap =
         new HashMap<Integer,ChunkHandler>();
 
diff --git a/libart/src/main/java/dalvik/system/VMRuntime.java b/libart/src/main/java/dalvik/system/VMRuntime.java
index d2f0317..c5cabe3 100644
--- a/libart/src/main/java/dalvik/system/VMRuntime.java
+++ b/libart/src/main/java/dalvik/system/VMRuntime.java
@@ -56,6 +56,77 @@
     }
 
     /**
+     * Interface for logging hidden API usage events.
+     */
+    @libcore.api.CorePlatformApi
+    public interface HiddenApiUsageLogger {
+
+        // The following ACCESS_METHOD_ constants must match the values in
+        // art/runtime/hidden_api.h
+        /**
+         * Internal test value that does not correspond to an actual access by the
+         * application. Never logged, added for completeness.
+         */
+        public static final int ACCESS_METHOD_NONE = 0;
+
+        /**
+         *  Used when a method has been accessed via reflection.
+         */
+        public static final int ACCESS_METHOD_REFLECTION = 1;
+
+        /**
+         *  Used when a method has been accessed via JNI.
+         */
+        public static final int ACCESS_METHOD_JNI = 2;
+
+        /**
+         * Used when a method is accessed at link time. Never logged, added only
+         * for completeness.
+         */
+        public static final int ACCESS_METHOD_LINKING = 3;
+
+        /**
+         * Logs hidden API access
+         *
+         * @param appPackageName package name of the app attempting the access
+         * @param signature signature of the method being called, i.e
+         *      class_name->member_name:type_signature (e.g.
+         *      {@code com.android.app.Activity->mDoReportFullyDrawn:Z}) for fields and
+         *      class_name->method_name_and_signature for methods (e.g
+         *      {@code com.android.app.Activity->finish(I)V})
+         * @param accessType how the accessed was done
+         * @param accessDenied whether the access was allowed or not
+         */
+        public void hiddenApiUsed(String appPackageName, String signature,
+            int accessType, boolean accessDenied);
+    }
+
+    static HiddenApiUsageLogger hiddenApiUsageLogger;
+
+    /**
+     * Sets the hidden API usage logger {@link #hiddenApiUsageLogger}.
+     * It should only be called if {@link #setHiddenApiAccessLogSamplingRate(int)}
+     * is called with a value > 0
+     */
+    @libcore.api.CorePlatformApi
+    public static void setHiddenApiUsageLogger(HiddenApiUsageLogger hiddenApiUsageLogger) {
+        VMRuntime.hiddenApiUsageLogger = hiddenApiUsageLogger;
+    }
+
+    /**
+     * Records an attempted hidden API access to
+     * {@link HiddenApiUsageLogger#hiddenApiUsed(String, String, int, boolean}
+     * if a logger is registered via {@link #setHiddenApiUsageLogger}.
+     */
+    private static void hiddenApiUsed(String appPackageName, String signature,
+         int accessType, boolean accessDenied) {
+        if (VMRuntime.hiddenApiUsageLogger != null) {
+            VMRuntime.hiddenApiUsageLogger.hiddenApiUsed(appPackageName, signature,
+                accessType, accessDenied);
+        }
+    }
+
+    /**
      * Magic version number for a current development build, which has not
      * yet turned into an official release. This number must be larger than
      * any released version in {@code android.os.Build.VERSION_CODES}.
diff --git a/libart/src/main/java/java/lang/AndroidHardcodedSystemProperties.java b/libart/src/main/java/java/lang/AndroidHardcodedSystemProperties.java
index 87c3096..931994f 100644
--- a/libart/src/main/java/java/lang/AndroidHardcodedSystemProperties.java
+++ b/libart/src/main/java/java/lang/AndroidHardcodedSystemProperties.java
@@ -96,10 +96,6 @@
         { "http.keepAliveDuration", null },
         { "http.maxConnections", null },
 
-        // Hardcode "os.name" to "Linux." Aids compile-time initialization, checked in System.
-        // b/28174137
-        { "os.name", "Linux" },
-
         // Turn off javax.net debugging. This allows compile-time initialization of a range
         // of classes. b/28174137
         { "javax.net.debug", null },
diff --git a/luni/src/main/java/android/system/Os.java b/luni/src/main/java/android/system/Os.java
index 011d56a..8451884 100644
--- a/luni/src/main/java/android/system/Os.java
+++ b/luni/src/main/java/android/system/Os.java
@@ -42,12 +42,6 @@
     public static FileDescriptor accept(FileDescriptor fd, InetSocketAddress peerAddress) throws ErrnoException, SocketException { return Libcore.os.accept(fd, peerAddress); }
 
     /**
-     * TODO Change the public API by removing the overload above and unhiding this version.
-     * @hide
-     */
-    public static FileDescriptor accept(FileDescriptor fd, SocketAddress peerAddress) throws ErrnoException, SocketException { return Libcore.os.accept(fd, peerAddress); }
-
-    /**
      * See <a href="http://man7.org/linux/man-pages/man2/access.2.html">access(2)</a>.
      */
     public static boolean access(String path, int mode) throws ErrnoException { return Libcore.os.access(path, mode); }
diff --git a/luni/src/main/java/libcore/io/IoUtils.java b/luni/src/main/java/libcore/io/IoUtils.java
index 6305dd4..14a73e8 100644
--- a/luni/src/main/java/libcore/io/IoUtils.java
+++ b/luni/src/main/java/libcore/io/IoUtils.java
@@ -96,6 +96,10 @@
             tagType = 6;
         } else if (owner instanceof java.io.RandomAccessFile) {
             tagType = 7;
+        } else if (owner instanceof java.net.DatagramSocketImpl) {
+            tagType = 10;
+        } else if (owner instanceof java.net.SocketImpl) {
+            tagType = 11;
         } else if (isParcelFileDescriptor(owner)) {
             tagType = 8;
         } else {
diff --git a/luni/src/main/native/NetFd.h b/luni/src/main/native/NetFd.h
deleted file mode 100644
index ae4e5ab..0000000
--- a/luni/src/main/native/NetFd.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2010 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef NET_FD_H_included
-#define NET_FD_H_included
-
-#include <nativehelper/JNIHelp.h>
-
-/**
- * Wraps access to the int inside a java.io.FileDescriptor, taking care of throwing exceptions.
- */
-class NetFd {
-public:
-    NetFd(JNIEnv* env, jobject fileDescriptor)
-        : mEnv(env), mFileDescriptor(fileDescriptor), mFd(-1)
-    {
-    }
-
-    bool isClosed() {
-        mFd = jniGetFDFromFileDescriptor(mEnv, mFileDescriptor);
-        bool closed = (mFd == -1);
-        if (closed) {
-            jniThrowException(mEnv, "java/net/SocketException", "Socket closed");
-        }
-        return closed;
-    }
-
-    int get() const {
-        return mFd;
-    }
-
-private:
-    JNIEnv* mEnv;
-    jobject mFileDescriptor;
-    int mFd;
-
-    // Disallow copy and assignment.
-    NetFd(const NetFd&);
-    void operator=(const NetFd&);
-};
-
-/**
- * Used to retry syscalls that can return EINTR. This differs from TEMP_FAILURE_RETRY in that
- * it also considers the case where the reason for failure is that another thread called
- * Socket.close.
- */
-#define NET_FAILURE_RETRY(fd, exp) ({               \
-    typeof (exp) _rc;                               \
-    do {                                            \
-        _rc = (exp);                                \
-        if (_rc == -1) {                            \
-            if (fd.isClosed() || errno != EINTR) {  \
-                break;                              \
-            }                                       \
-        }                                           \
-    } while (_rc == -1);                            \
-    _rc; })
-
-#endif // NET_FD_H_included
diff --git a/luni/src/test/java/libcore/dalvik/system/InMemoryDexClassLoaderTest.java b/luni/src/test/java/libcore/dalvik/system/InMemoryDexClassLoaderTest.java
index 7bfc22e..ef87ee5 100644
--- a/luni/src/test/java/libcore/dalvik/system/InMemoryDexClassLoaderTest.java
+++ b/luni/src/test/java/libcore/dalvik/system/InMemoryDexClassLoaderTest.java
@@ -89,23 +89,74 @@
         }
     }
 
-    private static ByteBuffer readFileToByteBufferDirect(File file) throws IOException {
+    /**
+     * Helper to construct a direct ByteBuffer with the contents of a given file.
+     *
+     * Constructs a new direct ByteBuffer and inserts {@code paddingBefore} amount of
+     * zero padding followed by the contents of {@code file}. The buffer's position is
+     * set to the beginning of the file's data.
+     *
+     * @param file The file to be read
+     * @param paddingBefore Number of zero bytes to be inserted at the beginning of the buffer.
+     */
+    private static ByteBuffer readFileToByteBufferDirect(File file, int paddingBefore)
+            throws IOException {
         try (RandomAccessFile raf = new RandomAccessFile(file, "r")) {
-            ByteBuffer buffer = ByteBuffer.allocateDirect((int)file.length());
+            ByteBuffer buffer = ByteBuffer.allocateDirect(paddingBefore + (int)file.length());
+            buffer.put(new byte[paddingBefore]);
             int done = 0;
             while (done != file.length()) {
                 done += raf.getChannel().read(buffer);
             }
             buffer.rewind();
+            buffer.position(paddingBefore);
             return buffer;
         }
     }
 
-    private static ByteBuffer readFileToByteBufferIndirect(File file) throws IOException {
-        ByteBuffer direct = readFileToByteBufferDirect(file);
+    /**
+     * Helper to construct a direct ByteBuffer with the contents of a given file.
+     *
+     * Constructs a new direct ByteBuffer and the contents of {@code file}. The buffer's
+     * position is zero.
+     *
+     * @param file The file to be read
+     */
+    private static ByteBuffer readFileToByteBufferDirect(File file) throws IOException {
+        return readFileToByteBufferDirect(file, /* paddingBefore */ 0);
+    }
+
+    /**
+     * Helper to construct an indirect ByteBuffer with the contents of a given file.
+     *
+     * Constructs a new indirect ByteBuffer and inserts {@code paddingBefore} amount of
+     * zero padding followed by the contents of {@code file}. The buffer's position is
+     * set to the beginning of the file's data.
+     *
+     * @param file The file to be read
+     * @param paddingBefore Number of zero bytes to be inserted at the beginning of the buffer.
+     */
+    private static ByteBuffer readFileToByteBufferIndirect(File file, int paddingBefore)
+            throws IOException {
+        ByteBuffer direct = readFileToByteBufferDirect(file, paddingBefore);
+        direct.rewind();
         byte[] array = new byte[direct.limit()];
         direct.get(array);
-        return ByteBuffer.wrap(array);
+        ByteBuffer buf = ByteBuffer.wrap(array);
+        buf.position(paddingBefore);
+        return buf;
+    }
+
+    /**
+     * Helper to construct an indirect ByteBuffer with the contents of a given file.
+     *
+     * Constructs a new indirect ByteBuffer and the contents of {@code file}. The buffer's
+     * position is zero.
+     *
+     * @param file The file to be read
+     */
+    private static ByteBuffer readFileToByteBufferIndirect(File file) throws IOException {
+        return readFileToByteBufferIndirect(file, /* paddingBefore */ 0);
     }
 
     /**
@@ -355,6 +406,24 @@
         classLoader.loadClass("test.TestMethods");
     }
 
+    public void testNonZeroBufferOffsetDirect() throws IOException, ClassNotFoundException {
+        // Arbitrary amount of padding to prove a non-zero buffer position is supported.
+        int paddingBefore = 13;
+        InMemoryDexClassLoader classLoader = new InMemoryDexClassLoader(
+                new ByteBuffer[] { readFileToByteBufferDirect(dex1, paddingBefore) },
+                /* parent */ null);
+        classLoader.loadClass("test.TestMethods");
+    }
+
+    public void testNonZeroBufferOffsetIndirect() throws IOException, ClassNotFoundException {
+        // Arbitrary amount of padding to prove a non-zero buffer position is supported.
+        int paddingBefore = 13;
+        InMemoryDexClassLoader classLoader = new InMemoryDexClassLoader(
+                new ByteBuffer[] { readFileToByteBufferIndirect(dex1, paddingBefore) },
+                /* parent */ null);
+        classLoader.loadClass("test.TestMethods");
+    }
+
     private static File makeEmptyFile(File directory, String name) throws IOException {
         assertTrue(directory.mkdirs());
         File result = new File(directory, name);
diff --git a/luni/src/test/java/libcore/java/lang/SystemTest.java b/luni/src/test/java/libcore/java/lang/SystemTest.java
index 48f4591..56b6558 100644
--- a/luni/src/test/java/libcore/java/lang/SystemTest.java
+++ b/luni/src/test/java/libcore/java/lang/SystemTest.java
@@ -27,8 +27,17 @@
 import java.util.Properties;
 import java.util.concurrent.atomic.AtomicBoolean;
 
+import android.system.Os;
+
 public class SystemTest extends TestCase {
 
+    public void testOsName() throws Exception {
+        // Ensure os.name always matches the underlying OS.
+        String sysname = Os.uname().sysname;
+        String property = System.getProperty("os.name");
+        assertEquals(sysname, property);
+    }
+
     public void testLineSeparator() throws Exception {
         try {
             // Before Java 7, the small number of classes that wanted the line separator would
diff --git a/support/src/test/java/tests/net/DelegatingSocketFactory.java b/luni/src/test/java/libcore/java/net/DelegatingSocketFactory.java
similarity index 91%
rename from support/src/test/java/tests/net/DelegatingSocketFactory.java
rename to luni/src/test/java/libcore/java/net/DelegatingSocketFactory.java
index b544773..20f2bb7 100644
--- a/support/src/test/java/tests/net/DelegatingSocketFactory.java
+++ b/luni/src/test/java/libcore/java/net/DelegatingSocketFactory.java
@@ -14,12 +14,11 @@
  * limitations under the License.
  */
 
-package tests.net;
+package libcore.java.net;
 
 import java.io.IOException;
 import java.net.InetAddress;
 import java.net.Socket;
-import java.net.UnknownHostException;
 import javax.net.SocketFactory;
 
 /**
@@ -30,7 +29,7 @@
 
   private final SocketFactory mDelegate;
 
-  public DelegatingSocketFactory(SocketFactory delegate) {
+  protected DelegatingSocketFactory(SocketFactory delegate) {
     this.mDelegate = delegate;
   }
 
@@ -50,14 +49,14 @@
   }
 
   @Override
-  public Socket createSocket(String host, int port) throws IOException, UnknownHostException {
+  public Socket createSocket(String host, int port) throws IOException {
     Socket socket = mDelegate.createSocket(host, port);
     return configureSocket(socket);
   }
 
   @Override
   public Socket createSocket(String host, int port, InetAddress localHost, int localPort)
-      throws IOException, UnknownHostException {
+      throws IOException {
     Socket socket = mDelegate.createSocket(host, port, localHost, localPort);
     return configureSocket(socket);
   }
diff --git a/luni/src/test/java/libcore/java/net/URLConnectionTest.java b/luni/src/test/java/libcore/java/net/URLConnectionTest.java
index dd8e15b..1574caf 100644
--- a/luni/src/test/java/libcore/java/net/URLConnectionTest.java
+++ b/luni/src/test/java/libcore/java/net/URLConnectionTest.java
@@ -89,8 +89,6 @@
 import libcore.java.security.TestKeyStore;
 import libcore.javax.net.ssl.TestSSLContext;
 
-import tests.net.DelegatingSocketFactory;
-
 import static com.google.mockwebserver.SocketPolicy.DISCONNECT_AT_END;
 import static com.google.mockwebserver.SocketPolicy.DISCONNECT_AT_START;
 import static com.google.mockwebserver.SocketPolicy.FAIL_HANDSHAKE;
@@ -857,6 +855,55 @@
     }
 
     /**
+     * Checks that paths ending in '/' (directory listings) are identified as HTML.
+     */
+    public void testGetFileNameMap_directory() {
+        checkFileNameMap("text/html", "/directory/path/");
+        checkFileNameMap("text/html", "http://example.com/path/");
+    }
+
+    public void testGetFileNameMap_simple() {
+        checkFileNameMap("text/plain", "example.txt");
+        checkFileNameMap("text/plain", "example.com/file.txt");
+    }
+
+    /**
+     * Checks that the *last* dot is considered for determining a file extension.
+     */
+    public void testGetFileNameMap_multipleDots() {
+        checkFileNameMap("text/html", "example.com/foo.txt/bar.html");
+        checkFileNameMap("text/plain", "example.com/foo.html/bar.txt");
+        checkFileNameMap("text/plain", "example.html.txt");
+    }
+
+    /**
+     * Checks that fragments are stripped when determining file extension.
+     */
+    public void testGetFileNameMap_fragment() {
+        checkFileNameMap("text/plain", "example.txt#fragment");
+        checkFileNameMap("text/plain", "example.com/path/example.txt#fragment");
+    }
+
+    /**
+     * Checks that fragments are NOT stripped and therefore break recognition
+     * of file type.
+     * This matches RI behavior, but it'd be reasonable to change behavior here.
+     */
+    public void testGetFileNameMap_queryParameter() {
+        checkFileNameMap(null, "example.txt?key=value");
+        checkFileNameMap(null, "example.txt?key=value#fragment");
+    }
+
+    private static void checkFileNameMap(String expected, String fileName) {
+        String actual = URLConnection.getFileNameMap().getContentTypeFor(fileName);
+        assertEquals(fileName, expected, actual);
+
+        // The documentation doesn't guarantee that these two do exactly the same thing,
+        // but it is one reasonable way to implement it.
+        assertEquals(fileName, expected, URLConnection.guessContentTypeFromName(fileName));
+    }
+
+    /**
      * Test Etag headers are returned correctly when a client-side cache is installed and the server
      * data is unchanged.
      * https://code.google.com/p/android/issues/detail?id=108949
diff --git a/support/src/test/java/tests/security/KeyAgreementHelper.java b/luni/src/test/java/libcore/java/security/KeyAgreementHelper.java
similarity index 76%
rename from support/src/test/java/tests/security/KeyAgreementHelper.java
rename to luni/src/test/java/libcore/java/security/KeyAgreementHelper.java
index f2c2792..bb624d7 100644
--- a/support/src/test/java/tests/security/KeyAgreementHelper.java
+++ b/luni/src/test/java/libcore/java/security/KeyAgreementHelper.java
@@ -14,29 +14,27 @@
  * limitations under the License.
  */
 
-package tests.security;
+package libcore.java.security;
 
-import java.security.InvalidKeyException;
 import java.security.KeyPair;
-import java.security.NoSuchAlgorithmException;
 import java.security.PrivateKey;
 import java.security.PublicKey;
 import javax.crypto.KeyAgreement;
 import junit.framework.Assert;
 
-public class KeyAgreementHelper extends TestHelper<KeyPair> {
+class KeyAgreementHelper {
 
     private final String algorithmName;
 
-    public KeyAgreementHelper(String algorithmName) {
+    KeyAgreementHelper(String algorithmName) {
         this.algorithmName = algorithmName;
     }
 
-    @Override public void test(KeyPair keyPair) throws Exception {
+    public void test(KeyPair keyPair) throws Exception {
         test(keyPair.getPrivate(), keyPair.getPublic());
     }
 
-    void test(PrivateKey encryptKey, PublicKey decryptKey) throws Exception {
+    private void test(PrivateKey encryptKey, PublicKey decryptKey) throws Exception {
         KeyAgreement keyAgreement = KeyAgreement.getInstance(algorithmName);
         keyAgreement.init(encryptKey);
         keyAgreement.doPhase(decryptKey, true);
diff --git a/luni/src/test/java/libcore/java/security/OldKeyPairGeneratorTestDH.java b/luni/src/test/java/libcore/java/security/OldKeyPairGeneratorTestDH.java
index 5c0fc2f..00e76d8 100644
--- a/luni/src/test/java/libcore/java/security/OldKeyPairGeneratorTestDH.java
+++ b/luni/src/test/java/libcore/java/security/OldKeyPairGeneratorTestDH.java
@@ -17,9 +17,7 @@
 
 import java.security.KeyPair;
 import java.security.KeyPairGenerator;
-import java.security.NoSuchAlgorithmException;
 import junit.framework.TestCase;
-import tests.security.KeyAgreementHelper;
 
 public class OldKeyPairGeneratorTestDH extends TestCase {
 
diff --git a/luni/src/test/java/libcore/libcore/icu/TimeZoneIntegrationTest.java b/luni/src/test/java/libcore/libcore/icu/TimeZoneIntegrationTest.java
index bd5c1b1..0c5f938 100644
--- a/luni/src/test/java/libcore/libcore/icu/TimeZoneIntegrationTest.java
+++ b/luni/src/test/java/libcore/libcore/icu/TimeZoneIntegrationTest.java
@@ -20,6 +20,7 @@
 
 import android.icu.text.TimeZoneNames;
 import android.icu.util.VersionInfo;
+import android.system.Os;
 
 import java.io.File;
 import java.util.ArrayList;
@@ -260,7 +261,7 @@
      * expectations.
      */
     @Test
-    public void testTimeZoneDebugInfo() {
+    public void testTimeZoneDebugInfo() throws Exception {
         DebugInfo debugInfo = CoreLibraryDebug.getDebugInfo();
 
         // Devices are expected to have a time zone module which overrides or extends the data in
@@ -294,7 +295,9 @@
         runtimeModuleFiles.forEach(TimeZoneIntegrationTest::assertFileExists);
 
         String icuDatFileName = "icudt" + VersionInfo.ICU_VERSION.getMajor() + "l.dat";
-        assertFileExists(TimeZoneDataFiles.getRuntimeModuleFile("icu/" + icuDatFileName));
+        String runtimeModuleIcuData =
+                TimeZoneDataFiles.getRuntimeModuleFile("icu/" + icuDatFileName);
+        assertFileExists(runtimeModuleIcuData);
 
         // Devices currently have a subset of the time zone files in /system. These are going away
         // but we test them while they exist. Host ART should match device.
@@ -304,8 +307,15 @@
                 TimeZoneDataFiles.getSystemTimeZoneFile(TzDataSetVersion.DEFAULT_FILE_NAME));
         assertFileExists(TimeZoneDataFiles.getSystemTimeZoneFile("tzdata"));
         // The following files once existed in /system but have been removed as part of APEX work.
-        assertFileDoesNotExist(TimeZoneDataFiles.getSystemIcuFile(icuDatFileName));
         assertFileDoesNotExist(TimeZoneDataFiles.getSystemTimeZoneFile("tzlookup.xml"));
+
+        // It's hard to assert much about this file as there is a symlink in /system on device for
+        // app compatibility (b/122985829) but it doesn't exist in host environments. If the file
+        // exists we can say it should resolve (realpath) to the same file as the runtime module.
+        String systemIcuData = TimeZoneDataFiles.getSystemIcuFile(icuDatFileName);
+        if (new File(systemIcuData).exists()) {
+            assertEquals(Os.realpath(runtimeModuleIcuData), Os.realpath(systemIcuData));
+        }
     }
 
     private static List<String> createModuleTzFileNames(
diff --git a/luni/src/test/java/libcore/libcore/io/FdsanTest.java b/luni/src/test/java/libcore/libcore/io/FdsanTest.java
index 420fb7e..354ed11 100644
--- a/luni/src/test/java/libcore/libcore/io/FdsanTest.java
+++ b/luni/src/test/java/libcore/libcore/io/FdsanTest.java
@@ -22,6 +22,9 @@
 import java.io.RandomAccessFile;
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
+import java.net.DatagramSocket;
+import java.net.ServerSocket;
+import java.net.Socket;
 import junit.framework.TestCase;
 
 import libcore.io.Libcore;
@@ -31,7 +34,7 @@
         try (FileInputStream fis = new FileInputStream("/dev/null")) {
             FileDescriptor fd = fis.getFD();
             long tag = Libcore.os.android_fdsan_get_owner_tag(fd);
-            assertTrue(tag != 0);
+            assertTrue(tag != FileDescriptor.NO_OWNER);
             assertEquals("FileInputStream", Libcore.os.android_fdsan_get_tag_type(tag));
             assertEquals(System.identityHashCode(fis), Libcore.os.android_fdsan_get_tag_value(tag));
         }
@@ -41,7 +44,7 @@
         try (FileOutputStream fis = new FileOutputStream("/dev/null")) {
             FileDescriptor fd = fis.getFD();
             long tag = Libcore.os.android_fdsan_get_owner_tag(fd);
-            assertTrue(tag != 0);
+            assertTrue(tag != FileDescriptor.NO_OWNER);
             assertEquals("FileOutputStream", Libcore.os.android_fdsan_get_tag_type(tag));
             assertEquals(System.identityHashCode(fis), Libcore.os.android_fdsan_get_tag_value(tag));
         }
@@ -51,7 +54,7 @@
         try (RandomAccessFile fis = new RandomAccessFile("/dev/null", "r")) {
             FileDescriptor fd = fis.getFD();
             long tag = Libcore.os.android_fdsan_get_owner_tag(fd);
-            assertTrue(tag != 0);
+            assertTrue(tag != FileDescriptor.NO_OWNER);
             assertEquals("RandomAccessFile", Libcore.os.android_fdsan_get_tag_type(tag));
             assertEquals(System.identityHashCode(fis), Libcore.os.android_fdsan_get_tag_value(tag));
         }
@@ -75,10 +78,49 @@
             Object pfd = pfdMethodDup.invoke(null, fis.getFD());
             FileDescriptor fd = (FileDescriptor)pfdMethodGetFileDescriptor.invoke(pfd);
             long tag = Libcore.os.android_fdsan_get_owner_tag(fd);
-            assertTrue(tag != 0);
+            assertTrue(tag != FileDescriptor.NO_OWNER);
             assertEquals("ParcelFileDescriptor", Libcore.os.android_fdsan_get_tag_type(tag));
             assertEquals(System.identityHashCode(pfd), Libcore.os.android_fdsan_get_tag_value(tag));
             pfdMethodClose.invoke(pfd);
         }
     }
+
+    public void testDatagramSocket() throws Exception {
+        try (DatagramSocket socket = new DatagramSocket()) {
+            FileDescriptor fd = socket.getFileDescriptor$();
+            assertTrue(fd.valid());
+
+            long tag = Libcore.os.android_fdsan_get_owner_tag(fd);
+            assertTrue(tag != FileDescriptor.NO_OWNER);
+            assertEquals("DatagramSocketImpl", Libcore.os.android_fdsan_get_tag_type(tag));
+            assertTrue(Libcore.os.android_fdsan_get_tag_value(tag) != 0);
+            socket.close();
+        }
+    }
+
+    public void assertFdOwnedBySocket(FileDescriptor fd) throws Exception {
+        long tag = Libcore.os.android_fdsan_get_owner_tag(fd);
+        assertTrue(tag != FileDescriptor.NO_OWNER);
+        assertEquals("SocketImpl", Libcore.os.android_fdsan_get_tag_type(tag));
+        assertTrue(Libcore.os.android_fdsan_get_tag_value(tag) != 0);
+    }
+
+    public void testSocket() throws Exception {
+        try (Socket socket = new Socket()) {
+            assertFalse("new Socket shouldn't have an associated FileDescriptor",
+                        socket.getFileDescriptor$().valid());
+        }
+
+        int port = 0; // auto-allocate port
+        try (ServerSocket serverSocket = new ServerSocket(port, /* backlog */ 1)) {
+            assertFdOwnedBySocket(serverSocket.getFileDescriptor$());
+
+            Socket client = new Socket(serverSocket.getInetAddress(), serverSocket.getLocalPort());
+            Socket server = serverSocket.accept();
+            assertFdOwnedBySocket(client.getFileDescriptor$());
+            assertFdOwnedBySocket(server.getFileDescriptor$());
+            client.close();
+            server.close();
+        }
+    }
 }
diff --git a/luni/src/test/java/libcore/libcore/io/OsTest.java b/luni/src/test/java/libcore/libcore/io/OsTest.java
index e1dafe1..a4d7326 100644
--- a/luni/src/test/java/libcore/libcore/io/OsTest.java
+++ b/luni/src/test/java/libcore/libcore/io/OsTest.java
@@ -41,6 +41,8 @@
 import java.net.InetSocketAddress;
 import java.net.NetworkInterface;
 import java.net.ServerSocket;
+import java.net.SocketAddress;
+import java.net.SocketException;
 import java.net.SocketOptions;
 import java.nio.ByteBuffer;
 import java.nio.charset.StandardCharsets;
@@ -307,6 +309,157 @@
     Libcore.os.close(clientFd);
   }
 
+  private static void expectBindConnectSendtoSuccess(FileDescriptor socket, String socketDesc,
+                                                     SocketAddress addr) {
+    String msg = socketDesc + " socket to " + addr.toString();
+
+    try {
+      // Expect bind to succeed.
+      try {
+        Libcore.os.bind(socket, addr);
+
+        // Find out which port we're actually bound to, and use that in subsequent connect() and
+        // send() calls. We can't send to addr because that has a port of 0.
+        if (addr instanceof InetSocketAddress) {
+          InetSocketAddress addrISA = (InetSocketAddress) addr;
+          InetSocketAddress socknameISA = (InetSocketAddress) Libcore.os.getsockname(socket);
+
+          assertEquals(addrISA.getAddress(), socknameISA.getAddress());
+          assertEquals(0, addrISA.getPort());
+          assertFalse(0 == socknameISA.getPort());
+          addr = socknameISA;
+        }
+
+        // Expect connect to succeed.
+        Libcore.os.connect(socket, addr);
+        assertEquals(Libcore.os.getsockname(socket), Libcore.os.getpeername(socket));
+
+        // Expect sendto to succeed.
+        byte[] packet = new byte[42];
+        Libcore.os.sendto(socket, packet, 0, packet.length, 0, addr);
+      } catch (SocketException | ErrnoException e) {
+        fail("Expected success for " + msg + ", but got: " + e);
+      }
+
+    } finally {
+      IoUtils.closeQuietly(socket);
+    }
+  }
+
+  private static void expectBindConnectSendtoErrno(int bindErrno, int connectErrno, int sendtoErrno,
+                                                   FileDescriptor socket, String socketDesc,
+                                                   SocketAddress addr) {
+    try {
+
+      // Expect bind to fail with bindErrno.
+      String msg = "bind " + socketDesc + " socket to " + addr.toString();
+      try {
+        Libcore.os.bind(socket, addr);
+        fail("Expected to fail " + msg);
+      } catch (ErrnoException e) {
+        assertEquals("Expected errno " + bindErrno + " " + msg, bindErrno, e.errno);
+      } catch (SocketException e) {
+        fail("Unexpected SocketException " + msg);
+      }
+
+      // Expect connect to fail with connectErrno.
+      msg = "connect " + socketDesc + " socket to " + addr.toString();
+      try {
+        Libcore.os.connect(socket, addr);
+        fail("Expected to fail " + msg);
+      } catch (ErrnoException e) {
+        assertEquals("Expected errno " + connectErrno + " " + msg, connectErrno, e.errno);
+      } catch (SocketException e) {
+        fail("Unexpected SocketException " + msg);
+      }
+
+      // Expect sendto to fail with sendtoErrno.
+      byte[] packet = new byte[42];
+      msg = "sendto " + socketDesc + " socket to " + addr.toString();
+      try {
+        Libcore.os.sendto(socket, packet, 0, packet.length, 0, addr);
+        fail("Expected to fail " + msg);
+      } catch (ErrnoException e) {
+        assertEquals("Expected errno " + sendtoErrno + " " + msg, sendtoErrno, e.errno);
+      } catch (SocketException e) {
+        fail("Unexpected SocketException " + msg);
+      }
+
+    } finally {
+      // No matter what happened, close the socket.
+      IoUtils.closeQuietly(socket);
+    }
+  }
+
+  private FileDescriptor makeIpv4Socket() throws Exception {
+    return Libcore.os.socket(AF_INET, SOCK_DGRAM, 0);
+  }
+
+  private FileDescriptor makeIpv6Socket() throws Exception {
+    return Libcore.os.socket(AF_INET6, SOCK_DGRAM, 0);
+  }
+
+  private FileDescriptor makeUnixSocket() throws Exception {
+    return Libcore.os.socket(AF_UNIX, SOCK_DGRAM, 0);
+  }
+
+  public void testCrossFamilyBindConnectSendto() throws Exception {
+    SocketAddress addrIpv4 = new InetSocketAddress(InetAddress.getByName("127.0.0.1"), 0);
+    SocketAddress addrIpv6 = new InetSocketAddress(InetAddress.getByName("::1"), 0);
+    SocketAddress addrUnix = UnixSocketAddress.createAbstract("/abstract_name_unix_socket");
+
+    // TODO: fix and uncomment. Currently fails with EAFNOSUPPORT because
+    // Linux_bindSocketAddress uses NET_FAILURE_RETRY instead of NET_IPV4_RETRY.
+    // expectBindConnectSendtoSuccess(makeIpv4Socket(), "ipv4", addrIpv4);
+    expectBindConnectSendtoErrno(EAFNOSUPPORT, EAFNOSUPPORT, EAFNOSUPPORT,
+                                 makeIpv4Socket(), "ipv4", addrIpv6);
+    expectBindConnectSendtoErrno(EAFNOSUPPORT, EAFNOSUPPORT, EAFNOSUPPORT,
+                                 makeIpv4Socket(), "ipv4", addrUnix);
+
+    // This succeeds because Java always uses dual-stack sockets and all InetAddress and
+    // InetSocketAddress objects represent IPv4 addresses using IPv4-mapped IPv6 addresses.
+    expectBindConnectSendtoSuccess(makeIpv6Socket(), "ipv6", addrIpv4);
+    expectBindConnectSendtoSuccess(makeIpv6Socket(), "ipv6", addrIpv6);
+    expectBindConnectSendtoErrno(EAFNOSUPPORT, EAFNOSUPPORT, EINVAL,
+                                 makeIpv6Socket(), "ipv6", addrUnix);
+
+    expectBindConnectSendtoErrno(EINVAL, EAFNOSUPPORT, EINVAL,
+                                 makeUnixSocket(), "unix", addrIpv4);
+    expectBindConnectSendtoErrno(EINVAL, EAFNOSUPPORT, EINVAL,
+                                 makeUnixSocket(), "unix", addrIpv6);
+    expectBindConnectSendtoSuccess(makeUnixSocket(), "unix", addrUnix);
+  }
+
+  public void testUnknownSocketAddressSubclass() throws Exception {
+    class MySocketAddress extends SocketAddress {}
+    MySocketAddress myaddr = new MySocketAddress();
+
+    for (int family : new int[]{AF_INET, AF_INET6, AF_NETLINK}) {
+      FileDescriptor s = Libcore.os.socket(family, SOCK_DGRAM, 0);
+      try {
+
+        try {
+          Libcore.os.bind(s, myaddr);
+          fail("bind socket family " + family + " to unknown SocketAddress subclass succeeded");
+        } catch (UnsupportedOperationException expected) {}
+
+        try {
+          Libcore.os.connect(s, myaddr);
+          fail("connect socket family " + family + " to unknown SocketAddress subclass succeeded");
+        } catch (UnsupportedOperationException expected) {}
+
+        byte[] msg = new byte[42];
+        try {
+          Libcore.os.sendto(s, msg, 0, msg.length, 0, myaddr);
+          fail("sendto socket family " + family + " to unknown SocketAddress subclass succeeded");
+        } catch (UnsupportedOperationException expected) {}
+
+      } finally {
+        Libcore.os.close(s);
+      }
+    }
+  }
+
   public void test_NetlinkSocket() throws Exception {
     FileDescriptor nlSocket = Libcore.os.socket(AF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE);
     Libcore.os.bind(nlSocket, new NetlinkSocketAddress());
diff --git a/support/src/test/java/libcore/sun/security/x509/Utils.java b/luni/src/test/java/libcore/sun/security/x509/Utils.java
similarity index 98%
rename from support/src/test/java/libcore/sun/security/x509/Utils.java
rename to luni/src/test/java/libcore/sun/security/x509/Utils.java
index 412a06d..aa53726 100644
--- a/support/src/test/java/libcore/sun/security/x509/Utils.java
+++ b/luni/src/test/java/libcore/sun/security/x509/Utils.java
@@ -20,7 +20,7 @@
 
 import java.util.function.Function;
 
-public class Utils extends Assert {
+class Utils extends Assert {
     /**
      * Many classes in this package can be created using a bit array, and the toString method
      * depends only on the bit array. The logic for toString was changed in rev/04cda5b7a3c1.
diff --git a/support/src/test/java/tests/security/MessageDigestTest.java b/luni/src/test/java/tests/targets/security/MessageDigestTest.java
similarity index 77%
rename from support/src/test/java/tests/security/MessageDigestTest.java
rename to luni/src/test/java/tests/targets/security/MessageDigestTest.java
index c8dbf72..553119f 100644
--- a/support/src/test/java/tests/security/MessageDigestTest.java
+++ b/luni/src/test/java/tests/targets/security/MessageDigestTest.java
@@ -13,19 +13,18 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package tests.security;
+package tests.targets.security;
 
-import java.io.IOException;
 import java.io.InputStream;
 import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
+import java.util.Locale;
 import junit.framework.TestCase;
 
 public abstract class MessageDigestTest extends TestCase {
 
     private String digestAlgorithmName;
 
-    protected MessageDigestTest(String digestAlgorithmName) {
+    MessageDigestTest(String digestAlgorithmName) {
         super();
         this.digestAlgorithmName = digestAlgorithmName;
     }
@@ -68,17 +67,17 @@
         System.gc();
     }
 
-    InputStream getSourceData() {
+    private InputStream getSourceData() {
         InputStream sourceStream = getClass().getResourceAsStream(digestAlgorithmName + ".data");
         assertNotNull("digest source data not found: " + digestAlgorithmName, sourceStream);
         return sourceStream;
     }
 
-    byte[] getCheckDigest() throws Exception {
+    private byte[] getCheckDigest() throws Exception {
         InputStream checkDigestStream =
                 getClass().getResourceAsStream(digestAlgorithmName + ".check");
         byte[] checkDigest = new byte[digest.getDigestLength()];
-        int read = 0;
+        int read;
         int index = 0;
         while ((read = checkDigestStream.read()) != -1) {
             checkDigest[index++] = (byte)read;
@@ -89,7 +88,7 @@
 
     public void testMessageDigest1() throws Exception {
         byte[] buf = new byte[128];
-        int read = 0;
+        int read;
         while ((read = sourceData.read(buf)) != -1) {
             digest.update(buf, 0, read);
         }
@@ -129,14 +128,14 @@
      * Official FIPS180-2 testcases
      */
 
-    protected String source1;
-    protected String source2;
-    protected String source3;
-    protected String expected1;
-    protected String expected2;
-    protected String expected3;
+    String source1;
+    String source2;
+    private String source3;
+    String expected1;
+    String expected2;
+    String expected3;
 
-    String getLongMessage(int length) {
+    private String getLongMessage(int length) {
         StringBuilder sourceBuilder = new StringBuilder(length);
         for (int i = 0; i < length / 10; i++) {
             sourceBuilder.append("aaaaaaaaaa");
@@ -144,7 +143,7 @@
         return sourceBuilder.toString();
     }
 
-    public void testfips180_2_singleblock() throws Exception {
+    public void testfips180_2_singleblock() {
 
         digest.update(source1.getBytes(), 0, source1.length());
 
@@ -152,15 +151,19 @@
 
         assertNotNull("computed digest is null", computedDigest);
 
-        StringBuilder sb = new StringBuilder();
-        for (int i = 0; i < computedDigest.length; i++) {
-            String res = Integer.toHexString(computedDigest[i] & 0xFF);
-            sb.append((res.length() == 1 ? "0" : "") + res);
-        }
-        assertEquals("computed and check digest differ", expected1, sb.toString());
+        String actual = digestToString(computedDigest);
+        assertEquals("computed and check digest differ", expected1, actual);
     }
 
-    public void testfips180_2_multiblock() throws Exception {
+    private String digestToString(byte[] computedDigest) {
+        StringBuilder sb = new StringBuilder();
+        for (byte b : computedDigest) {
+          sb.append(String.format(Locale.US, "%02x", b));
+        }
+        return sb.toString();
+    }
+
+    public void testfips180_2_multiblock() {
 
         digest.update(source2.getBytes(), 0, source2.length());
 
@@ -168,15 +171,11 @@
 
         assertNotNull("computed digest is null", computedDigest);
 
-        StringBuilder sb = new StringBuilder();
-        for (int i = 0; i < computedDigest.length; i++) {
-            String res = Integer.toHexString(computedDigest[i] & 0xFF);
-            sb.append((res.length() == 1 ? "0" : "") + res);
-        }
-        assertEquals("computed and check digest differ", expected2, sb.toString());
+        String actual = digestToString(computedDigest);
+        assertEquals("computed and check digest differ", expected2, actual);
     }
 
-    public void testfips180_2_longMessage() throws Exception {
+    public void testfips180_2_longMessage() {
 
         digest.update(source3.getBytes(), 0, source3.length());
 
@@ -184,11 +183,7 @@
 
         assertNotNull("computed digest is null", computedDigest);
 
-        StringBuilder sb = new StringBuilder();
-        for (int i = 0; i < computedDigest.length; i++) {
-            String res = Integer.toHexString(computedDigest[i] & 0xFF);
-            sb.append((res.length() == 1 ? "0" : "") + res);
-        }
-        assertEquals("computed and check digest differ", expected3, sb.toString());
+        String actual = digestToString(computedDigest);
+        assertEquals("computed and check digest differ", expected3, actual);
     }
 }
diff --git a/luni/src/test/java/tests/targets/security/MessageDigestTestMD5.java b/luni/src/test/java/tests/targets/security/MessageDigestTestMD5.java
index a997b1e..d0b3039 100644
--- a/luni/src/test/java/tests/targets/security/MessageDigestTestMD5.java
+++ b/luni/src/test/java/tests/targets/security/MessageDigestTestMD5.java
@@ -15,8 +15,6 @@
  */
 package tests.targets.security;
 
-import tests.security.MessageDigestTest;
-
 public class MessageDigestTestMD5 extends MessageDigestTest {
 
     public MessageDigestTestMD5() {
diff --git a/luni/src/test/java/tests/targets/security/MessageDigestTestSHA1.java b/luni/src/test/java/tests/targets/security/MessageDigestTestSHA1.java
index a73da37..e4236c8 100644
--- a/luni/src/test/java/tests/targets/security/MessageDigestTestSHA1.java
+++ b/luni/src/test/java/tests/targets/security/MessageDigestTestSHA1.java
@@ -15,8 +15,6 @@
  */
 package tests.targets.security;
 
-import tests.security.MessageDigestTest;
-
 public class MessageDigestTestSHA1 extends MessageDigestTest {
 
     public MessageDigestTestSHA1() {
diff --git a/luni/src/test/java/tests/targets/security/MessageDigestTestSHA256.java b/luni/src/test/java/tests/targets/security/MessageDigestTestSHA256.java
index 4813396..4009d59 100644
--- a/luni/src/test/java/tests/targets/security/MessageDigestTestSHA256.java
+++ b/luni/src/test/java/tests/targets/security/MessageDigestTestSHA256.java
@@ -15,8 +15,6 @@
  */
 package tests.targets.security;
 
-import tests.security.MessageDigestTest;
-
 public class MessageDigestTestSHA256 extends MessageDigestTest {
 
     public MessageDigestTestSHA256() {
diff --git a/luni/src/test/java/tests/targets/security/MessageDigestTestSHA384.java b/luni/src/test/java/tests/targets/security/MessageDigestTestSHA384.java
index 29f9477..d873945 100644
--- a/luni/src/test/java/tests/targets/security/MessageDigestTestSHA384.java
+++ b/luni/src/test/java/tests/targets/security/MessageDigestTestSHA384.java
@@ -15,8 +15,6 @@
  */
 package tests.targets.security;
 
-import tests.security.MessageDigestTest;
-
 public class MessageDigestTestSHA384 extends MessageDigestTest {
 
     public MessageDigestTestSHA384() {
diff --git a/luni/src/test/java/tests/targets/security/MessageDigestTestSHA512.java b/luni/src/test/java/tests/targets/security/MessageDigestTestSHA512.java
index b0f2c6b..e200c25 100644
--- a/luni/src/test/java/tests/targets/security/MessageDigestTestSHA512.java
+++ b/luni/src/test/java/tests/targets/security/MessageDigestTestSHA512.java
@@ -15,8 +15,6 @@
  */
 package tests.targets.security;
 
-import tests.security.MessageDigestTest;
-
 public class MessageDigestTestSHA512 extends MessageDigestTest {
 
     public MessageDigestTestSHA512() {
diff --git a/mmodules/core_platform_api/api/platform/current-api.txt b/mmodules/core_platform_api/api/platform/current-api.txt
index 8f099b0..10d7819 100644
--- a/mmodules/core_platform_api/api/platform/current-api.txt
+++ b/mmodules/core_platform_api/api/platform/current-api.txt
@@ -772,6 +772,7 @@
     method public static void setDedupeHiddenApiWarnings(boolean);
     method public void setHiddenApiAccessLogSamplingRate(int);
     method public void setHiddenApiExemptions(String[]);
+    method public static void setHiddenApiUsageLogger(dalvik.system.VMRuntime.HiddenApiUsageLogger);
     method public static void setNonSdkApiUsageConsumer(java.util.function.Consumer<java.lang.String>);
     method public static void setProcessPackageName(String);
     method @dalvik.annotation.compat.UnsupportedAppUsage public float setTargetHeapUtilization(float);
@@ -783,6 +784,14 @@
     field public static final int SDK_VERSION_CUR_DEVELOPMENT = 10000; // 0x2710
   }
 
+  public static interface VMRuntime.HiddenApiUsageLogger {
+    method public void hiddenApiUsed(String, String, int, boolean);
+    field public static final int ACCESS_METHOD_JNI = 2; // 0x2
+    field public static final int ACCESS_METHOD_LINKING = 3; // 0x3
+    field public static final int ACCESS_METHOD_NONE = 0; // 0x0
+    field public static final int ACCESS_METHOD_REFLECTION = 1; // 0x1
+  }
+
   public final class VMStack {
     method @dalvik.annotation.optimization.FastNative public static dalvik.system.AnnotatedStackTraceElement[] getAnnotatedThreadStackTrace(Thread);
   }
@@ -793,14 +802,13 @@
   }
 
   public final class ZygoteHooks {
-    ctor public ZygoteHooks();
     method public static void gcAndFinalize();
     method public static void onBeginPreload();
     method public static void onEndPreload();
-    method public void postForkChild(int, boolean, boolean, String);
-    method public void postForkCommon();
-    method public void postForkSystemServer();
-    method public void preFork();
+    method public static void postForkChild(int, boolean, boolean, String);
+    method public static void postForkCommon();
+    method public static void postForkSystemServer();
+    method public static void preFork();
     method public static void startZygoteNoThreadCreation();
     method public static void stopZygoteNoThreadCreation();
   }
@@ -1343,7 +1351,6 @@
     method public static void registerHandler(int, org.apache.harmony.dalvik.ddmc.ChunkHandler);
     method public static void registrationComplete();
     method @dalvik.annotation.compat.UnsupportedAppUsage public static void sendChunk(org.apache.harmony.dalvik.ddmc.Chunk);
-    field public static final int CLIENT_PROTOCOL_VERSION = 1; // 0x1
   }
 
   public class DdmVmInternal {
diff --git a/mmodules/core_platform_api/api/platform/last-api.txt b/mmodules/core_platform_api/api/platform/last-api.txt
index 1851150..e69de29 100644
--- a/mmodules/core_platform_api/api/platform/last-api.txt
+++ b/mmodules/core_platform_api/api/platform/last-api.txt
@@ -1,1412 +0,0 @@
-package android.icu.impl {
-
-  public class CalendarAstronomer {
-    ctor public CalendarAstronomer(double, double);
-    method public long getSunRiseSet(boolean);
-    method public void setTime(long);
-  }
-
-  public class TimeZoneAdapter extends java.util.TimeZone {
-    method public static java.util.TimeZone wrap(android.icu.util.TimeZone);
-  }
-
-}
-
-package android.icu.text {
-
-  public final class StringPrep {
-    method public static android.icu.text.StringPrep getInstance(int);
-    method public java.lang.String prepare(java.lang.String, int) throws android.icu.text.StringPrepParseException;
-    field public static final int DEFAULT = 0; // 0x0
-    field public static final int RFC3920_RESOURCEPREP = 8; // 0x8
-  }
-
-  public class StringPrepParseException extends java.text.ParseException {
-    ctor public StringPrepParseException(java.lang.String, int);
-    ctor public StringPrepParseException(java.lang.String, int, java.lang.String, int);
-    ctor public StringPrepParseException(java.lang.String, int, java.lang.String, int, int);
-    method public int getError();
-    field public static final int ACE_PREFIX_ERROR = 6; // 0x6
-    field public static final int BUFFER_OVERFLOW_ERROR = 9; // 0x9
-    field public static final int CHECK_BIDI_ERROR = 4; // 0x4
-    field public static final int DOMAIN_NAME_TOO_LONG_ERROR = 11; // 0xb
-    field public static final int ILLEGAL_CHAR_FOUND = 1; // 0x1
-    field public static final int INVALID_CHAR_FOUND = 0; // 0x0
-    field public static final int LABEL_TOO_LONG_ERROR = 8; // 0x8
-    field public static final int PROHIBITED_ERROR = 2; // 0x2
-    field public static final int STD3_ASCII_RULES_ERROR = 5; // 0x5
-    field public static final int UNASSIGNED_ERROR = 3; // 0x3
-    field public static final int VERIFICATION_ERROR = 7; // 0x7
-    field public static final int ZERO_LENGTH_LABEL = 10; // 0xa
-  }
-
-  public abstract class Transliterator {
-    method public static final android.icu.text.Transliterator getInstance(java.lang.String);
-    method public final java.lang.String transliterate(java.lang.String);
-  }
-
-}
-
-package android.icu.util {
-
-  public abstract class BasicTimeZone extends android.icu.util.TimeZone {
-    method public abstract android.icu.util.TimeZoneTransition getNextTransition(long, boolean);
-  }
-
-  public class Region implements java.lang.Comparable {
-    method public static java.util.Set<android.icu.util.Region> getAvailable(android.icu.util.Region.RegionType);
-  }
-
-  public static final class Region.RegionType extends java.lang.Enum {
-    enum_constant public static final android.icu.util.Region.RegionType TERRITORY;
-  }
-
-  public abstract class TimeZoneRule implements java.io.Serializable {
-    method public int getDSTSavings();
-  }
-
-  public class TimeZoneTransition {
-    method public android.icu.util.TimeZoneRule getFrom();
-    method public long getTime();
-    method public android.icu.util.TimeZoneRule getTo();
-  }
-
-}
-
-package android.system {
-
-  public final class ErrnoException extends java.lang.Exception {
-    method public java.io.IOException rethrowAsIOException() throws java.io.IOException;
-    method public java.net.SocketException rethrowAsSocketException() throws java.net.SocketException;
-  }
-
-  public class Int32Ref {
-    ctor public Int32Ref(int);
-    field public int value;
-  }
-
-  public final class NetlinkSocketAddress extends java.net.SocketAddress {
-    ctor public NetlinkSocketAddress(int, int);
-    method public int getGroupsMask();
-    method public int getPortId();
-  }
-
-  public final class Os {
-    method public static void bind(java.io.FileDescriptor, java.net.SocketAddress) throws android.system.ErrnoException, java.net.SocketException;
-    method public static android.system.StructCapUserData[] capget(android.system.StructCapUserHeader) throws android.system.ErrnoException;
-    method public static void capset(android.system.StructCapUserHeader, android.system.StructCapUserData[]) throws android.system.ErrnoException;
-    method public static void connect(java.io.FileDescriptor, java.net.SocketAddress) throws android.system.ErrnoException, java.net.SocketException;
-    method public static int fcntlInt(java.io.FileDescriptor, int, int) throws android.system.ErrnoException;
-    method public static int getpgid(int) throws android.system.ErrnoException;
-    method public static android.system.StructRlimit getrlimit(int) throws android.system.ErrnoException;
-    method public static int getsockoptInt(java.io.FileDescriptor, int, int) throws android.system.ErrnoException;
-    method public static android.system.StructLinger getsockoptLinger(java.io.FileDescriptor, int, int) throws android.system.ErrnoException;
-    method public static android.system.StructTimeval getsockoptTimeval(java.io.FileDescriptor, int, int) throws android.system.ErrnoException;
-    method public static int ioctlInt(java.io.FileDescriptor, int, android.system.Int32Ref) throws android.system.ErrnoException;
-    method public static java.io.FileDescriptor[] pipe2(int) throws android.system.ErrnoException;
-    method public static java.lang.String realpath(java.lang.String) throws android.system.ErrnoException;
-    method public static int sendto(java.io.FileDescriptor, byte[], int, int, int, java.net.SocketAddress) throws android.system.ErrnoException, java.net.SocketException;
-    method public static void setpgid(int, int) throws android.system.ErrnoException;
-    method public static void setregid(int, int) throws android.system.ErrnoException;
-    method public static void setreuid(int, int) throws android.system.ErrnoException;
-    method public static void setsockoptIfreq(java.io.FileDescriptor, int, int, java.lang.String) throws android.system.ErrnoException;
-    method public static void setsockoptLinger(java.io.FileDescriptor, int, int, android.system.StructLinger) throws android.system.ErrnoException;
-    method public static void setsockoptTimeval(java.io.FileDescriptor, int, int, android.system.StructTimeval) throws android.system.ErrnoException;
-    method public static long splice(java.io.FileDescriptor, android.system.Int64Ref, java.io.FileDescriptor, android.system.Int64Ref, long, int) throws android.system.ErrnoException;
-    method public static void unlink(java.lang.String) throws android.system.ErrnoException;
-  }
-
-  public final class OsConstants {
-    method public static int CAP_TO_INDEX(int);
-    method public static int CAP_TO_MASK(int);
-    field public static final int AF_NETLINK;
-    field public static final int AF_PACKET;
-    field public static final int ARPHRD_ETHER;
-    field public static final int ENONET;
-    field public static final int ETH_P_ALL;
-    field public static final int ETH_P_ARP;
-    field public static final int ETH_P_IP;
-    field public static final int ETH_P_IPV6;
-    field public static final int EUSERS;
-    field public static final int ICMP6_ECHO_REPLY;
-    field public static final int ICMP6_ECHO_REQUEST;
-    field public static final int ICMP_ECHO;
-    field public static final int ICMP_ECHOREPLY;
-    field public static final int MAP_POPULATE;
-    field public static final int NETLINK_INET_DIAG;
-    field public static final int NETLINK_NETFILTER;
-    field public static final int NETLINK_ROUTE;
-    field public static final int O_DIRECT;
-    field public static final int PR_CAP_AMBIENT;
-    field public static final int PR_CAP_AMBIENT_RAISE;
-    field public static final int RLIMIT_NOFILE;
-    field public static final int RTMGRP_IPV4_IFADDR;
-    field public static final int RTMGRP_NEIGH;
-    field public static final int SPLICE_F_MORE;
-    field public static final int SPLICE_F_MOVE;
-    field public static final int TIOCOUTQ;
-    field public static final int UDP_ENCAP;
-    field public static final int UDP_ENCAP_ESPINUDP;
-    field public static final int XATTR_CREATE;
-    field public static final int _LINUX_CAPABILITY_VERSION_3;
-  }
-
-  public final class PacketSocketAddress extends java.net.SocketAddress {
-    ctor public PacketSocketAddress(short, int);
-    ctor public PacketSocketAddress(int, byte[]);
-  }
-
-  public final class StructCapUserData {
-    ctor public StructCapUserData(int, int, int);
-    field public final int effective;
-    field public final int inheritable;
-    field public final int permitted;
-  }
-
-  public final class StructCapUserHeader {
-    ctor public StructCapUserHeader(int, int);
-  }
-
-  public final class StructLinger {
-    ctor public StructLinger(int, int);
-    method public boolean isOn();
-    field public final int l_linger;
-  }
-
-  public final class StructRlimit {
-    field public final long rlim_cur;
-  }
-
-  public final class StructTimeval {
-    method public static android.system.StructTimeval fromMillis(long);
-    method public long toMillis();
-    field public final long tv_sec;
-    field public final long tv_usec;
-  }
-
-  public final class UnixSocketAddress extends java.net.SocketAddress {
-    method public static android.system.UnixSocketAddress createFileSystem(java.lang.String);
-  }
-
-}
-
-package com.android.okhttp.internalandroidapi {
-
-  public final class AndroidResponseCacheAdapter {
-    ctor public AndroidResponseCacheAdapter(com.android.okhttp.internalandroidapi.HasCacheHolder.CacheHolder);
-    method public void close() throws java.io.IOException;
-    method public void delete() throws java.io.IOException;
-    method public void flush() throws java.io.IOException;
-    method public java.net.CacheResponse get(java.net.URI, java.lang.String, java.util.Map<java.lang.String, java.util.List<java.lang.String>>) throws java.io.IOException;
-    method public com.android.okhttp.internalandroidapi.HasCacheHolder.CacheHolder getCacheHolder();
-    method public int getHitCount();
-    method public long getMaxSize();
-    method public int getNetworkCount();
-    method public int getRequestCount();
-    method public long getSize() throws java.io.IOException;
-    method public java.net.CacheRequest put(java.net.URI, java.net.URLConnection) throws java.io.IOException;
-  }
-
-  public abstract interface Dns {
-    method public abstract java.util.List<java.net.InetAddress> lookup(java.lang.String) throws java.net.UnknownHostException;
-  }
-
-  public abstract interface HasCacheHolder {
-    method public abstract com.android.okhttp.internalandroidapi.HasCacheHolder.CacheHolder getCacheHolder();
-  }
-
-  public static final class HasCacheHolder.CacheHolder {
-    method public static com.android.okhttp.internalandroidapi.HasCacheHolder.CacheHolder create(java.io.File, long);
-    method public boolean isEquivalent(java.io.File, long);
-  }
-
-  public final class HttpURLConnectionFactory {
-    ctor public HttpURLConnectionFactory();
-    method public java.net.URLConnection openConnection(java.net.URL, javax.net.SocketFactory, java.net.Proxy) throws java.io.IOException;
-    method public void setDns(com.android.okhttp.internalandroidapi.Dns);
-    method public void setNewConnectionPool(int, long, java.util.concurrent.TimeUnit);
-  }
-
-}
-
-package com.android.org.bouncycastle.asn1 {
-
-  public abstract class ASN1BitString extends com.android.org.bouncycastle.asn1.ASN1Primitive {
-  }
-
-  public abstract interface ASN1Encodable {
-  }
-
-  public class ASN1EncodableVector {
-    ctor public ASN1EncodableVector();
-    method public void add(com.android.org.bouncycastle.asn1.ASN1Encodable);
-  }
-
-  public class ASN1InputStream extends java.io.FilterInputStream {
-    ctor public ASN1InputStream(java.io.InputStream);
-    ctor public ASN1InputStream(byte[]);
-    method public com.android.org.bouncycastle.asn1.ASN1Primitive readObject() throws java.io.IOException;
-  }
-
-  public class ASN1Integer extends com.android.org.bouncycastle.asn1.ASN1Primitive {
-    ctor public ASN1Integer(java.math.BigInteger);
-  }
-
-  public abstract class ASN1Null extends com.android.org.bouncycastle.asn1.ASN1Primitive {
-  }
-
-  public abstract class ASN1Object implements com.android.org.bouncycastle.asn1.ASN1Encodable {
-    ctor public ASN1Object();
-    method public byte[] getEncoded() throws java.io.IOException;
-    method public byte[] getEncoded(java.lang.String) throws java.io.IOException;
-  }
-
-  public class ASN1ObjectIdentifier extends com.android.org.bouncycastle.asn1.ASN1Primitive {
-    ctor public ASN1ObjectIdentifier(java.lang.String);
-    method public java.lang.String getId();
-    method public static com.android.org.bouncycastle.asn1.ASN1ObjectIdentifier getInstance(java.lang.Object);
-  }
-
-  public abstract class ASN1OctetString extends com.android.org.bouncycastle.asn1.ASN1Primitive implements com.android.org.bouncycastle.asn1.ASN1Encodable {
-    method public byte[] getOctets();
-  }
-
-  public abstract class ASN1Primitive extends com.android.org.bouncycastle.asn1.ASN1Object {
-  }
-
-  public abstract class ASN1Sequence extends com.android.org.bouncycastle.asn1.ASN1Primitive implements com.android.org.bouncycastle.util.Iterable {
-    method public com.android.org.bouncycastle.asn1.ASN1Encodable getObjectAt(int);
-    method public int size();
-  }
-
-  public abstract class ASN1TaggedObject extends com.android.org.bouncycastle.asn1.ASN1Primitive implements com.android.org.bouncycastle.asn1.ASN1Encodable {
-    method public com.android.org.bouncycastle.asn1.ASN1Primitive getObject();
-  }
-
-  public class DERBitString extends com.android.org.bouncycastle.asn1.ASN1BitString {
-    ctor public DERBitString(byte[]);
-  }
-
-  public deprecated class DERInteger extends com.android.org.bouncycastle.asn1.ASN1Integer {
-    ctor public DERInteger(long);
-  }
-
-  public class DERNull extends com.android.org.bouncycastle.asn1.ASN1Null {
-    field public static final com.android.org.bouncycastle.asn1.DERNull INSTANCE;
-  }
-
-  public class DEROctetString extends com.android.org.bouncycastle.asn1.ASN1OctetString {
-    ctor public DEROctetString(byte[]);
-  }
-
-  public class DERSequence extends com.android.org.bouncycastle.asn1.ASN1Sequence {
-    ctor public DERSequence();
-    ctor public DERSequence(com.android.org.bouncycastle.asn1.ASN1EncodableVector);
-  }
-
-  public class DERTaggedObject extends com.android.org.bouncycastle.asn1.ASN1TaggedObject {
-    ctor public DERTaggedObject(int, com.android.org.bouncycastle.asn1.ASN1Encodable);
-  }
-
-  public class DERUTF8String extends com.android.org.bouncycastle.asn1.ASN1Primitive {
-    ctor public DERUTF8String(java.lang.String);
-    method public java.lang.String getString();
-  }
-
-}
-
-package com.android.org.bouncycastle.asn1.pkcs {
-
-  public abstract interface PKCSObjectIdentifiers {
-    field public static final com.android.org.bouncycastle.asn1.ASN1ObjectIdentifier sha256WithRSAEncryption;
-  }
-
-  public class PrivateKeyInfo extends com.android.org.bouncycastle.asn1.ASN1Object {
-    method public static com.android.org.bouncycastle.asn1.pkcs.PrivateKeyInfo getInstance(java.lang.Object);
-    method public com.android.org.bouncycastle.asn1.x509.AlgorithmIdentifier getPrivateKeyAlgorithm();
-  }
-
-}
-
-package com.android.org.bouncycastle.asn1.x509 {
-
-  public class AlgorithmIdentifier extends com.android.org.bouncycastle.asn1.ASN1Object {
-    ctor public AlgorithmIdentifier(com.android.org.bouncycastle.asn1.ASN1ObjectIdentifier);
-    ctor public AlgorithmIdentifier(com.android.org.bouncycastle.asn1.ASN1ObjectIdentifier, com.android.org.bouncycastle.asn1.ASN1Encodable);
-    method public com.android.org.bouncycastle.asn1.ASN1ObjectIdentifier getAlgorithm();
-  }
-
-  public class BasicConstraints extends com.android.org.bouncycastle.asn1.ASN1Object {
-    method public static com.android.org.bouncycastle.asn1.x509.BasicConstraints getInstance(java.lang.Object);
-    method public boolean isCA();
-  }
-
-  public class Certificate extends com.android.org.bouncycastle.asn1.ASN1Object {
-    method public static com.android.org.bouncycastle.asn1.x509.Certificate getInstance(java.lang.Object);
-  }
-
-  public class GeneralName extends com.android.org.bouncycastle.asn1.ASN1Object {
-    ctor public GeneralName(int, com.android.org.bouncycastle.asn1.ASN1Encodable);
-    ctor public GeneralName(int, java.lang.String);
-    method public int getTagNo();
-    field public static final int dNSName = 2; // 0x2
-    field public static final int iPAddress = 7; // 0x7
-    field public static final int otherName = 0; // 0x0
-  }
-
-  public class SubjectPublicKeyInfo extends com.android.org.bouncycastle.asn1.ASN1Object {
-    method public static com.android.org.bouncycastle.asn1.x509.SubjectPublicKeyInfo getInstance(java.lang.Object);
-  }
-
-  public class TBSCertificate extends com.android.org.bouncycastle.asn1.ASN1Object {
-  }
-
-  public class Time extends com.android.org.bouncycastle.asn1.ASN1Object {
-    ctor public Time(java.util.Date);
-  }
-
-  public class V3TBSCertificateGenerator {
-    ctor public V3TBSCertificateGenerator();
-    method public com.android.org.bouncycastle.asn1.x509.TBSCertificate generateTBSCertificate();
-    method public void setEndDate(com.android.org.bouncycastle.asn1.x509.Time);
-    method public deprecated void setIssuer(com.android.org.bouncycastle.asn1.x509.X509Name);
-    method public void setSerialNumber(com.android.org.bouncycastle.asn1.ASN1Integer);
-    method public void setSignature(com.android.org.bouncycastle.asn1.x509.AlgorithmIdentifier);
-    method public void setStartDate(com.android.org.bouncycastle.asn1.x509.Time);
-    method public deprecated void setSubject(com.android.org.bouncycastle.asn1.x509.X509Name);
-    method public void setSubjectPublicKeyInfo(com.android.org.bouncycastle.asn1.x509.SubjectPublicKeyInfo);
-  }
-
-  public deprecated class X509Name extends com.android.org.bouncycastle.asn1.ASN1Object {
-    ctor public deprecated X509Name(java.lang.String);
-    method public static com.android.org.bouncycastle.asn1.x509.X509Name getInstance(java.lang.Object);
-    method public java.util.Vector getOIDs();
-    method public java.util.Vector getValues();
-    method public java.lang.String toString(boolean, java.util.Hashtable);
-    field public static final deprecated com.android.org.bouncycastle.asn1.ASN1ObjectIdentifier CN;
-    field public static final java.util.Hashtable DefaultSymbols;
-    field public static final deprecated com.android.org.bouncycastle.asn1.ASN1ObjectIdentifier O;
-    field public static final deprecated com.android.org.bouncycastle.asn1.ASN1ObjectIdentifier OU;
-  }
-
-}
-
-package com.android.org.bouncycastle.asn1.x9 {
-
-  public abstract interface X9ObjectIdentifiers {
-    field public static final com.android.org.bouncycastle.asn1.ASN1ObjectIdentifier ecdsa_with_SHA256;
-  }
-
-}
-
-package com.android.org.bouncycastle.jce {
-
-  public deprecated class X509Principal extends com.android.org.bouncycastle.asn1.x509.X509Name implements java.security.Principal {
-    ctor public X509Principal(byte[]) throws java.io.IOException;
-    method public byte[] getEncoded();
-  }
-
-}
-
-package com.android.org.bouncycastle.jce.provider {
-
-  public final class BouncyCastleProvider extends java.security.Provider {
-    ctor public BouncyCastleProvider();
-  }
-
-  public deprecated class X509CertificateObject extends java.security.cert.X509Certificate {
-    ctor public X509CertificateObject(com.android.org.bouncycastle.asn1.x509.Certificate) throws java.security.cert.CertificateParsingException;
-  }
-
-}
-
-package com.android.org.bouncycastle.util {
-
-  public abstract interface Iterable<T> implements java.lang.Iterable {
-  }
-
-}
-
-package com.android.org.bouncycastle.util.io.pem {
-
-  public class PemObject implements com.android.org.bouncycastle.util.io.pem.PemObjectGenerator {
-    ctor public PemObject(java.lang.String, byte[]);
-    method public byte[] getContent();
-    method public java.lang.String getType();
-  }
-
-  public abstract interface PemObjectGenerator {
-  }
-
-  public class PemReader extends java.io.BufferedReader {
-    ctor public PemReader(java.io.Reader);
-    method public com.android.org.bouncycastle.util.io.pem.PemObject readPemObject() throws java.io.IOException;
-  }
-
-  public class PemWriter extends java.io.BufferedWriter {
-    ctor public PemWriter(java.io.Writer);
-    method public void writeObject(com.android.org.bouncycastle.util.io.pem.PemObjectGenerator) throws java.io.IOException;
-  }
-
-}
-
-package com.android.org.bouncycastle.x509 {
-
-  public deprecated class X509V3CertificateGenerator {
-    ctor public X509V3CertificateGenerator();
-    method public java.security.cert.X509Certificate generate(java.security.PrivateKey) throws java.security.cert.CertificateEncodingException, java.lang.IllegalStateException, java.security.InvalidKeyException, java.security.NoSuchAlgorithmException, java.security.SignatureException;
-    method public void setIssuerDN(javax.security.auth.x500.X500Principal);
-    method public void setNotAfter(java.util.Date);
-    method public void setNotBefore(java.util.Date);
-    method public void setPublicKey(java.security.PublicKey) throws java.lang.IllegalArgumentException;
-    method public void setSerialNumber(java.math.BigInteger);
-    method public void setSignatureAlgorithm(java.lang.String);
-    method public void setSubjectDN(javax.security.auth.x500.X500Principal);
-  }
-
-}
-
-package com.android.org.conscrypt {
-
-  public abstract interface CertPinManager {
-  }
-
-  public final class ClientSessionContext implements javax.net.ssl.SSLSessionContext {
-    method public void setPersistentCache(com.android.org.conscrypt.SSLClientSessionCache);
-  }
-
-  public final class Conscrypt {
-    method public static javax.net.ssl.X509TrustManager getDefaultX509TrustManager() throws java.security.KeyManagementException;
-    method public static javax.net.ssl.SSLContextSpi newPreferredSSLContextSpi();
-  }
-
-  public abstract interface ConscryptCertStore {
-  }
-
-  public final class FileClientSessionCache {
-    method public static synchronized com.android.org.conscrypt.SSLClientSessionCache usingDirectory(java.io.File) throws java.io.IOException;
-  }
-
-  public abstract class OpenSSLContextImpl extends javax.net.ssl.SSLContextSpi {
-    method public com.android.org.conscrypt.ClientSessionContext engineGetClientSessionContext();
-    method public javax.net.ssl.SSLSocketFactory engineGetSocketFactory();
-    method public void engineInit(javax.net.ssl.KeyManager[], javax.net.ssl.TrustManager[], java.security.SecureRandom) throws java.security.KeyManagementException;
-  }
-
-  public final class OpenSSLProvider extends java.security.Provider {
-    ctor public OpenSSLProvider();
-  }
-
-  public abstract class OpenSSLSocketImpl extends javax.net.ssl.SSLSocket {
-    method public final deprecated byte[] getAlpnSelectedProtocol();
-    method public final deprecated byte[] getNpnSelectedProtocol();
-    method public final deprecated void setAlpnProtocols(byte[]);
-    method public abstract void setChannelIdPrivateKey(java.security.PrivateKey);
-    method public void setHandshakeTimeout(int) throws java.net.SocketException;
-    method public void setHostname(java.lang.String);
-    method public final deprecated void setNpnProtocols(byte[]);
-    method public void setSoWriteTimeout(int) throws java.net.SocketException;
-    method public abstract void setUseSessionTickets(boolean);
-  }
-
-  public abstract interface SSLClientSessionCache {
-  }
-
-  public final class ServerSessionContext implements javax.net.ssl.SSLSessionContext {
-  }
-
-  public final class TrustManagerImpl extends javax.net.ssl.X509ExtendedTrustManager {
-    ctor public TrustManagerImpl(java.security.KeyStore);
-    ctor public TrustManagerImpl(java.security.KeyStore, com.android.org.conscrypt.CertPinManager, com.android.org.conscrypt.ConscryptCertStore);
-    method public void checkClientTrusted(java.security.cert.X509Certificate[], java.lang.String) throws java.security.cert.CertificateException;
-    method public void checkClientTrusted(java.security.cert.X509Certificate[], java.lang.String, java.net.Socket) throws java.security.cert.CertificateException;
-    method public void checkClientTrusted(java.security.cert.X509Certificate[], java.lang.String, javax.net.ssl.SSLEngine) throws java.security.cert.CertificateException;
-    method public java.util.List<java.security.cert.X509Certificate> checkServerTrusted(java.security.cert.X509Certificate[], java.lang.String, java.lang.String) throws java.security.cert.CertificateException;
-    method public java.util.List<java.security.cert.X509Certificate> getTrustedChainForServer(java.security.cert.X509Certificate[], java.lang.String, java.net.Socket) throws java.security.cert.CertificateException;
-    method public java.util.List<java.security.cert.X509Certificate> getTrustedChainForServer(java.security.cert.X509Certificate[], java.lang.String, javax.net.ssl.SSLEngine) throws java.security.cert.CertificateException;
-    method public void handleTrustStorageUpdate();
-  }
-
-  public final class TrustedCertificateIndex {
-    ctor public TrustedCertificateIndex();
-    method public java.util.Set<java.security.cert.TrustAnchor> findAllByIssuerAndSignature(java.security.cert.X509Certificate);
-    method public java.security.cert.TrustAnchor findByIssuerAndSignature(java.security.cert.X509Certificate);
-    method public java.security.cert.TrustAnchor findBySubjectAndPublicKey(java.security.cert.X509Certificate);
-    method public java.security.cert.TrustAnchor index(java.security.cert.X509Certificate);
-  }
-
-  public class TrustedCertificateStore implements com.android.org.conscrypt.ConscryptCertStore {
-    ctor public TrustedCertificateStore();
-    method public java.util.Set<java.lang.String> aliases();
-    method public java.util.Set<java.lang.String> allSystemAliases();
-    method public boolean containsAlias(java.lang.String);
-    method public void deleteCertificateEntry(java.lang.String) throws java.security.cert.CertificateException, java.io.IOException;
-    method public java.util.Set<java.security.cert.X509Certificate> findAllIssuers(java.security.cert.X509Certificate);
-    method public java.security.cert.X509Certificate findIssuer(java.security.cert.X509Certificate);
-    method public java.security.cert.Certificate getCertificate(java.lang.String);
-    method public java.security.cert.Certificate getCertificate(java.lang.String, boolean);
-    method public java.lang.String getCertificateAlias(java.security.cert.Certificate);
-    method public java.lang.String getCertificateAlias(java.security.cert.Certificate, boolean);
-    method public java.util.List<java.security.cert.X509Certificate> getCertificateChain(java.security.cert.X509Certificate) throws java.security.cert.CertificateException;
-    method public java.io.File getCertificateFile(java.io.File, java.security.cert.X509Certificate);
-    method public java.util.Date getCreationDate(java.lang.String);
-    method public java.security.cert.X509Certificate getTrustAnchor(java.security.cert.X509Certificate);
-    method public void installCertificate(java.security.cert.X509Certificate) throws java.security.cert.CertificateException, java.io.IOException;
-    method public static final boolean isUser(java.lang.String);
-    method public boolean isUserAddedCertificate(java.security.cert.X509Certificate);
-    method public static void setDefaultUserDirectory(java.io.File);
-    method public java.util.Set<java.lang.String> userAliases();
-  }
-
-}
-
-package dalvik.annotation.optimization {
-
-  public abstract class CriticalNative implements java.lang.annotation.Annotation {
-  }
-
-  public abstract class FastNative implements java.lang.annotation.Annotation {
-  }
-
-}
-
-package dalvik.system {
-
-  public class AnnotatedStackTraceElement {
-    method public java.lang.Object getBlockedOn();
-    method public java.lang.Object[] getHeldLocks();
-    method public java.lang.StackTraceElement getStackTraceElement();
-  }
-
-  public class BaseDexClassLoader extends java.lang.ClassLoader {
-    method public void addDexPath(java.lang.String);
-    method public void addNativePath(java.util.Collection<java.lang.String>);
-    method public java.lang.String getLdLibraryPath();
-    method public static void setReporter(dalvik.system.BaseDexClassLoader.Reporter);
-  }
-
-  public static abstract interface BaseDexClassLoader.Reporter {
-    method public abstract void report(java.util.List<dalvik.system.BaseDexClassLoader>, java.util.List<java.lang.String>);
-  }
-
-  public final class BlockGuard {
-    method public static dalvik.system.BlockGuard.Policy getThreadPolicy();
-    method public static dalvik.system.BlockGuard.VmPolicy getVmPolicy();
-    method public static void setThreadPolicy(dalvik.system.BlockGuard.Policy);
-    method public static void setVmPolicy(dalvik.system.BlockGuard.VmPolicy);
-    field public static final dalvik.system.BlockGuard.Policy LAX_POLICY;
-    field public static final dalvik.system.BlockGuard.VmPolicy LAX_VM_POLICY;
-  }
-
-  public static abstract interface BlockGuard.Policy {
-    method public abstract int getPolicyMask();
-    method public abstract void onReadFromDisk();
-    method public abstract void onUnbufferedIO();
-    method public abstract void onWriteToDisk();
-  }
-
-  public static abstract interface BlockGuard.VmPolicy {
-    method public abstract void onPathAccess(java.lang.String);
-  }
-
-  public final class CloseGuard {
-    method public void close();
-    method public static dalvik.system.CloseGuard get();
-    method public static dalvik.system.CloseGuard.Reporter getReporter();
-    method public void open(java.lang.String);
-    method public static void setEnabled(boolean);
-    method public static void setReporter(dalvik.system.CloseGuard.Reporter);
-    method public void warnIfOpen();
-  }
-
-  public static abstract interface CloseGuard.Reporter {
-    method public abstract void report(java.lang.String, java.lang.Throwable);
-  }
-
-  public abstract interface DalvikLogHandler {
-    method public abstract void publish(java.util.logging.Logger, java.lang.String, java.util.logging.Level, java.lang.String);
-  }
-
-  public final class DalvikLogging {
-    method public static java.lang.String loggerNameToTag(java.lang.String);
-  }
-
-  public final deprecated class DexFile {
-    ctor public deprecated DexFile(java.io.File) throws java.io.IOException;
-    ctor public deprecated DexFile(java.lang.String) throws java.io.IOException;
-    method public void close() throws java.io.IOException;
-    method public java.util.Enumeration<java.lang.String> entries();
-    method public static dalvik.system.DexFile.OptimizationInfo getDexFileOptimizationInfo(java.lang.String, java.lang.String) throws java.io.FileNotFoundException;
-    method public static java.lang.String[] getDexFileOutputPaths(java.lang.String, java.lang.String) throws java.io.FileNotFoundException;
-    method public static int getDexOptNeeded(java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean, boolean) throws java.io.FileNotFoundException, java.io.IOException;
-    method public java.lang.String getName();
-    method public static java.lang.String getSafeModeCompilerFilter(java.lang.String);
-    method public static boolean isDexOptNeeded(java.lang.String) throws java.io.FileNotFoundException, java.io.IOException;
-    method public static boolean isProfileGuidedCompilerFilter(java.lang.String);
-    method public static boolean isValidCompilerFilter(java.lang.String);
-    method public java.lang.Class loadClass(java.lang.String, java.lang.ClassLoader);
-    method public static deprecated dalvik.system.DexFile loadDex(java.lang.String, java.lang.String, int) throws java.io.IOException;
-    field public static final int DEX2OAT_FOR_FILTER = 3; // 0x3
-    field public static final int NO_DEXOPT_NEEDED = 0; // 0x0
-  }
-
-  public static final class DexFile.OptimizationInfo {
-    method public java.lang.String getReason();
-    method public java.lang.String getStatus();
-  }
-
-  public final class RuntimeHooks {
-    method public static void setTimeZoneIdSupplier(java.util.function.Supplier<java.lang.String>);
-    method public static void setUncaughtExceptionPreHandler(java.lang.Thread.UncaughtExceptionHandler);
-  }
-
-  public abstract class SocketTagger {
-    ctor public SocketTagger();
-    method public static synchronized dalvik.system.SocketTagger get();
-    method public static synchronized void set(dalvik.system.SocketTagger);
-    method public abstract void tag(java.io.FileDescriptor) throws java.net.SocketException;
-    method public final void tag(java.net.Socket) throws java.net.SocketException;
-    method public final void tag(java.net.DatagramSocket) throws java.net.SocketException;
-    method public abstract void untag(java.io.FileDescriptor) throws java.net.SocketException;
-    method public final void untag(java.net.Socket) throws java.net.SocketException;
-    method public final void untag(java.net.DatagramSocket) throws java.net.SocketException;
-  }
-
-  public final class VMDebug {
-    method public static void attachAgent(java.lang.String, java.lang.ClassLoader) throws java.io.IOException;
-    method public static boolean cacheRegisterMap(java.lang.String);
-    method public static long countInstancesOfClass(java.lang.Class, boolean);
-    method public static long[] countInstancesOfClasses(java.lang.Class[], boolean);
-    method public static void dumpHprofData(java.lang.String) throws java.io.IOException;
-    method public static void dumpHprofData(java.lang.String, java.io.FileDescriptor) throws java.io.IOException;
-    method public static void dumpHprofDataDdms();
-    method public static void dumpReferenceTables();
-    method public static int getAllocCount(int);
-    method public static int getLoadedClassCount();
-    method public static int getMethodTracingMode();
-    method public static java.lang.String getRuntimeStat(java.lang.String);
-    method public static java.util.Map<java.lang.String, java.lang.String> getRuntimeStats();
-    method public static java.lang.String[] getVmFeatureList();
-    method public static boolean isDebuggerConnected();
-    method public static boolean isDebuggingEnabled();
-    method public static long lastDebuggerActivity();
-    method public static void printLoadedClasses(int);
-    method public static void resetAllocCount(int);
-    method public static void startAllocCounting();
-    method public static void startEmulatorTracing();
-    method public static void startMethodTracing(java.lang.String, int, int, boolean, int);
-    method public static void startMethodTracing(java.lang.String, java.io.FileDescriptor, int, int, boolean, int, boolean);
-    method public static void startMethodTracingDdms(int, int, boolean, int);
-    method public static void stopAllocCounting();
-    method public static void stopEmulatorTracing();
-    method public static void stopMethodTracing();
-    method public static long threadCpuTimeNanos();
-    field public static final int KIND_ALL_COUNTS = -1; // 0xffffffff
-    field public static final int KIND_GLOBAL_ALLOCATED_BYTES = 2; // 0x2
-    field public static final int KIND_GLOBAL_ALLOCATED_OBJECTS = 1; // 0x1
-    field public static final int KIND_GLOBAL_CLASS_INIT_COUNT = 32; // 0x20
-    field public static final int KIND_GLOBAL_CLASS_INIT_TIME = 64; // 0x40
-    field public static final int KIND_GLOBAL_FREED_BYTES = 8; // 0x8
-    field public static final int KIND_GLOBAL_FREED_OBJECTS = 4; // 0x4
-    field public static final int KIND_GLOBAL_GC_INVOCATIONS = 16; // 0x10
-    field public static final int KIND_THREAD_ALLOCATED_BYTES = 131072; // 0x20000
-    field public static final int KIND_THREAD_ALLOCATED_OBJECTS = 65536; // 0x10000
-    field public static final int KIND_THREAD_GC_INVOCATIONS = 1048576; // 0x100000
-    field public static final int TRACE_COUNT_ALLOCS = 1; // 0x1
-  }
-
-  public final class VMRuntime {
-    method public long addressOf(java.lang.Object);
-    method public void clampGrowthLimit();
-    method public void clearGrowthLimit();
-    method public static boolean didPruneDalvikCache();
-    method public void disableJitCompilation();
-    method public static java.lang.String getCurrentInstructionSet();
-    method public static java.lang.String getInstructionSet(java.lang.String);
-    method public static dalvik.system.VMRuntime getRuntime();
-    method public float getTargetHeapUtilization();
-    method public synchronized int getTargetSdkVersion();
-    method public static boolean hasBootImageSpaces();
-    method public boolean hasUsedHiddenApi();
-    method public boolean is64Bit();
-    method public static boolean is64BitAbi(java.lang.String);
-    method public static boolean is64BitInstructionSet(java.lang.String);
-    method public static boolean isBootClassPathOnDisk(java.lang.String);
-    method public boolean isCheckJniEnabled();
-    method public boolean isNativeDebuggable();
-    method public java.lang.Object newNonMovableArray(java.lang.Class<?>, int);
-    method public java.lang.Object newUnpaddedArray(java.lang.Class<?>, int);
-    method public void preloadDexCaches();
-    method public static void registerAppInfo(java.lang.String, java.lang.String[]);
-    method public void registerNativeAllocation(int);
-    method public void registerNativeFree(int);
-    method public static void registerSensitiveThread();
-    method public void requestConcurrentGC();
-    method public static void setDedupeHiddenApiWarnings(boolean);
-    method public void setHiddenApiAccessLogSamplingRate(int);
-    method public void setHiddenApiExemptions(java.lang.String[]);
-    method public static void setNonSdkApiUsageConsumer(java.util.function.Consumer<java.lang.String>);
-    method public static void setProcessPackageName(java.lang.String);
-    method public float setTargetHeapUtilization(float);
-    method public synchronized void setTargetSdkVersion(int);
-    method public void startJitCompilation();
-    method public void updateProcessState(int);
-    method public java.lang.String vmInstructionSet();
-    method public java.lang.String vmLibrary();
-    field public static final int SDK_VERSION_CUR_DEVELOPMENT = 10000; // 0x2710
-  }
-
-  public final class VMStack {
-    ctor public VMStack();
-    method public static dalvik.system.AnnotatedStackTraceElement[] getAnnotatedThreadStackTrace(java.lang.Thread);
-  }
-
-  public final class ZygoteHooks {
-    ctor public ZygoteHooks();
-    method public static void gcAndFinalize();
-    method public static void onBeginPreload();
-    method public static void onEndPreload();
-    method public void postForkChild(int, boolean, boolean, java.lang.String);
-    method public void postForkCommon();
-    method public void preFork();
-    method public static void startZygoteNoThreadCreation();
-    method public static void stopZygoteNoThreadCreation();
-  }
-
-}
-
-package java.io {
-
-  public final class FileDescriptor {
-    method public int getInt$();
-    method public void setInt$(int);
-  }
-
-  public class FileInputStream extends java.io.InputStream {
-    ctor public FileInputStream(java.io.FileDescriptor, boolean);
-  }
-
-}
-
-package java.lang {
-
-  public final class Byte extends java.lang.Number implements java.lang.Comparable {
-    method public static java.lang.String toHexString(byte, boolean);
-  }
-
-  public final class Class<T> implements java.lang.reflect.AnnotatedElement java.lang.reflect.GenericDeclaration java.io.Serializable java.lang.reflect.Type {
-    method public java.lang.reflect.Field[] getDeclaredFieldsUnchecked(boolean);
-    method public java.lang.reflect.Method[] getDeclaredMethodsUnchecked(boolean);
-    method public java.lang.String getPackageName$();
-  }
-
-  public final class Math {
-    method public static long randomLongInternal();
-  }
-
-  public final class System {
-    method public static void logE(java.lang.String, java.lang.Throwable);
-  }
-
-  public class Thread implements java.lang.Runnable {
-    method public static java.lang.Thread.UncaughtExceptionHandler getUncaughtExceptionPreHandler();
-    method public static void setUncaughtExceptionPreHandler(java.lang.Thread.UncaughtExceptionHandler);
-  }
-
-}
-
-package java.net {
-
-  public class DatagramSocket implements java.io.Closeable {
-    method public java.io.FileDescriptor getFileDescriptor$();
-  }
-
-  public final class Inet4Address extends java.net.InetAddress {
-    field public static final java.net.InetAddress ALL;
-    field public static final java.net.InetAddress ANY;
-    field public static final java.net.InetAddress LOOPBACK;
-  }
-
-  public final class Inet6Address extends java.net.InetAddress {
-    method public static java.net.Inet6Address getByAddress(java.lang.String, byte[], java.net.NetworkInterface) throws java.net.UnknownHostException;
-    method public static java.net.Inet6Address getByAddress(java.lang.String, byte[], int) throws java.net.UnknownHostException;
-    method public int getScopeId();
-    method public java.net.NetworkInterface getScopedInterface();
-    method public boolean isIPv4CompatibleAddress();
-    field public static final java.net.InetAddress ANY;
-    field public static final java.net.InetAddress LOOPBACK;
-  }
-
-  public class InetAddress implements java.io.Serializable {
-    method public static void clearDnsCache();
-    method public static java.net.InetAddress[] getAllByNameOnNet(java.lang.String, int) throws java.net.UnknownHostException;
-    method public static java.net.InetAddress getByNameOnNet(java.lang.String, int) throws java.net.UnknownHostException;
-    method public static boolean isNumeric(java.lang.String);
-    method public static java.net.InetAddress parseNumericAddress(java.lang.String);
-  }
-
-  public class InetSocketAddress extends java.net.SocketAddress {
-    ctor public InetSocketAddress();
-  }
-
-  public class ServerSocket implements java.io.Closeable {
-    method public java.net.SocketImpl getImpl() throws java.net.SocketException;
-  }
-
-  public class Socket implements java.io.Closeable {
-    method public java.io.FileDescriptor getFileDescriptor$();
-  }
-
-  public abstract class SocketImpl implements java.net.SocketOptions {
-    method public java.io.FileDescriptor getFD$();
-  }
-
-}
-
-package java.nio {
-
-  public abstract class ByteBuffer extends java.nio.Buffer implements java.lang.Comparable {
-    method public void setAccessible(boolean);
-  }
-
-  public class DirectByteBuffer extends java.nio.MappedByteBuffer {
-    ctor public DirectByteBuffer(int, long, java.io.FileDescriptor, java.lang.Runnable, boolean);
-    method public final long address();
-    method public final void setAccessible(boolean);
-  }
-
-  public final class NioUtils {
-    method public static void freeDirectBuffer(java.nio.ByteBuffer);
-    method public static byte[] unsafeArray(java.nio.ByteBuffer);
-    method public static int unsafeArrayOffset(java.nio.ByteBuffer);
-  }
-
-}
-
-package java.security {
-
-  public abstract class Provider extends java.util.Properties {
-    method public synchronized void warmUpServiceProvision();
-  }
-
-  public abstract class Signature extends java.security.SignatureSpi {
-    method public java.security.SignatureSpi getCurrentSpi();
-  }
-
-}
-
-package java.text {
-
-  public abstract class DateFormat extends java.text.Format {
-    method public static final void set24HourTimePref(java.lang.Boolean);
-  }
-
-}
-
-package java.util {
-
-  public class LinkedHashMap<K, V> extends java.util.HashMap implements java.util.Map {
-    method public java.util.Map.Entry<K, V> eldest();
-  }
-
-  public final class Locale implements java.lang.Cloneable java.io.Serializable {
-    method public static java.lang.String adjustLanguageCode(java.lang.String);
-  }
-
-}
-
-package java.util.concurrent {
-
-  public class CompletableFuture<T> implements java.util.concurrent.CompletionStage java.util.concurrent.Future {
-    method public java.util.concurrent.CompletableFuture<T> completeOnTimeout(T, long, java.util.concurrent.TimeUnit);
-    method public static <U> java.util.concurrent.CompletableFuture<U> failedFuture(java.lang.Throwable);
-  }
-
-}
-
-package java.util.zip {
-
-  public class ZipEntry implements java.lang.Cloneable {
-    method public long getDataOffset();
-  }
-
-}
-
-package javax.crypto {
-
-  public class Cipher {
-    method public javax.crypto.CipherSpi getCurrentSpi();
-  }
-
-  public class Mac implements java.lang.Cloneable {
-    method public javax.crypto.MacSpi getCurrentSpi();
-  }
-
-}
-
-package libcore.icu {
-
-  public final class DateIntervalFormat {
-    method public static java.lang.String formatDateRange(long, long, int, java.lang.String);
-  }
-
-  public final class ICU {
-    ctor public ICU();
-    method public static java.util.Locale addLikelySubtags(java.util.Locale);
-    method public static java.lang.String getBestDateTimePattern(java.lang.String, java.util.Locale);
-    method public static char[] getDateFormatOrder(java.lang.String);
-    method public static java.lang.String getTZDataVersion();
-  }
-
-  public final class LocaleData {
-    method public static libcore.icu.LocaleData get(java.util.Locale);
-    method public java.lang.String getDateFormat(int);
-    field public java.lang.String[] amPm;
-    field public java.lang.Integer firstDayOfWeek;
-    field public java.lang.String[] longMonthNames;
-    field public java.lang.String[] longStandAloneMonthNames;
-    field public java.lang.String[] longStandAloneWeekdayNames;
-    field public java.lang.String[] longWeekdayNames;
-    field public java.lang.String narrowAm;
-    field public java.lang.String narrowPm;
-    field public java.lang.String[] shortMonthNames;
-    field public java.lang.String[] shortStandAloneMonthNames;
-    field public java.lang.String[] shortStandAloneWeekdayNames;
-    field public java.lang.String[] shortWeekdayNames;
-    field public java.lang.String timeFormat_Hm;
-    field public java.lang.String timeFormat_Hms;
-    field public java.lang.String timeFormat_hm;
-    field public java.lang.String timeFormat_hms;
-    field public java.lang.String[] tinyMonthNames;
-    field public java.lang.String[] tinyStandAloneMonthNames;
-    field public java.lang.String[] tinyStandAloneWeekdayNames;
-    field public java.lang.String[] tinyWeekdayNames;
-    field public java.lang.String today;
-    field public java.lang.String yesterday;
-    field public char zeroDigit;
-  }
-
-  public final class RelativeDateTimeFormatter {
-    method public static java.lang.String getRelativeDateTimeString(java.util.Locale, java.util.TimeZone, long, long, long, long, int);
-    method public static java.lang.String getRelativeTimeSpanString(java.util.Locale, java.util.TimeZone, long, long, long, int);
-  }
-
-  public final class TimeZoneNames {
-  }
-
-  public static class TimeZoneNames.ZoneStringsCache extends libcore.util.BasicLruCache {
-  }
-
-}
-
-package libcore.internal {
-
-  public final class StringPool {
-    ctor public StringPool();
-    method public java.lang.String get(char[], int, int);
-  }
-
-}
-
-package libcore.io {
-
-  public final class DropBox {
-    ctor public DropBox();
-    method public static void setReporter(libcore.io.DropBox.Reporter);
-  }
-
-  public static abstract interface DropBox.Reporter {
-    method public abstract void addData(java.lang.String, byte[], int);
-    method public abstract void addText(java.lang.String, java.lang.String);
-  }
-
-  public final class EventLogger {
-    ctor public EventLogger();
-    method public static void setReporter(libcore.io.EventLogger.Reporter);
-  }
-
-  public static abstract interface EventLogger.Reporter {
-    method public abstract void report(int, java.lang.Object...);
-  }
-
-  public class ForwardingOs implements libcore.io.Os {
-    ctor protected ForwardingOs(libcore.io.Os);
-    method public boolean access(java.lang.String, int) throws android.system.ErrnoException;
-    method public java.io.FileDescriptor open(java.lang.String, int, int) throws android.system.ErrnoException;
-    method public android.system.StructStat stat(java.lang.String) throws android.system.ErrnoException;
-  }
-
-  public final class IoBridge {
-    method public static void closeAndSignalBlockedThreads(java.io.FileDescriptor) throws java.io.IOException;
-    method public static java.net.InetSocketAddress getLocalInetSocketAddress(java.io.FileDescriptor) throws java.net.SocketException;
-    method public static java.io.FileDescriptor open(java.lang.String, int) throws java.io.FileNotFoundException;
-    method public static int read(java.io.FileDescriptor, byte[], int, int) throws java.io.IOException;
-    method public static int recvfrom(boolean, java.io.FileDescriptor, byte[], int, int, int, java.net.DatagramPacket, boolean) throws java.io.IOException;
-    method public static int sendto(java.io.FileDescriptor, byte[], int, int, int, java.net.InetAddress, int) throws java.io.IOException;
-    method public static java.io.FileDescriptor socket(int, int, int) throws java.net.SocketException;
-    method public static void write(java.io.FileDescriptor, byte[], int, int) throws java.io.IOException;
-  }
-
-  public final class IoUtils {
-    method public static int acquireRawFd(java.io.FileDescriptor);
-    method public static void close(java.io.FileDescriptor) throws java.io.IOException;
-    method public static void closeQuietly(java.lang.AutoCloseable);
-    method public static void closeQuietly(java.io.FileDescriptor);
-    method public static void closeQuietly(java.net.Socket);
-    method public static deprecated java.io.File createTemporaryDirectory(java.lang.String);
-    method public static deprecated void deleteContents(java.io.File) throws java.io.IOException;
-    method public static byte[] readFileAsByteArray(java.lang.String) throws java.io.IOException;
-    method public static java.lang.String readFileAsString(java.lang.String) throws java.io.IOException;
-    method public static void setBlocking(java.io.FileDescriptor, boolean) throws java.io.IOException;
-    method public static void setFdOwner(java.io.FileDescriptor, java.lang.Object);
-  }
-
-  public final class Libcore {
-  }
-
-  public final class Memory {
-    method public static void memmove(java.lang.Object, int, java.lang.Object, int, long);
-    method public static int peekInt(byte[], int, java.nio.ByteOrder);
-    method public static short peekShort(byte[], int, java.nio.ByteOrder);
-    method public static void pokeInt(byte[], int, int, java.nio.ByteOrder);
-    method public static void pokeLong(byte[], int, long, java.nio.ByteOrder);
-    method public static void pokeShort(byte[], int, short, java.nio.ByteOrder);
-  }
-
-  public abstract interface Os {
-    method public static boolean compareAndSetDefault(libcore.io.Os, libcore.io.Os);
-    method public static libcore.io.Os getDefault();
-  }
-
-  public final class SizeOf {
-    field public static final int INT = 4; // 0x4
-    field public static final int SHORT = 2; // 0x2
-  }
-
-  public final class Streams {
-    method public static int copy(java.io.InputStream, java.io.OutputStream) throws java.io.IOException;
-    method public static void readFully(java.io.InputStream, byte[]) throws java.io.IOException;
-    method public static byte[] readFully(java.io.InputStream) throws java.io.IOException;
-    method public static java.lang.String readFully(java.io.Reader) throws java.io.IOException;
-    method public static byte[] readFullyNoClose(java.io.InputStream) throws java.io.IOException;
-    method public static int readSingleByte(java.io.InputStream) throws java.io.IOException;
-    method public static long skipByReading(java.io.InputStream, long) throws java.io.IOException;
-    method public static void writeSingleByte(java.io.OutputStream, int) throws java.io.IOException;
-  }
-
-}
-
-package libcore.mmodule.libart {
-
-  public class DemoLibartClass {
-    method public static java.lang.String corePlatformApiMethod();
-  }
-
-}
-
-package libcore.net {
-
-  public final class MimeUtils {
-    ctor public MimeUtils();
-    method public static java.lang.String guessExtensionFromMimeType(java.lang.String);
-    method public static java.lang.String guessMimeTypeFromExtension(java.lang.String);
-    method public static boolean hasExtension(java.lang.String);
-    method public static boolean hasMimeType(java.lang.String);
-  }
-
-  public abstract class NetworkSecurityPolicy {
-    ctor public NetworkSecurityPolicy();
-    method public static libcore.net.NetworkSecurityPolicy getInstance();
-    method public abstract boolean isCertificateTransparencyVerificationRequired(java.lang.String);
-    method public abstract boolean isCleartextTrafficPermitted();
-    method public abstract boolean isCleartextTrafficPermitted(java.lang.String);
-    method public static void setInstance(libcore.net.NetworkSecurityPolicy);
-  }
-
-}
-
-package libcore.net.event {
-
-  public class NetworkEventDispatcher {
-    method public static libcore.net.event.NetworkEventDispatcher getInstance();
-    method public void onNetworkConfigurationChanged();
-  }
-
-}
-
-package libcore.util {
-
-  public final class ArrayUtils {
-    method public static void throwsIfOutOfBounds(int, int, int);
-  }
-
-  public class BasicLruCache<K, V> {
-    ctor public BasicLruCache(int);
-  }
-
-  public final class CountryTimeZones {
-    method public java.lang.String getCountryIso();
-    method public java.lang.String getDefaultTimeZoneId();
-    method public java.util.List<libcore.util.CountryTimeZones.TimeZoneMapping> getTimeZoneMappings();
-    method public boolean hasUtcZone(long);
-    method public boolean isDefaultOkForCountryTimeZoneDetection(long);
-    method public boolean isForCountryCode(java.lang.String);
-    method public deprecated libcore.util.CountryTimeZones.OffsetResult lookupByOffsetWithBias(int, boolean, long, android.icu.util.TimeZone);
-  }
-
-  public static final class CountryTimeZones.OffsetResult {
-    field public final boolean mOneMatch;
-    field public final android.icu.util.TimeZone mTimeZone;
-  }
-
-  public static final class CountryTimeZones.TimeZoneMapping {
-    method public static libcore.util.CountryTimeZones.TimeZoneMapping createForTests(java.lang.String, boolean, java.lang.Long);
-    field public final java.lang.Long notUsedAfter;
-    field public final boolean showInPicker;
-    field public final java.lang.String timeZoneId;
-  }
-
-  public final class CountryZonesFinder {
-    method public java.util.List<java.lang.String> lookupAllCountryIsoCodes();
-    method public libcore.util.CountryTimeZones lookupCountryTimeZones(java.lang.String);
-    method public java.util.List<libcore.util.CountryTimeZones> lookupCountryTimeZonesForZoneId(java.lang.String);
-  }
-
-  public final class EmptyArray {
-    field public static final boolean[] BOOLEAN;
-    field public static final byte[] BYTE;
-    field public static final float[] FLOAT;
-    field public static final int[] INT;
-    field public static final long[] LONG;
-    field public static final java.lang.Object[] OBJECT;
-    field public static final java.lang.String[] STRING;
-  }
-
-  public class HexEncoding {
-    method public static byte[] decode(java.lang.String) throws java.lang.IllegalArgumentException;
-    method public static byte[] decode(char[]) throws java.lang.IllegalArgumentException;
-    method public static byte[] decode(char[], boolean) throws java.lang.IllegalArgumentException;
-    method public static char[] encode(byte[]);
-    method public static char[] encode(byte[], int, int);
-    method public static java.lang.String encodeToString(byte[]);
-  }
-
-  public class NativeAllocationRegistry {
-    ctor public NativeAllocationRegistry(java.lang.ClassLoader, long, long);
-    method public static void applyFreeFunction(long, long);
-    method public java.lang.Runnable registerNativeAllocation(java.lang.Object, long);
-  }
-
-  public class SneakyThrow {
-    ctor public SneakyThrow();
-    method public static void sneakyThrow(java.lang.Throwable);
-  }
-
-  public final class TimeZoneFinder {
-    method public static libcore.util.TimeZoneFinder createInstance(java.lang.String) throws java.io.IOException;
-    method public libcore.util.CountryZonesFinder getCountryZonesFinder();
-    method public java.lang.String getIanaVersion();
-    method public static libcore.util.TimeZoneFinder getInstance();
-    method public libcore.util.CountryTimeZones lookupCountryTimeZones(java.lang.String);
-    method public java.lang.String lookupDefaultTimeZoneIdByCountry(java.lang.String);
-    method public android.icu.util.TimeZone lookupTimeZoneByCountryAndOffset(java.lang.String, int, boolean, long, android.icu.util.TimeZone);
-    method public java.util.List<java.lang.String> lookupTimeZoneIdsByCountry(java.lang.String);
-    method public java.util.List<android.icu.util.TimeZone> lookupTimeZonesByCountry(java.lang.String);
-    method public void validate() throws java.io.IOException;
-  }
-
-  public class XmlObjectFactory {
-    method public static org.xml.sax.XMLReader newXMLReader();
-    method public static org.xmlpull.v1.XmlPullParser newXmlPullParser();
-    method public static org.xmlpull.v1.XmlSerializer newXmlSerializer();
-  }
-
-  public final class ZoneInfo extends java.util.TimeZone {
-  }
-
-  public static class ZoneInfo.WallTime {
-    ctor public ZoneInfo.WallTime();
-    method public int getGmtOffset();
-    method public int getHour();
-    method public int getIsDst();
-    method public int getMinute();
-    method public int getMonth();
-    method public int getMonthDay();
-    method public int getSecond();
-    method public int getWeekDay();
-    method public int getYear();
-    method public int getYearDay();
-    method public void localtime(int, libcore.util.ZoneInfo);
-    method public int mktime(libcore.util.ZoneInfo);
-    method public void setGmtOffset(int);
-    method public void setHour(int);
-    method public void setIsDst(int);
-    method public void setMinute(int);
-    method public void setMonth(int);
-    method public void setMonthDay(int);
-    method public void setSecond(int);
-    method public void setWeekDay(int);
-    method public void setYear(int);
-    method public void setYearDay(int);
-  }
-
-  public final class ZoneInfoDB {
-    method public static libcore.util.ZoneInfoDB.TzData getInstance();
-  }
-
-  public static class ZoneInfoDB.TzData implements java.lang.AutoCloseable {
-    method public static java.lang.String getRulesVersion(java.io.File) throws java.io.IOException;
-    method public java.lang.String getVersion();
-    method public boolean hasTimeZone(java.lang.String) throws java.io.IOException;
-    method public static libcore.util.ZoneInfoDB.TzData loadTzData(java.lang.String);
-    method public libcore.util.ZoneInfo makeTimeZone(java.lang.String) throws java.io.IOException;
-    method public void validate() throws java.io.IOException;
-  }
-
-}
-
-package org.apache.harmony.dalvik {
-
-  public final class NativeTestTarget {
-    ctor public NativeTestTarget();
-    method public static void emptyInlineMethod();
-    method public static void emptyInternalStaticMethod();
-    method public void emptyJniMethod0();
-    method public void emptyJniMethod0_Fast();
-    method public void emptyJniMethod6(int, int, int, int, int, int);
-    method public void emptyJniMethod6L(java.lang.String, java.lang.String[], int[][], java.lang.Object, java.lang.Object[], java.lang.Object[][][][]);
-    method public void emptyJniMethod6L_Fast(java.lang.String, java.lang.String[], int[][], java.lang.Object, java.lang.Object[], java.lang.Object[][][][]);
-    method public void emptyJniMethod6_Fast(int, int, int, int, int, int);
-    method public static void emptyJniStaticMethod0();
-    method public static void emptyJniStaticMethod0_Critical();
-    method public static void emptyJniStaticMethod0_Fast();
-    method public static void emptyJniStaticMethod6(int, int, int, int, int, int);
-    method public static void emptyJniStaticMethod6L(java.lang.String, java.lang.String[], int[][], java.lang.Object, java.lang.Object[], java.lang.Object[][][][]);
-    method public static void emptyJniStaticMethod6L_Fast(java.lang.String, java.lang.String[], int[][], java.lang.Object, java.lang.Object[], java.lang.Object[][][][]);
-    method public static void emptyJniStaticMethod6_Critical(int, int, int, int, int, int);
-    method public static void emptyJniStaticMethod6_Fast(int, int, int, int, int, int);
-    method public static synchronized void emptyJniStaticSynchronizedMethod0();
-    method public synchronized void emptyJniSynchronizedMethod0();
-  }
-
-}
-
-package org.apache.harmony.dalvik.ddmc {
-
-  public class Chunk {
-    ctor public Chunk(int, byte[], int, int);
-    ctor public Chunk(int, java.nio.ByteBuffer);
-    field public int type;
-  }
-
-  public abstract class ChunkHandler {
-    ctor public ChunkHandler();
-    method public abstract void connected();
-    method public static org.apache.harmony.dalvik.ddmc.Chunk createFailChunk(int, java.lang.String);
-    method public abstract void disconnected();
-    method public static java.lang.String getString(java.nio.ByteBuffer, int);
-    method public abstract org.apache.harmony.dalvik.ddmc.Chunk handleChunk(org.apache.harmony.dalvik.ddmc.Chunk);
-    method public static java.lang.String name(int);
-    method public static void putString(java.nio.ByteBuffer, java.lang.String);
-    method public static int type(java.lang.String);
-    method public static java.nio.ByteBuffer wrapChunk(org.apache.harmony.dalvik.ddmc.Chunk);
-    field public static final java.nio.ByteOrder CHUNK_ORDER;
-  }
-
-  public class DdmServer {
-    method public static void registerHandler(int, org.apache.harmony.dalvik.ddmc.ChunkHandler);
-    method public static void registrationComplete();
-    method public static void sendChunk(org.apache.harmony.dalvik.ddmc.Chunk);
-    field public static final int CLIENT_PROTOCOL_VERSION = 1; // 0x1
-  }
-
-  public class DdmVmInternal {
-    method public static void enableRecentAllocations(boolean);
-    method public static boolean getRecentAllocationStatus();
-    method public static byte[] getRecentAllocations();
-    method public static java.lang.StackTraceElement[] getStackTraceById(int);
-    method public static byte[] getThreadStats();
-    method public static boolean heapInfoNotify(int);
-    method public static boolean heapSegmentNotify(int, int, boolean);
-    method public static void threadNotify(boolean);
-  }
-
-}
-
-package org.json {
-
-  public class JSONObject {
-    method public java.util.Set<java.lang.String> keySet();
-  }
-
-}
-
-package sun.misc {
-
-  public class Cleaner extends java.lang.ref.PhantomReference {
-    method public void clean();
-    method public static sun.misc.Cleaner create(java.lang.Object, java.lang.Runnable);
-  }
-
-}
-
-package sun.security.jca {
-
-  public class Providers {
-    method public static java.lang.Object startJarVerification();
-    method public static void stopJarVerification(java.lang.Object);
-  }
-
-}
-
-package sun.security.pkcs {
-
-  public class ContentInfo {
-    method public byte[] getContentBytes() throws java.io.IOException;
-  }
-
-  public class PKCS7 {
-    ctor public PKCS7(java.io.InputStream) throws java.io.IOException, sun.security.pkcs.ParsingException;
-    ctor public PKCS7(byte[]) throws sun.security.pkcs.ParsingException;
-    method public java.security.cert.X509Certificate[] getCertificates();
-    method public sun.security.pkcs.ContentInfo getContentInfo();
-    method public sun.security.pkcs.SignerInfo[] getSignerInfos();
-    method public sun.security.pkcs.SignerInfo verify(sun.security.pkcs.SignerInfo, java.io.InputStream) throws java.io.IOException, java.security.NoSuchAlgorithmException, java.security.SignatureException;
-    method public sun.security.pkcs.SignerInfo[] verify(byte[]) throws java.security.NoSuchAlgorithmException, java.security.SignatureException;
-  }
-
-  public class ParsingException extends java.io.IOException {
-  }
-
-  public class SignerInfo {
-    ctor public SignerInfo();
-    method public java.util.ArrayList<java.security.cert.X509Certificate> getCertificateChain(sun.security.pkcs.PKCS7) throws java.io.IOException;
-  }
-
-}
-
-package sun.security.util {
-
-  public final class ObjectIdentifier implements java.io.Serializable {
-    ctor public ObjectIdentifier(java.lang.String) throws java.io.IOException;
-  }
-
-}
-
-package sun.security.x509 {
-
-  public class AlgorithmId implements java.io.Serializable {
-    ctor public AlgorithmId(sun.security.util.ObjectIdentifier);
-    method public java.lang.String getName();
-  }
-
-}
-
-package sun.util.locale {
-
-  public class LanguageTag {
-    method public static boolean isLanguage(java.lang.String);
-  }
-
-}
-
diff --git a/non_openjdk_java_files.bp b/non_openjdk_java_files.bp
index 642968d..af36fa9 100644
--- a/non_openjdk_java_files.bp
+++ b/non_openjdk_java_files.bp
@@ -42,6 +42,7 @@
         "dalvik/src/main/java/dalvik/annotation/codegen/CovariantReturnType.java",
         "dalvik/src/main/java/dalvik/annotation/compat/UnsupportedAppUsage.java",
         "dalvik/src/main/java/dalvik/annotation/optimization/CriticalNative.java",
+        "dalvik/src/main/java/dalvik/annotation/optimization/DeadReferenceSafe.java",
         "dalvik/src/main/java/dalvik/annotation/optimization/FastNative.java",
         "dalvik/src/main/java/dalvik/annotation/optimization/ReachabilitySensitive.java",
         "dalvik/src/main/java/dalvik/bytecode/OpcodeInfo.java",
diff --git a/ojluni/annotations/hiddenapi/java/util/HashMap.java b/ojluni/annotations/hiddenapi/java/util/HashMap.java
index 90db8fb..af1c342 100644
--- a/ojluni/annotations/hiddenapi/java/util/HashMap.java
+++ b/ojluni/annotations/hiddenapi/java/util/HashMap.java
@@ -290,6 +290,7 @@
     final class EntryIterator extends java.util.HashMap.HashIterator
             implements java.util.Iterator<java.util.Map.Entry<K, V>> {
 
+        @UnsupportedAppUsage(trackingBug = 122551864)
         public java.util.Map.Entry<K, V> next() {
             throw new RuntimeException("Stub!");
         }
@@ -367,7 +368,6 @@
             throw new RuntimeException("Stub!");
         }
 
-        @UnsupportedAppUsage
         public final boolean hasNext() {
             throw new RuntimeException("Stub!");
         }
@@ -376,7 +376,6 @@
             throw new RuntimeException("Stub!");
         }
 
-        @UnsupportedAppUsage
         public final void remove() {
             throw new RuntimeException("Stub!");
         }
diff --git a/ojluni/annotations/hiddenapi/java/util/LinkedHashMap.java b/ojluni/annotations/hiddenapi/java/util/LinkedHashMap.java
index 9dd8e37..8294334 100644
--- a/ojluni/annotations/hiddenapi/java/util/LinkedHashMap.java
+++ b/ojluni/annotations/hiddenapi/java/util/LinkedHashMap.java
@@ -210,7 +210,6 @@
             throw new RuntimeException("Stub!");
         }
 
-        @UnsupportedAppUsage
         public final boolean hasNext() {
             throw new RuntimeException("Stub!");
         }
diff --git a/ojluni/annotations/hiddenapi/java/util/concurrent/ConcurrentHashMap.java b/ojluni/annotations/hiddenapi/java/util/concurrent/ConcurrentHashMap.java
deleted file mode 100644
index 86d503f..0000000
--- a/ojluni/annotations/hiddenapi/java/util/concurrent/ConcurrentHashMap.java
+++ /dev/null
@@ -1,2788 +0,0 @@
-/*
- * 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
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * This file is available under and governed by the GNU General Public
- * License version 2 only, as published by the Free Software Foundation.
- * However, the following notice accompanied the original version of this
- * file:
- *
- * Written by Doug Lea with assistance from members of JCP JSR-166
- * Expert Group and released to the public domain, as explained at
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-package java.util.concurrent;
-
-import dalvik.annotation.compat.UnsupportedAppUsage;
-
-@SuppressWarnings({"unchecked", "deprecation", "all"})
-public class ConcurrentHashMap<K, V> extends java.util.AbstractMap<K, V>
-        implements java.util.concurrent.ConcurrentMap<K, V>, java.io.Serializable {
-
-    public ConcurrentHashMap() {
-        throw new RuntimeException("Stub!");
-    }
-
-    public ConcurrentHashMap(int initialCapacity) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public ConcurrentHashMap(java.util.Map<? extends K, ? extends V> m) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public ConcurrentHashMap(int initialCapacity, float loadFactor) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public ConcurrentHashMap(int initialCapacity, float loadFactor, int concurrencyLevel) {
-        throw new RuntimeException("Stub!");
-    }
-
-    static final int spread(int h) {
-        throw new RuntimeException("Stub!");
-    }
-
-    private static final int tableSizeFor(int c) {
-        throw new RuntimeException("Stub!");
-    }
-
-    static java.lang.Class<?> comparableClassFor(java.lang.Object x) {
-        throw new RuntimeException("Stub!");
-    }
-
-    static int compareComparables(java.lang.Class<?> kc, java.lang.Object k, java.lang.Object x) {
-        throw new RuntimeException("Stub!");
-    }
-
-    static final <K, V> java.util.concurrent.ConcurrentHashMap.Node<K, V> tabAt(
-            java.util.concurrent.ConcurrentHashMap.Node<K, V>[] tab, int i) {
-        throw new RuntimeException("Stub!");
-    }
-
-    static final <K, V> boolean casTabAt(
-            java.util.concurrent.ConcurrentHashMap.Node<K, V>[] tab,
-            int i,
-            java.util.concurrent.ConcurrentHashMap.Node<K, V> c,
-            java.util.concurrent.ConcurrentHashMap.Node<K, V> v) {
-        throw new RuntimeException("Stub!");
-    }
-
-    static final <K, V> void setTabAt(
-            java.util.concurrent.ConcurrentHashMap.Node<K, V>[] tab,
-            int i,
-            java.util.concurrent.ConcurrentHashMap.Node<K, V> v) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public int size() {
-        throw new RuntimeException("Stub!");
-    }
-
-    public boolean isEmpty() {
-        throw new RuntimeException("Stub!");
-    }
-
-    public V get(java.lang.Object key) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public boolean containsKey(java.lang.Object key) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public boolean containsValue(java.lang.Object value) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public V put(K key, V value) {
-        throw new RuntimeException("Stub!");
-    }
-
-    final V putVal(K key, V value, boolean onlyIfAbsent) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public void putAll(java.util.Map<? extends K, ? extends V> m) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public V remove(java.lang.Object key) {
-        throw new RuntimeException("Stub!");
-    }
-
-    final V replaceNode(java.lang.Object key, V value, java.lang.Object cv) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public void clear() {
-        throw new RuntimeException("Stub!");
-    }
-
-    public java.util.Set<K> keySet() {
-        throw new RuntimeException("Stub!");
-    }
-
-    public java.util.Collection<V> values() {
-        throw new RuntimeException("Stub!");
-    }
-
-    public java.util.Set<java.util.Map.Entry<K, V>> entrySet() {
-        throw new RuntimeException("Stub!");
-    }
-
-    public int hashCode() {
-        throw new RuntimeException("Stub!");
-    }
-
-    public java.lang.String toString() {
-        throw new RuntimeException("Stub!");
-    }
-
-    public boolean equals(java.lang.Object o) {
-        throw new RuntimeException("Stub!");
-    }
-
-    private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
-        throw new RuntimeException("Stub!");
-    }
-
-    private void readObject(java.io.ObjectInputStream s)
-            throws java.lang.ClassNotFoundException, java.io.IOException {
-        throw new RuntimeException("Stub!");
-    }
-
-    public V putIfAbsent(K key, V value) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public boolean remove(java.lang.Object key, java.lang.Object value) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public boolean replace(K key, V oldValue, V newValue) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public V replace(K key, V value) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public V getOrDefault(java.lang.Object key, V defaultValue) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public void forEach(java.util.function.BiConsumer<? super K, ? super V> action) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public void replaceAll(
-            java.util.function.BiFunction<? super K, ? super V, ? extends V> function) {
-        throw new RuntimeException("Stub!");
-    }
-
-    boolean removeEntryIf(
-            java.util.function.Predicate<? super java.util.Map.Entry<K, V>> function) {
-        throw new RuntimeException("Stub!");
-    }
-
-    boolean removeValueIf(java.util.function.Predicate<? super V> function) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public V computeIfAbsent(
-            K key, java.util.function.Function<? super K, ? extends V> mappingFunction) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public V computeIfPresent(
-            K key,
-            java.util.function.BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public V compute(
-            K key,
-            java.util.function.BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public V merge(
-            K key,
-            V value,
-            java.util.function.BiFunction<? super V, ? super V, ? extends V> remappingFunction) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public boolean contains(java.lang.Object value) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public java.util.Enumeration<K> keys() {
-        throw new RuntimeException("Stub!");
-    }
-
-    public java.util.Enumeration<V> elements() {
-        throw new RuntimeException("Stub!");
-    }
-
-    public long mappingCount() {
-        throw new RuntimeException("Stub!");
-    }
-
-    public static <K>
-            java.util.concurrent.ConcurrentHashMap.KeySetView<K, java.lang.Boolean> newKeySet() {
-        throw new RuntimeException("Stub!");
-    }
-
-    public static <K>
-            java.util.concurrent.ConcurrentHashMap.KeySetView<K, java.lang.Boolean> newKeySet(
-                    int initialCapacity) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public java.util.concurrent.ConcurrentHashMap.KeySetView<K, V> keySet(V mappedValue) {
-        throw new RuntimeException("Stub!");
-    }
-
-    static final int resizeStamp(int n) {
-        throw new RuntimeException("Stub!");
-    }
-
-    private final java.util.concurrent.ConcurrentHashMap.Node<K, V>[] initTable() {
-        throw new RuntimeException("Stub!");
-    }
-
-    private final void addCount(long x, int check) {
-        throw new RuntimeException("Stub!");
-    }
-
-    final java.util.concurrent.ConcurrentHashMap.Node<K, V>[] helpTransfer(
-            java.util.concurrent.ConcurrentHashMap.Node<K, V>[] tab,
-            java.util.concurrent.ConcurrentHashMap.Node<K, V> f) {
-        throw new RuntimeException("Stub!");
-    }
-
-    private final void tryPresize(int size) {
-        throw new RuntimeException("Stub!");
-    }
-
-    private final void transfer(
-            java.util.concurrent.ConcurrentHashMap.Node<K, V>[] tab,
-            java.util.concurrent.ConcurrentHashMap.Node<K, V>[] nextTab) {
-        throw new RuntimeException("Stub!");
-    }
-
-    final long sumCount() {
-        throw new RuntimeException("Stub!");
-    }
-
-    private final void fullAddCount(long x, boolean wasUncontended) {
-        throw new RuntimeException("Stub!");
-    }
-
-    private final void treeifyBin(
-            java.util.concurrent.ConcurrentHashMap.Node<K, V>[] tab, int index) {
-        throw new RuntimeException("Stub!");
-    }
-
-    static <K, V> java.util.concurrent.ConcurrentHashMap.Node<K, V> untreeify(
-            java.util.concurrent.ConcurrentHashMap.Node<K, V> b) {
-        throw new RuntimeException("Stub!");
-    }
-
-    final int batchFor(long b) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public void forEach(
-            long parallelismThreshold, java.util.function.BiConsumer<? super K, ? super V> action) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public <U> void forEach(
-            long parallelismThreshold,
-            java.util.function.BiFunction<? super K, ? super V, ? extends U> transformer,
-            java.util.function.Consumer<? super U> action) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public <U> U search(
-            long parallelismThreshold,
-            java.util.function.BiFunction<? super K, ? super V, ? extends U> searchFunction) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public <U> U reduce(
-            long parallelismThreshold,
-            java.util.function.BiFunction<? super K, ? super V, ? extends U> transformer,
-            java.util.function.BiFunction<? super U, ? super U, ? extends U> reducer) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public double reduceToDouble(
-            long parallelismThreshold,
-            java.util.function.ToDoubleBiFunction<? super K, ? super V> transformer,
-            double basis,
-            java.util.function.DoubleBinaryOperator reducer) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public long reduceToLong(
-            long parallelismThreshold,
-            java.util.function.ToLongBiFunction<? super K, ? super V> transformer,
-            long basis,
-            java.util.function.LongBinaryOperator reducer) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public int reduceToInt(
-            long parallelismThreshold,
-            java.util.function.ToIntBiFunction<? super K, ? super V> transformer,
-            int basis,
-            java.util.function.IntBinaryOperator reducer) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public void forEachKey(
-            long parallelismThreshold, java.util.function.Consumer<? super K> action) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public <U> void forEachKey(
-            long parallelismThreshold,
-            java.util.function.Function<? super K, ? extends U> transformer,
-            java.util.function.Consumer<? super U> action) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public <U> U searchKeys(
-            long parallelismThreshold,
-            java.util.function.Function<? super K, ? extends U> searchFunction) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public K reduceKeys(
-            long parallelismThreshold,
-            java.util.function.BiFunction<? super K, ? super K, ? extends K> reducer) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public <U> U reduceKeys(
-            long parallelismThreshold,
-            java.util.function.Function<? super K, ? extends U> transformer,
-            java.util.function.BiFunction<? super U, ? super U, ? extends U> reducer) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public double reduceKeysToDouble(
-            long parallelismThreshold,
-            java.util.function.ToDoubleFunction<? super K> transformer,
-            double basis,
-            java.util.function.DoubleBinaryOperator reducer) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public long reduceKeysToLong(
-            long parallelismThreshold,
-            java.util.function.ToLongFunction<? super K> transformer,
-            long basis,
-            java.util.function.LongBinaryOperator reducer) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public int reduceKeysToInt(
-            long parallelismThreshold,
-            java.util.function.ToIntFunction<? super K> transformer,
-            int basis,
-            java.util.function.IntBinaryOperator reducer) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public void forEachValue(
-            long parallelismThreshold, java.util.function.Consumer<? super V> action) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public <U> void forEachValue(
-            long parallelismThreshold,
-            java.util.function.Function<? super V, ? extends U> transformer,
-            java.util.function.Consumer<? super U> action) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public <U> U searchValues(
-            long parallelismThreshold,
-            java.util.function.Function<? super V, ? extends U> searchFunction) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public V reduceValues(
-            long parallelismThreshold,
-            java.util.function.BiFunction<? super V, ? super V, ? extends V> reducer) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public <U> U reduceValues(
-            long parallelismThreshold,
-            java.util.function.Function<? super V, ? extends U> transformer,
-            java.util.function.BiFunction<? super U, ? super U, ? extends U> reducer) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public double reduceValuesToDouble(
-            long parallelismThreshold,
-            java.util.function.ToDoubleFunction<? super V> transformer,
-            double basis,
-            java.util.function.DoubleBinaryOperator reducer) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public long reduceValuesToLong(
-            long parallelismThreshold,
-            java.util.function.ToLongFunction<? super V> transformer,
-            long basis,
-            java.util.function.LongBinaryOperator reducer) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public int reduceValuesToInt(
-            long parallelismThreshold,
-            java.util.function.ToIntFunction<? super V> transformer,
-            int basis,
-            java.util.function.IntBinaryOperator reducer) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public void forEachEntry(
-            long parallelismThreshold,
-            java.util.function.Consumer<? super java.util.Map.Entry<K, V>> action) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public <U> void forEachEntry(
-            long parallelismThreshold,
-            java.util.function.Function<java.util.Map.Entry<K, V>, ? extends U> transformer,
-            java.util.function.Consumer<? super U> action) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public <U> U searchEntries(
-            long parallelismThreshold,
-            java.util.function.Function<java.util.Map.Entry<K, V>, ? extends U> searchFunction) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public java.util.Map.Entry<K, V> reduceEntries(
-            long parallelismThreshold,
-            java.util.function.BiFunction<
-                            java.util.Map.Entry<K, V>,
-                            java.util.Map.Entry<K, V>,
-                            ? extends java.util.Map.Entry<K, V>>
-                    reducer) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public <U> U reduceEntries(
-            long parallelismThreshold,
-            java.util.function.Function<java.util.Map.Entry<K, V>, ? extends U> transformer,
-            java.util.function.BiFunction<? super U, ? super U, ? extends U> reducer) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public double reduceEntriesToDouble(
-            long parallelismThreshold,
-            java.util.function.ToDoubleFunction<java.util.Map.Entry<K, V>> transformer,
-            double basis,
-            java.util.function.DoubleBinaryOperator reducer) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public long reduceEntriesToLong(
-            long parallelismThreshold,
-            java.util.function.ToLongFunction<java.util.Map.Entry<K, V>> transformer,
-            long basis,
-            java.util.function.LongBinaryOperator reducer) {
-        throw new RuntimeException("Stub!");
-    }
-
-    public int reduceEntriesToInt(
-            long parallelismThreshold,
-            java.util.function.ToIntFunction<java.util.Map.Entry<K, V>> transformer,
-            int basis,
-            java.util.function.IntBinaryOperator reducer) {
-        throw new RuntimeException("Stub!");
-    }
-
-    private static final int ABASE;
-
-    static {
-        ABASE = 0;
-    }
-
-    private static final int ASHIFT;
-
-    static {
-        ASHIFT = 0;
-    }
-
-    private static final long BASECOUNT;
-
-    static {
-        BASECOUNT = 0;
-    }
-
-    private static final long CELLSBUSY;
-
-    static {
-        CELLSBUSY = 0;
-    }
-
-    private static final long CELLVALUE;
-
-    static {
-        CELLVALUE = 0;
-    }
-
-    private static final int DEFAULT_CAPACITY = 16; // 0x10
-
-    private static final int DEFAULT_CONCURRENCY_LEVEL = 16; // 0x10
-
-    static final int HASH_BITS = 2147483647; // 0x7fffffff
-
-    private static final float LOAD_FACTOR = 0.75f;
-
-    private static final int MAXIMUM_CAPACITY = 1073741824; // 0x40000000
-
-    static final int MAX_ARRAY_SIZE = 2147483639; // 0x7ffffff7
-
-    private static final int MAX_RESIZERS = 65535; // 0xffff
-
-    private static final int MIN_TRANSFER_STRIDE = 16; // 0x10
-
-    static final int MIN_TREEIFY_CAPACITY = 64; // 0x40
-
-    static final int MOVED = -1; // 0xffffffff
-
-    static final int NCPU;
-
-    static {
-        NCPU = 0;
-    }
-
-    static final int RESERVED = -3; // 0xfffffffd
-
-    private static final int RESIZE_STAMP_BITS = 16; // 0x10
-
-    private static final int RESIZE_STAMP_SHIFT = 16; // 0x10
-
-    private static final long SIZECTL;
-
-    static {
-        SIZECTL = 0;
-    }
-
-    private static final long TRANSFERINDEX;
-
-    static {
-        TRANSFERINDEX = 0;
-    }
-
-    static final int TREEBIN = -2; // 0xfffffffe
-
-    static final int TREEIFY_THRESHOLD = 8; // 0x8
-
-    private static final sun.misc.Unsafe U;
-
-    static {
-        U = null;
-    }
-
-    static final int UNTREEIFY_THRESHOLD = 6; // 0x6
-
-    private transient volatile long baseCount;
-
-    private transient volatile int cellsBusy;
-
-    private transient volatile java.util.concurrent.ConcurrentHashMap.CounterCell[] counterCells;
-
-    private transient java.util.concurrent.ConcurrentHashMap.EntrySetView<K, V> entrySet;
-
-    private transient java.util.concurrent.ConcurrentHashMap.KeySetView<K, V> keySet;
-
-    private transient volatile java.util.concurrent.ConcurrentHashMap.Node<K, V>[] nextTable;
-
-    private static final java.io.ObjectStreamField[] serialPersistentFields;
-
-    static {
-        serialPersistentFields = new java.io.ObjectStreamField[0];
-    }
-
-    private static final long serialVersionUID = 7249069246763182397L; // 0x6499de129d87293dL
-
-    private transient volatile int sizeCtl;
-
-    transient volatile java.util.concurrent.ConcurrentHashMap.Node<K, V>[] table;
-
-    private transient volatile int transferIndex;
-
-    private transient java.util.concurrent.ConcurrentHashMap.ValuesView<K, V> values;
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static class BaseIterator<K, V> extends java.util.concurrent.ConcurrentHashMap.Traverser<K, V> {
-
-        BaseIterator(
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] tab,
-                int size,
-                int index,
-                int limit,
-                java.util.concurrent.ConcurrentHashMap<K, V> map) {
-            super(null, 0, 0, 0);
-            throw new RuntimeException("Stub!");
-        }
-
-        public final boolean hasNext() {
-            throw new RuntimeException("Stub!");
-        }
-
-        @UnsupportedAppUsage
-        public final boolean hasMoreElements() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public final void remove() {
-            throw new RuntimeException("Stub!");
-        }
-
-        java.util.concurrent.ConcurrentHashMap.Node<K, V> lastReturned;
-
-        final java.util.concurrent.ConcurrentHashMap<K, V> map;
-
-        {
-            map = null;
-        }
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    abstract static class BulkTask<K, V, R> extends java.util.concurrent.CountedCompleter<R> {
-
-        BulkTask(
-                java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, ?> par,
-                int b,
-                int i,
-                int f,
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] t) {
-            throw new RuntimeException("Stub!");
-        }
-
-        final java.util.concurrent.ConcurrentHashMap.Node<K, V> advance() {
-            throw new RuntimeException("Stub!");
-        }
-
-        private void pushState(
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] t, int i, int n) {
-            throw new RuntimeException("Stub!");
-        }
-
-        private void recoverState(int n) {
-            throw new RuntimeException("Stub!");
-        }
-
-        int baseIndex;
-
-        int baseLimit;
-
-        final int baseSize;
-
-        {
-            baseSize = 0;
-        }
-
-        int batch;
-
-        int index;
-
-        java.util.concurrent.ConcurrentHashMap.Node<K, V> next;
-
-        java.util.concurrent.ConcurrentHashMap.TableStack<K, V> spare;
-
-        java.util.concurrent.ConcurrentHashMap.TableStack<K, V> stack;
-
-        java.util.concurrent.ConcurrentHashMap.Node<K, V>[] tab;
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    abstract static class CollectionView<K, V, E>
-            implements java.util.Collection<E>, java.io.Serializable {
-
-        CollectionView(java.util.concurrent.ConcurrentHashMap<K, V> map) {
-            throw new RuntimeException("Stub!");
-        }
-
-        public java.util.concurrent.ConcurrentHashMap<K, V> getMap() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public final void clear() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public final int size() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public final boolean isEmpty() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public abstract java.util.Iterator<E> iterator();
-
-        public abstract boolean contains(java.lang.Object o);
-
-        public abstract boolean remove(java.lang.Object o);
-
-        public final java.lang.Object[] toArray() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public final <T> T[] toArray(T[] a) {
-            throw new RuntimeException("Stub!");
-        }
-
-        public final java.lang.String toString() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public final boolean containsAll(java.util.Collection<?> c) {
-            throw new RuntimeException("Stub!");
-        }
-
-        public final boolean removeAll(java.util.Collection<?> c) {
-            throw new RuntimeException("Stub!");
-        }
-
-        public final boolean retainAll(java.util.Collection<?> c) {
-            throw new RuntimeException("Stub!");
-        }
-
-        private static final java.lang.String OOME_MSG = "Required array size too large";
-
-        final java.util.concurrent.ConcurrentHashMap<K, V> map;
-
-        {
-            map = null;
-        }
-
-        private static final long serialVersionUID = 7249069246763182397L; // 0x6499de129d87293dL
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class CounterCell {
-
-        CounterCell(long x) {
-            throw new RuntimeException("Stub!");
-        }
-
-        volatile long value;
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class EntryIterator<K, V>
-            extends java.util.concurrent.ConcurrentHashMap.BaseIterator<K, V>
-            implements java.util.Iterator<java.util.Map.Entry<K, V>> {
-
-        EntryIterator(
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] tab,
-                int index,
-                int size,
-                int limit,
-                java.util.concurrent.ConcurrentHashMap<K, V> map) {
-            super(null, 0, 0, 0, null);
-            throw new RuntimeException("Stub!");
-        }
-
-        public java.util.Map.Entry<K, V> next() {
-            throw new RuntimeException("Stub!");
-        }
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class EntrySetView<K, V>
-            extends java.util.concurrent.ConcurrentHashMap.CollectionView<
-                    K, V, java.util.Map.Entry<K, V>>
-            implements java.util.Set<java.util.Map.Entry<K, V>>, java.io.Serializable {
-
-        EntrySetView(java.util.concurrent.ConcurrentHashMap<K, V> map) {
-            super(null);
-            throw new RuntimeException("Stub!");
-        }
-
-        public boolean contains(java.lang.Object o) {
-            throw new RuntimeException("Stub!");
-        }
-
-        public boolean remove(java.lang.Object o) {
-            throw new RuntimeException("Stub!");
-        }
-
-        public java.util.Iterator<java.util.Map.Entry<K, V>> iterator() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public boolean add(java.util.Map.Entry<K, V> e) {
-            throw new RuntimeException("Stub!");
-        }
-
-        public boolean addAll(java.util.Collection<? extends java.util.Map.Entry<K, V>> c) {
-            throw new RuntimeException("Stub!");
-        }
-
-        public boolean removeIf(
-                java.util.function.Predicate<? super java.util.Map.Entry<K, V>> filter) {
-            throw new RuntimeException("Stub!");
-        }
-
-        public int hashCode() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public boolean equals(java.lang.Object o) {
-            throw new RuntimeException("Stub!");
-        }
-
-        public java.util.Spliterator<java.util.Map.Entry<K, V>> spliterator() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public void forEach(java.util.function.Consumer<? super java.util.Map.Entry<K, V>> action) {
-            throw new RuntimeException("Stub!");
-        }
-
-        private static final long serialVersionUID = 2249069246763182397L; // 0x1f364c905893293dL
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class EntrySpliterator<K, V>
-            extends java.util.concurrent.ConcurrentHashMap.Traverser<K, V>
-            implements java.util.Spliterator<java.util.Map.Entry<K, V>> {
-
-        EntrySpliterator(
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] tab,
-                int size,
-                int index,
-                int limit,
-                long est,
-                java.util.concurrent.ConcurrentHashMap<K, V> map) {
-            super(null, 0, 0, 0);
-            throw new RuntimeException("Stub!");
-        }
-
-        public java.util.concurrent.ConcurrentHashMap.EntrySpliterator<K, V> trySplit() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public void forEachRemaining(
-                java.util.function.Consumer<? super java.util.Map.Entry<K, V>> action) {
-            throw new RuntimeException("Stub!");
-        }
-
-        public boolean tryAdvance(
-                java.util.function.Consumer<? super java.util.Map.Entry<K, V>> action) {
-            throw new RuntimeException("Stub!");
-        }
-
-        public long estimateSize() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public int characteristics() {
-            throw new RuntimeException("Stub!");
-        }
-
-        long est;
-
-        final java.util.concurrent.ConcurrentHashMap<K, V> map;
-
-        {
-            map = null;
-        }
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class ForEachEntryTask<K, V>
-            extends java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, java.lang.Void> {
-
-        ForEachEntryTask(
-                java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, ?> p,
-                int b,
-                int i,
-                int f,
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] t,
-                java.util.function.Consumer<? super java.util.Map.Entry<K, V>> action) {
-            super(null, 0, 0, 0, null);
-            throw new RuntimeException("Stub!");
-        }
-
-        public void compute() {
-            throw new RuntimeException("Stub!");
-        }
-
-        final java.util.function.Consumer<? super java.util.Map.Entry<K, V>> action;
-
-        {
-            action = null;
-        }
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class ForEachKeyTask<K, V>
-            extends java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, java.lang.Void> {
-
-        ForEachKeyTask(
-                java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, ?> p,
-                int b,
-                int i,
-                int f,
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] t,
-                java.util.function.Consumer<? super K> action) {
-            super(null, 0, 0, 0, null);
-            throw new RuntimeException("Stub!");
-        }
-
-        public void compute() {
-            throw new RuntimeException("Stub!");
-        }
-
-        final java.util.function.Consumer<? super K> action;
-
-        {
-            action = null;
-        }
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class ForEachMappingTask<K, V>
-            extends java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, java.lang.Void> {
-
-        ForEachMappingTask(
-                java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, ?> p,
-                int b,
-                int i,
-                int f,
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] t,
-                java.util.function.BiConsumer<? super K, ? super V> action) {
-            super(null, 0, 0, 0, null);
-            throw new RuntimeException("Stub!");
-        }
-
-        public void compute() {
-            throw new RuntimeException("Stub!");
-        }
-
-        final java.util.function.BiConsumer<? super K, ? super V> action;
-
-        {
-            action = null;
-        }
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class ForEachTransformedEntryTask<K, V, U>
-            extends java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, java.lang.Void> {
-
-        ForEachTransformedEntryTask(
-                java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, ?> p,
-                int b,
-                int i,
-                int f,
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] t,
-                java.util.function.Function<java.util.Map.Entry<K, V>, ? extends U> transformer,
-                java.util.function.Consumer<? super U> action) {
-            super(null, 0, 0, 0, null);
-            throw new RuntimeException("Stub!");
-        }
-
-        public void compute() {
-            throw new RuntimeException("Stub!");
-        }
-
-        final java.util.function.Consumer<? super U> action;
-
-        {
-            action = null;
-        }
-
-        final java.util.function.Function<java.util.Map.Entry<K, V>, ? extends U> transformer;
-
-        {
-            transformer = null;
-        }
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class ForEachTransformedKeyTask<K, V, U>
-            extends java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, java.lang.Void> {
-
-        ForEachTransformedKeyTask(
-                java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, ?> p,
-                int b,
-                int i,
-                int f,
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] t,
-                java.util.function.Function<? super K, ? extends U> transformer,
-                java.util.function.Consumer<? super U> action) {
-            super(null, 0, 0, 0, null);
-            throw new RuntimeException("Stub!");
-        }
-
-        public void compute() {
-            throw new RuntimeException("Stub!");
-        }
-
-        final java.util.function.Consumer<? super U> action;
-
-        {
-            action = null;
-        }
-
-        final java.util.function.Function<? super K, ? extends U> transformer;
-
-        {
-            transformer = null;
-        }
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class ForEachTransformedMappingTask<K, V, U>
-            extends java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, java.lang.Void> {
-
-        ForEachTransformedMappingTask(
-                java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, ?> p,
-                int b,
-                int i,
-                int f,
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] t,
-                java.util.function.BiFunction<? super K, ? super V, ? extends U> transformer,
-                java.util.function.Consumer<? super U> action) {
-            super(null, 0, 0, 0, null);
-            throw new RuntimeException("Stub!");
-        }
-
-        public void compute() {
-            throw new RuntimeException("Stub!");
-        }
-
-        final java.util.function.Consumer<? super U> action;
-
-        {
-            action = null;
-        }
-
-        final java.util.function.BiFunction<? super K, ? super V, ? extends U> transformer;
-
-        {
-            transformer = null;
-        }
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class ForEachTransformedValueTask<K, V, U>
-            extends java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, java.lang.Void> {
-
-        ForEachTransformedValueTask(
-                java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, ?> p,
-                int b,
-                int i,
-                int f,
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] t,
-                java.util.function.Function<? super V, ? extends U> transformer,
-                java.util.function.Consumer<? super U> action) {
-            super(null, 0, 0, 0, null);
-            throw new RuntimeException("Stub!");
-        }
-
-        public void compute() {
-            throw new RuntimeException("Stub!");
-        }
-
-        final java.util.function.Consumer<? super U> action;
-
-        {
-            action = null;
-        }
-
-        final java.util.function.Function<? super V, ? extends U> transformer;
-
-        {
-            transformer = null;
-        }
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class ForEachValueTask<K, V>
-            extends java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, java.lang.Void> {
-
-        ForEachValueTask(
-                java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, ?> p,
-                int b,
-                int i,
-                int f,
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] t,
-                java.util.function.Consumer<? super V> action) {
-            super(null, 0, 0, 0, null);
-            throw new RuntimeException("Stub!");
-        }
-
-        public void compute() {
-            throw new RuntimeException("Stub!");
-        }
-
-        final java.util.function.Consumer<? super V> action;
-
-        {
-            action = null;
-        }
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class ForwardingNode<K, V>
-            extends java.util.concurrent.ConcurrentHashMap.Node<K, V> {
-
-        ForwardingNode(java.util.concurrent.ConcurrentHashMap.Node<K, V>[] tab) {
-            super(0, null, null, null);
-            throw new RuntimeException("Stub!");
-        }
-
-        java.util.concurrent.ConcurrentHashMap.Node<K, V> find(int h, java.lang.Object k) {
-            throw new RuntimeException("Stub!");
-        }
-
-        final java.util.concurrent.ConcurrentHashMap.Node<K, V>[] nextTable;
-
-        {
-            nextTable = new java.util.concurrent.ConcurrentHashMap.Node[0];
-        }
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class KeyIterator<K, V>
-            extends java.util.concurrent.ConcurrentHashMap.BaseIterator<K, V>
-            implements java.util.Iterator<K>, java.util.Enumeration<K> {
-
-        KeyIterator(
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] tab,
-                int index,
-                int size,
-                int limit,
-                java.util.concurrent.ConcurrentHashMap<K, V> map) {
-            super(null, 0, 0, 0, null);
-            throw new RuntimeException("Stub!");
-        }
-
-        public K next() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public K nextElement() {
-            throw new RuntimeException("Stub!");
-        }
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    public static class KeySetView<K, V>
-            extends java.util.concurrent.ConcurrentHashMap.CollectionView<K, V, K>
-            implements java.util.Set<K>, java.io.Serializable {
-
-        KeySetView(java.util.concurrent.ConcurrentHashMap<K, V> map, V value) {
-            super(null);
-            throw new RuntimeException("Stub!");
-        }
-
-        public V getMappedValue() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public boolean contains(java.lang.Object o) {
-            throw new RuntimeException("Stub!");
-        }
-
-        public boolean remove(java.lang.Object o) {
-            throw new RuntimeException("Stub!");
-        }
-
-        public java.util.Iterator<K> iterator() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public boolean add(K e) {
-            throw new RuntimeException("Stub!");
-        }
-
-        public boolean addAll(java.util.Collection<? extends K> c) {
-            throw new RuntimeException("Stub!");
-        }
-
-        public int hashCode() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public boolean equals(java.lang.Object o) {
-            throw new RuntimeException("Stub!");
-        }
-
-        public java.util.Spliterator<K> spliterator() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public void forEach(java.util.function.Consumer<? super K> action) {
-            throw new RuntimeException("Stub!");
-        }
-
-        private static final long serialVersionUID = 7249069246763182397L; // 0x6499de129d87293dL
-
-        private final V value;
-
-        {
-            value = null;
-        }
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class KeySpliterator<K, V>
-            extends java.util.concurrent.ConcurrentHashMap.Traverser<K, V>
-            implements java.util.Spliterator<K> {
-
-        KeySpliterator(
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] tab,
-                int size,
-                int index,
-                int limit,
-                long est) {
-            super(null, 0, 0, 0);
-            throw new RuntimeException("Stub!");
-        }
-
-        public java.util.concurrent.ConcurrentHashMap.KeySpliterator<K, V> trySplit() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public void forEachRemaining(java.util.function.Consumer<? super K> action) {
-            throw new RuntimeException("Stub!");
-        }
-
-        public boolean tryAdvance(java.util.function.Consumer<? super K> action) {
-            throw new RuntimeException("Stub!");
-        }
-
-        public long estimateSize() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public int characteristics() {
-            throw new RuntimeException("Stub!");
-        }
-
-        long est;
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class MapEntry<K, V> implements java.util.Map.Entry<K, V> {
-
-        MapEntry(K key, V val, java.util.concurrent.ConcurrentHashMap<K, V> map) {
-            throw new RuntimeException("Stub!");
-        }
-
-        public K getKey() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public V getValue() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public int hashCode() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public java.lang.String toString() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public boolean equals(java.lang.Object o) {
-            throw new RuntimeException("Stub!");
-        }
-
-        public V setValue(V value) {
-            throw new RuntimeException("Stub!");
-        }
-
-        final K key;
-
-        {
-            key = null;
-        }
-
-        final java.util.concurrent.ConcurrentHashMap<K, V> map;
-
-        {
-            map = null;
-        }
-
-        V val;
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class MapReduceEntriesTask<K, V, U>
-            extends java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, U> {
-
-        MapReduceEntriesTask(
-                java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, ?> p,
-                int b,
-                int i,
-                int f,
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] t,
-                java.util.concurrent.ConcurrentHashMap.MapReduceEntriesTask<K, V, U> nextRight,
-                java.util.function.Function<java.util.Map.Entry<K, V>, ? extends U> transformer,
-                java.util.function.BiFunction<? super U, ? super U, ? extends U> reducer) {
-            super(null, 0, 0, 0, null);
-            throw new RuntimeException("Stub!");
-        }
-
-        public U getRawResult() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public void compute() {
-            throw new RuntimeException("Stub!");
-        }
-
-        java.util.concurrent.ConcurrentHashMap.MapReduceEntriesTask<K, V, U> nextRight;
-
-        final java.util.function.BiFunction<? super U, ? super U, ? extends U> reducer;
-
-        {
-            reducer = null;
-        }
-
-        U result;
-
-        java.util.concurrent.ConcurrentHashMap.MapReduceEntriesTask<K, V, U> rights;
-
-        final java.util.function.Function<java.util.Map.Entry<K, V>, ? extends U> transformer;
-
-        {
-            transformer = null;
-        }
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class MapReduceEntriesToDoubleTask<K, V>
-            extends java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, java.lang.Double> {
-
-        MapReduceEntriesToDoubleTask(
-                java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, ?> p,
-                int b,
-                int i,
-                int f,
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] t,
-                java.util.concurrent.ConcurrentHashMap.MapReduceEntriesToDoubleTask<K, V> nextRight,
-                java.util.function.ToDoubleFunction<java.util.Map.Entry<K, V>> transformer,
-                double basis,
-                java.util.function.DoubleBinaryOperator reducer) {
-            super(null, 0, 0, 0, null);
-            throw new RuntimeException("Stub!");
-        }
-
-        public java.lang.Double getRawResult() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public void compute() {
-            throw new RuntimeException("Stub!");
-        }
-
-        final double basis;
-
-        {
-            basis = 0;
-        }
-
-        java.util.concurrent.ConcurrentHashMap.MapReduceEntriesToDoubleTask<K, V> nextRight;
-
-        final java.util.function.DoubleBinaryOperator reducer;
-
-        {
-            reducer = null;
-        }
-
-        double result;
-
-        java.util.concurrent.ConcurrentHashMap.MapReduceEntriesToDoubleTask<K, V> rights;
-
-        final java.util.function.ToDoubleFunction<java.util.Map.Entry<K, V>> transformer;
-
-        {
-            transformer = null;
-        }
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class MapReduceEntriesToIntTask<K, V>
-            extends java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, java.lang.Integer> {
-
-        MapReduceEntriesToIntTask(
-                java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, ?> p,
-                int b,
-                int i,
-                int f,
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] t,
-                java.util.concurrent.ConcurrentHashMap.MapReduceEntriesToIntTask<K, V> nextRight,
-                java.util.function.ToIntFunction<java.util.Map.Entry<K, V>> transformer,
-                int basis,
-                java.util.function.IntBinaryOperator reducer) {
-            super(null, 0, 0, 0, null);
-            throw new RuntimeException("Stub!");
-        }
-
-        public java.lang.Integer getRawResult() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public void compute() {
-            throw new RuntimeException("Stub!");
-        }
-
-        final int basis;
-
-        {
-            basis = 0;
-        }
-
-        java.util.concurrent.ConcurrentHashMap.MapReduceEntriesToIntTask<K, V> nextRight;
-
-        final java.util.function.IntBinaryOperator reducer;
-
-        {
-            reducer = null;
-        }
-
-        int result;
-
-        java.util.concurrent.ConcurrentHashMap.MapReduceEntriesToIntTask<K, V> rights;
-
-        final java.util.function.ToIntFunction<java.util.Map.Entry<K, V>> transformer;
-
-        {
-            transformer = null;
-        }
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class MapReduceEntriesToLongTask<K, V>
-            extends java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, java.lang.Long> {
-
-        MapReduceEntriesToLongTask(
-                java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, ?> p,
-                int b,
-                int i,
-                int f,
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] t,
-                java.util.concurrent.ConcurrentHashMap.MapReduceEntriesToLongTask<K, V> nextRight,
-                java.util.function.ToLongFunction<java.util.Map.Entry<K, V>> transformer,
-                long basis,
-                java.util.function.LongBinaryOperator reducer) {
-            super(null, 0, 0, 0, null);
-            throw new RuntimeException("Stub!");
-        }
-
-        public java.lang.Long getRawResult() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public void compute() {
-            throw new RuntimeException("Stub!");
-        }
-
-        final long basis;
-
-        {
-            basis = 0;
-        }
-
-        java.util.concurrent.ConcurrentHashMap.MapReduceEntriesToLongTask<K, V> nextRight;
-
-        final java.util.function.LongBinaryOperator reducer;
-
-        {
-            reducer = null;
-        }
-
-        long result;
-
-        java.util.concurrent.ConcurrentHashMap.MapReduceEntriesToLongTask<K, V> rights;
-
-        final java.util.function.ToLongFunction<java.util.Map.Entry<K, V>> transformer;
-
-        {
-            transformer = null;
-        }
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class MapReduceKeysTask<K, V, U>
-            extends java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, U> {
-
-        MapReduceKeysTask(
-                java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, ?> p,
-                int b,
-                int i,
-                int f,
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] t,
-                java.util.concurrent.ConcurrentHashMap.MapReduceKeysTask<K, V, U> nextRight,
-                java.util.function.Function<? super K, ? extends U> transformer,
-                java.util.function.BiFunction<? super U, ? super U, ? extends U> reducer) {
-            super(null, 0, 0, 0, null);
-            throw new RuntimeException("Stub!");
-        }
-
-        public U getRawResult() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public void compute() {
-            throw new RuntimeException("Stub!");
-        }
-
-        java.util.concurrent.ConcurrentHashMap.MapReduceKeysTask<K, V, U> nextRight;
-
-        final java.util.function.BiFunction<? super U, ? super U, ? extends U> reducer;
-
-        {
-            reducer = null;
-        }
-
-        U result;
-
-        java.util.concurrent.ConcurrentHashMap.MapReduceKeysTask<K, V, U> rights;
-
-        final java.util.function.Function<? super K, ? extends U> transformer;
-
-        {
-            transformer = null;
-        }
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class MapReduceKeysToDoubleTask<K, V>
-            extends java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, java.lang.Double> {
-
-        MapReduceKeysToDoubleTask(
-                java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, ?> p,
-                int b,
-                int i,
-                int f,
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] t,
-                java.util.concurrent.ConcurrentHashMap.MapReduceKeysToDoubleTask<K, V> nextRight,
-                java.util.function.ToDoubleFunction<? super K> transformer,
-                double basis,
-                java.util.function.DoubleBinaryOperator reducer) {
-            super(null, 0, 0, 0, null);
-            throw new RuntimeException("Stub!");
-        }
-
-        public java.lang.Double getRawResult() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public void compute() {
-            throw new RuntimeException("Stub!");
-        }
-
-        final double basis;
-
-        {
-            basis = 0;
-        }
-
-        java.util.concurrent.ConcurrentHashMap.MapReduceKeysToDoubleTask<K, V> nextRight;
-
-        final java.util.function.DoubleBinaryOperator reducer;
-
-        {
-            reducer = null;
-        }
-
-        double result;
-
-        java.util.concurrent.ConcurrentHashMap.MapReduceKeysToDoubleTask<K, V> rights;
-
-        final java.util.function.ToDoubleFunction<? super K> transformer;
-
-        {
-            transformer = null;
-        }
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class MapReduceKeysToIntTask<K, V>
-            extends java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, java.lang.Integer> {
-
-        MapReduceKeysToIntTask(
-                java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, ?> p,
-                int b,
-                int i,
-                int f,
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] t,
-                java.util.concurrent.ConcurrentHashMap.MapReduceKeysToIntTask<K, V> nextRight,
-                java.util.function.ToIntFunction<? super K> transformer,
-                int basis,
-                java.util.function.IntBinaryOperator reducer) {
-            super(null, 0, 0, 0, null);
-            throw new RuntimeException("Stub!");
-        }
-
-        public java.lang.Integer getRawResult() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public void compute() {
-            throw new RuntimeException("Stub!");
-        }
-
-        final int basis;
-
-        {
-            basis = 0;
-        }
-
-        java.util.concurrent.ConcurrentHashMap.MapReduceKeysToIntTask<K, V> nextRight;
-
-        final java.util.function.IntBinaryOperator reducer;
-
-        {
-            reducer = null;
-        }
-
-        int result;
-
-        java.util.concurrent.ConcurrentHashMap.MapReduceKeysToIntTask<K, V> rights;
-
-        final java.util.function.ToIntFunction<? super K> transformer;
-
-        {
-            transformer = null;
-        }
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class MapReduceKeysToLongTask<K, V>
-            extends java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, java.lang.Long> {
-
-        MapReduceKeysToLongTask(
-                java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, ?> p,
-                int b,
-                int i,
-                int f,
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] t,
-                java.util.concurrent.ConcurrentHashMap.MapReduceKeysToLongTask<K, V> nextRight,
-                java.util.function.ToLongFunction<? super K> transformer,
-                long basis,
-                java.util.function.LongBinaryOperator reducer) {
-            super(null, 0, 0, 0, null);
-            throw new RuntimeException("Stub!");
-        }
-
-        public java.lang.Long getRawResult() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public void compute() {
-            throw new RuntimeException("Stub!");
-        }
-
-        final long basis;
-
-        {
-            basis = 0;
-        }
-
-        java.util.concurrent.ConcurrentHashMap.MapReduceKeysToLongTask<K, V> nextRight;
-
-        final java.util.function.LongBinaryOperator reducer;
-
-        {
-            reducer = null;
-        }
-
-        long result;
-
-        java.util.concurrent.ConcurrentHashMap.MapReduceKeysToLongTask<K, V> rights;
-
-        final java.util.function.ToLongFunction<? super K> transformer;
-
-        {
-            transformer = null;
-        }
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class MapReduceMappingsTask<K, V, U>
-            extends java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, U> {
-
-        MapReduceMappingsTask(
-                java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, ?> p,
-                int b,
-                int i,
-                int f,
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] t,
-                java.util.concurrent.ConcurrentHashMap.MapReduceMappingsTask<K, V, U> nextRight,
-                java.util.function.BiFunction<? super K, ? super V, ? extends U> transformer,
-                java.util.function.BiFunction<? super U, ? super U, ? extends U> reducer) {
-            super(null, 0, 0, 0, null);
-            throw new RuntimeException("Stub!");
-        }
-
-        public U getRawResult() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public void compute() {
-            throw new RuntimeException("Stub!");
-        }
-
-        java.util.concurrent.ConcurrentHashMap.MapReduceMappingsTask<K, V, U> nextRight;
-
-        final java.util.function.BiFunction<? super U, ? super U, ? extends U> reducer;
-
-        {
-            reducer = null;
-        }
-
-        U result;
-
-        java.util.concurrent.ConcurrentHashMap.MapReduceMappingsTask<K, V, U> rights;
-
-        final java.util.function.BiFunction<? super K, ? super V, ? extends U> transformer;
-
-        {
-            transformer = null;
-        }
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class MapReduceMappingsToDoubleTask<K, V>
-            extends java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, java.lang.Double> {
-
-        MapReduceMappingsToDoubleTask(
-                java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, ?> p,
-                int b,
-                int i,
-                int f,
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] t,
-                java.util.concurrent.ConcurrentHashMap.MapReduceMappingsToDoubleTask<K, V>
-                        nextRight,
-                java.util.function.ToDoubleBiFunction<? super K, ? super V> transformer,
-                double basis,
-                java.util.function.DoubleBinaryOperator reducer) {
-            super(null, 0, 0, 0, null);
-            throw new RuntimeException("Stub!");
-        }
-
-        public java.lang.Double getRawResult() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public void compute() {
-            throw new RuntimeException("Stub!");
-        }
-
-        final double basis;
-
-        {
-            basis = 0;
-        }
-
-        java.util.concurrent.ConcurrentHashMap.MapReduceMappingsToDoubleTask<K, V> nextRight;
-
-        final java.util.function.DoubleBinaryOperator reducer;
-
-        {
-            reducer = null;
-        }
-
-        double result;
-
-        java.util.concurrent.ConcurrentHashMap.MapReduceMappingsToDoubleTask<K, V> rights;
-
-        final java.util.function.ToDoubleBiFunction<? super K, ? super V> transformer;
-
-        {
-            transformer = null;
-        }
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class MapReduceMappingsToIntTask<K, V>
-            extends java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, java.lang.Integer> {
-
-        MapReduceMappingsToIntTask(
-                java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, ?> p,
-                int b,
-                int i,
-                int f,
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] t,
-                java.util.concurrent.ConcurrentHashMap.MapReduceMappingsToIntTask<K, V> nextRight,
-                java.util.function.ToIntBiFunction<? super K, ? super V> transformer,
-                int basis,
-                java.util.function.IntBinaryOperator reducer) {
-            super(null, 0, 0, 0, null);
-            throw new RuntimeException("Stub!");
-        }
-
-        public java.lang.Integer getRawResult() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public void compute() {
-            throw new RuntimeException("Stub!");
-        }
-
-        final int basis;
-
-        {
-            basis = 0;
-        }
-
-        java.util.concurrent.ConcurrentHashMap.MapReduceMappingsToIntTask<K, V> nextRight;
-
-        final java.util.function.IntBinaryOperator reducer;
-
-        {
-            reducer = null;
-        }
-
-        int result;
-
-        java.util.concurrent.ConcurrentHashMap.MapReduceMappingsToIntTask<K, V> rights;
-
-        final java.util.function.ToIntBiFunction<? super K, ? super V> transformer;
-
-        {
-            transformer = null;
-        }
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class MapReduceMappingsToLongTask<K, V>
-            extends java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, java.lang.Long> {
-
-        MapReduceMappingsToLongTask(
-                java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, ?> p,
-                int b,
-                int i,
-                int f,
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] t,
-                java.util.concurrent.ConcurrentHashMap.MapReduceMappingsToLongTask<K, V> nextRight,
-                java.util.function.ToLongBiFunction<? super K, ? super V> transformer,
-                long basis,
-                java.util.function.LongBinaryOperator reducer) {
-            super(null, 0, 0, 0, null);
-            throw new RuntimeException("Stub!");
-        }
-
-        public java.lang.Long getRawResult() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public void compute() {
-            throw new RuntimeException("Stub!");
-        }
-
-        final long basis;
-
-        {
-            basis = 0;
-        }
-
-        java.util.concurrent.ConcurrentHashMap.MapReduceMappingsToLongTask<K, V> nextRight;
-
-        final java.util.function.LongBinaryOperator reducer;
-
-        {
-            reducer = null;
-        }
-
-        long result;
-
-        java.util.concurrent.ConcurrentHashMap.MapReduceMappingsToLongTask<K, V> rights;
-
-        final java.util.function.ToLongBiFunction<? super K, ? super V> transformer;
-
-        {
-            transformer = null;
-        }
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class MapReduceValuesTask<K, V, U>
-            extends java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, U> {
-
-        MapReduceValuesTask(
-                java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, ?> p,
-                int b,
-                int i,
-                int f,
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] t,
-                java.util.concurrent.ConcurrentHashMap.MapReduceValuesTask<K, V, U> nextRight,
-                java.util.function.Function<? super V, ? extends U> transformer,
-                java.util.function.BiFunction<? super U, ? super U, ? extends U> reducer) {
-            super(null, 0, 0, 0, null);
-            throw new RuntimeException("Stub!");
-        }
-
-        public U getRawResult() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public void compute() {
-            throw new RuntimeException("Stub!");
-        }
-
-        java.util.concurrent.ConcurrentHashMap.MapReduceValuesTask<K, V, U> nextRight;
-
-        final java.util.function.BiFunction<? super U, ? super U, ? extends U> reducer;
-
-        {
-            reducer = null;
-        }
-
-        U result;
-
-        java.util.concurrent.ConcurrentHashMap.MapReduceValuesTask<K, V, U> rights;
-
-        final java.util.function.Function<? super V, ? extends U> transformer;
-
-        {
-            transformer = null;
-        }
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class MapReduceValuesToDoubleTask<K, V>
-            extends java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, java.lang.Double> {
-
-        MapReduceValuesToDoubleTask(
-                java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, ?> p,
-                int b,
-                int i,
-                int f,
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] t,
-                java.util.concurrent.ConcurrentHashMap.MapReduceValuesToDoubleTask<K, V> nextRight,
-                java.util.function.ToDoubleFunction<? super V> transformer,
-                double basis,
-                java.util.function.DoubleBinaryOperator reducer) {
-            super(null, 0, 0, 0, null);
-            throw new RuntimeException("Stub!");
-        }
-
-        public java.lang.Double getRawResult() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public void compute() {
-            throw new RuntimeException("Stub!");
-        }
-
-        final double basis;
-
-        {
-            basis = 0;
-        }
-
-        java.util.concurrent.ConcurrentHashMap.MapReduceValuesToDoubleTask<K, V> nextRight;
-
-        final java.util.function.DoubleBinaryOperator reducer;
-
-        {
-            reducer = null;
-        }
-
-        double result;
-
-        java.util.concurrent.ConcurrentHashMap.MapReduceValuesToDoubleTask<K, V> rights;
-
-        final java.util.function.ToDoubleFunction<? super V> transformer;
-
-        {
-            transformer = null;
-        }
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class MapReduceValuesToIntTask<K, V>
-            extends java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, java.lang.Integer> {
-
-        MapReduceValuesToIntTask(
-                java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, ?> p,
-                int b,
-                int i,
-                int f,
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] t,
-                java.util.concurrent.ConcurrentHashMap.MapReduceValuesToIntTask<K, V> nextRight,
-                java.util.function.ToIntFunction<? super V> transformer,
-                int basis,
-                java.util.function.IntBinaryOperator reducer) {
-            super(null, 0, 0, 0, null);
-            throw new RuntimeException("Stub!");
-        }
-
-        public java.lang.Integer getRawResult() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public void compute() {
-            throw new RuntimeException("Stub!");
-        }
-
-        final int basis;
-
-        {
-            basis = 0;
-        }
-
-        java.util.concurrent.ConcurrentHashMap.MapReduceValuesToIntTask<K, V> nextRight;
-
-        final java.util.function.IntBinaryOperator reducer;
-
-        {
-            reducer = null;
-        }
-
-        int result;
-
-        java.util.concurrent.ConcurrentHashMap.MapReduceValuesToIntTask<K, V> rights;
-
-        final java.util.function.ToIntFunction<? super V> transformer;
-
-        {
-            transformer = null;
-        }
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class MapReduceValuesToLongTask<K, V>
-            extends java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, java.lang.Long> {
-
-        MapReduceValuesToLongTask(
-                java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, ?> p,
-                int b,
-                int i,
-                int f,
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] t,
-                java.util.concurrent.ConcurrentHashMap.MapReduceValuesToLongTask<K, V> nextRight,
-                java.util.function.ToLongFunction<? super V> transformer,
-                long basis,
-                java.util.function.LongBinaryOperator reducer) {
-            super(null, 0, 0, 0, null);
-            throw new RuntimeException("Stub!");
-        }
-
-        public java.lang.Long getRawResult() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public void compute() {
-            throw new RuntimeException("Stub!");
-        }
-
-        final long basis;
-
-        {
-            basis = 0;
-        }
-
-        java.util.concurrent.ConcurrentHashMap.MapReduceValuesToLongTask<K, V> nextRight;
-
-        final java.util.function.LongBinaryOperator reducer;
-
-        {
-            reducer = null;
-        }
-
-        long result;
-
-        java.util.concurrent.ConcurrentHashMap.MapReduceValuesToLongTask<K, V> rights;
-
-        final java.util.function.ToLongFunction<? super V> transformer;
-
-        {
-            transformer = null;
-        }
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static class Node<K, V> implements java.util.Map.Entry<K, V> {
-
-        Node(int hash, K key, V val, java.util.concurrent.ConcurrentHashMap.Node<K, V> next) {
-            throw new RuntimeException("Stub!");
-        }
-
-        public final K getKey() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public final V getValue() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public final int hashCode() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public final java.lang.String toString() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public final V setValue(V value) {
-            throw new RuntimeException("Stub!");
-        }
-
-        public final boolean equals(java.lang.Object o) {
-            throw new RuntimeException("Stub!");
-        }
-
-        java.util.concurrent.ConcurrentHashMap.Node<K, V> find(int h, java.lang.Object k) {
-            throw new RuntimeException("Stub!");
-        }
-
-        final int hash;
-
-        {
-            hash = 0;
-        }
-
-        final K key;
-
-        {
-            key = null;
-        }
-
-        volatile java.util.concurrent.ConcurrentHashMap.Node<K, V> next;
-
-        volatile V val;
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class ReduceEntriesTask<K, V>
-            extends java.util.concurrent.ConcurrentHashMap.BulkTask<
-                    K, V, java.util.Map.Entry<K, V>> {
-
-        ReduceEntriesTask(
-                java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, ?> p,
-                int b,
-                int i,
-                int f,
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] t,
-                java.util.concurrent.ConcurrentHashMap.ReduceEntriesTask<K, V> nextRight,
-                java.util.function.BiFunction<
-                                java.util.Map.Entry<K, V>,
-                                java.util.Map.Entry<K, V>,
-                                ? extends java.util.Map.Entry<K, V>>
-                        reducer) {
-            super(null, 0, 0, 0, null);
-            throw new RuntimeException("Stub!");
-        }
-
-        public java.util.Map.Entry<K, V> getRawResult() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public void compute() {
-            throw new RuntimeException("Stub!");
-        }
-
-        java.util.concurrent.ConcurrentHashMap.ReduceEntriesTask<K, V> nextRight;
-
-        final java.util.function.BiFunction<
-                        java.util.Map.Entry<K, V>,
-                        java.util.Map.Entry<K, V>,
-                        ? extends java.util.Map.Entry<K, V>>
-                reducer;
-
-        {
-            reducer = null;
-        }
-
-        java.util.Map.Entry<K, V> result;
-
-        java.util.concurrent.ConcurrentHashMap.ReduceEntriesTask<K, V> rights;
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class ReduceKeysTask<K, V>
-            extends java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, K> {
-
-        ReduceKeysTask(
-                java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, ?> p,
-                int b,
-                int i,
-                int f,
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] t,
-                java.util.concurrent.ConcurrentHashMap.ReduceKeysTask<K, V> nextRight,
-                java.util.function.BiFunction<? super K, ? super K, ? extends K> reducer) {
-            super(null, 0, 0, 0, null);
-            throw new RuntimeException("Stub!");
-        }
-
-        public K getRawResult() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public void compute() {
-            throw new RuntimeException("Stub!");
-        }
-
-        java.util.concurrent.ConcurrentHashMap.ReduceKeysTask<K, V> nextRight;
-
-        final java.util.function.BiFunction<? super K, ? super K, ? extends K> reducer;
-
-        {
-            reducer = null;
-        }
-
-        K result;
-
-        java.util.concurrent.ConcurrentHashMap.ReduceKeysTask<K, V> rights;
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class ReduceValuesTask<K, V>
-            extends java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, V> {
-
-        ReduceValuesTask(
-                java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, ?> p,
-                int b,
-                int i,
-                int f,
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] t,
-                java.util.concurrent.ConcurrentHashMap.ReduceValuesTask<K, V> nextRight,
-                java.util.function.BiFunction<? super V, ? super V, ? extends V> reducer) {
-            super(null, 0, 0, 0, null);
-            throw new RuntimeException("Stub!");
-        }
-
-        public V getRawResult() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public void compute() {
-            throw new RuntimeException("Stub!");
-        }
-
-        java.util.concurrent.ConcurrentHashMap.ReduceValuesTask<K, V> nextRight;
-
-        final java.util.function.BiFunction<? super V, ? super V, ? extends V> reducer;
-
-        {
-            reducer = null;
-        }
-
-        V result;
-
-        java.util.concurrent.ConcurrentHashMap.ReduceValuesTask<K, V> rights;
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class ReservationNode<K, V>
-            extends java.util.concurrent.ConcurrentHashMap.Node<K, V> {
-
-        ReservationNode() {
-            super(0, null, null, null);
-            throw new RuntimeException("Stub!");
-        }
-
-        java.util.concurrent.ConcurrentHashMap.Node<K, V> find(int h, java.lang.Object k) {
-            throw new RuntimeException("Stub!");
-        }
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class SearchEntriesTask<K, V, U>
-            extends java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, U> {
-
-        SearchEntriesTask(
-                java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, ?> p,
-                int b,
-                int i,
-                int f,
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] t,
-                java.util.function.Function<java.util.Map.Entry<K, V>, ? extends U> searchFunction,
-                java.util.concurrent.atomic.AtomicReference<U> result) {
-            super(null, 0, 0, 0, null);
-            throw new RuntimeException("Stub!");
-        }
-
-        public U getRawResult() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public void compute() {
-            throw new RuntimeException("Stub!");
-        }
-
-        final java.util.concurrent.atomic.AtomicReference<U> result;
-
-        {
-            result = null;
-        }
-
-        final java.util.function.Function<java.util.Map.Entry<K, V>, ? extends U> searchFunction;
-
-        {
-            searchFunction = null;
-        }
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class SearchKeysTask<K, V, U>
-            extends java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, U> {
-
-        SearchKeysTask(
-                java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, ?> p,
-                int b,
-                int i,
-                int f,
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] t,
-                java.util.function.Function<? super K, ? extends U> searchFunction,
-                java.util.concurrent.atomic.AtomicReference<U> result) {
-            super(null, 0, 0, 0, null);
-            throw new RuntimeException("Stub!");
-        }
-
-        public U getRawResult() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public void compute() {
-            throw new RuntimeException("Stub!");
-        }
-
-        final java.util.concurrent.atomic.AtomicReference<U> result;
-
-        {
-            result = null;
-        }
-
-        final java.util.function.Function<? super K, ? extends U> searchFunction;
-
-        {
-            searchFunction = null;
-        }
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class SearchMappingsTask<K, V, U>
-            extends java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, U> {
-
-        SearchMappingsTask(
-                java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, ?> p,
-                int b,
-                int i,
-                int f,
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] t,
-                java.util.function.BiFunction<? super K, ? super V, ? extends U> searchFunction,
-                java.util.concurrent.atomic.AtomicReference<U> result) {
-            super(null, 0, 0, 0, null);
-            throw new RuntimeException("Stub!");
-        }
-
-        public U getRawResult() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public void compute() {
-            throw new RuntimeException("Stub!");
-        }
-
-        final java.util.concurrent.atomic.AtomicReference<U> result;
-
-        {
-            result = null;
-        }
-
-        final java.util.function.BiFunction<? super K, ? super V, ? extends U> searchFunction;
-
-        {
-            searchFunction = null;
-        }
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class SearchValuesTask<K, V, U>
-            extends java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, U> {
-
-        SearchValuesTask(
-                java.util.concurrent.ConcurrentHashMap.BulkTask<K, V, ?> p,
-                int b,
-                int i,
-                int f,
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] t,
-                java.util.function.Function<? super V, ? extends U> searchFunction,
-                java.util.concurrent.atomic.AtomicReference<U> result) {
-            super(null, 0, 0, 0, null);
-            throw new RuntimeException("Stub!");
-        }
-
-        public U getRawResult() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public void compute() {
-            throw new RuntimeException("Stub!");
-        }
-
-        final java.util.concurrent.atomic.AtomicReference<U> result;
-
-        {
-            result = null;
-        }
-
-        final java.util.function.Function<? super V, ? extends U> searchFunction;
-
-        {
-            searchFunction = null;
-        }
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static class Segment<K, V> extends java.util.concurrent.locks.ReentrantLock
-            implements java.io.Serializable {
-
-        Segment(float lf) {
-            throw new RuntimeException("Stub!");
-        }
-
-        final float loadFactor;
-
-        {
-            loadFactor = 0;
-        }
-
-        private static final long serialVersionUID = 2249069246763182397L; // 0x1f364c905893293dL
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class TableStack<K, V> {
-
-        TableStack() {
-            throw new RuntimeException("Stub!");
-        }
-
-        int index;
-
-        int length;
-
-        java.util.concurrent.ConcurrentHashMap.TableStack<K, V> next;
-
-        java.util.concurrent.ConcurrentHashMap.Node<K, V>[] tab;
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static class Traverser<K, V> {
-
-        Traverser(
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] tab,
-                int size,
-                int index,
-                int limit) {
-            throw new RuntimeException("Stub!");
-        }
-
-        final java.util.concurrent.ConcurrentHashMap.Node<K, V> advance() {
-            throw new RuntimeException("Stub!");
-        }
-
-        private void pushState(
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] t, int i, int n) {
-            throw new RuntimeException("Stub!");
-        }
-
-        private void recoverState(int n) {
-            throw new RuntimeException("Stub!");
-        }
-
-        int baseIndex;
-
-        int baseLimit;
-
-        final int baseSize;
-
-        {
-            baseSize = 0;
-        }
-
-        int index;
-
-        java.util.concurrent.ConcurrentHashMap.Node<K, V> next;
-
-        java.util.concurrent.ConcurrentHashMap.TableStack<K, V> spare;
-
-        java.util.concurrent.ConcurrentHashMap.TableStack<K, V> stack;
-
-        java.util.concurrent.ConcurrentHashMap.Node<K, V>[] tab;
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class TreeBin<K, V> extends java.util.concurrent.ConcurrentHashMap.Node<K, V> {
-
-        TreeBin(java.util.concurrent.ConcurrentHashMap.TreeNode<K, V> b) {
-            super(0, null, null, null);
-            throw new RuntimeException("Stub!");
-        }
-
-        static int tieBreakOrder(java.lang.Object a, java.lang.Object b) {
-            throw new RuntimeException("Stub!");
-        }
-
-        private void lockRoot() {
-            throw new RuntimeException("Stub!");
-        }
-
-        private void unlockRoot() {
-            throw new RuntimeException("Stub!");
-        }
-
-        private void contendedLock() {
-            throw new RuntimeException("Stub!");
-        }
-
-        java.util.concurrent.ConcurrentHashMap.Node<K, V> find(int h, java.lang.Object k) {
-            throw new RuntimeException("Stub!");
-        }
-
-        java.util.concurrent.ConcurrentHashMap.TreeNode<K, V> putTreeVal(int h, K k, V v) {
-            throw new RuntimeException("Stub!");
-        }
-
-        boolean removeTreeNode(java.util.concurrent.ConcurrentHashMap.TreeNode<K, V> p) {
-            throw new RuntimeException("Stub!");
-        }
-
-        static <K, V> java.util.concurrent.ConcurrentHashMap.TreeNode<K, V> rotateLeft(
-                java.util.concurrent.ConcurrentHashMap.TreeNode<K, V> root,
-                java.util.concurrent.ConcurrentHashMap.TreeNode<K, V> p) {
-            throw new RuntimeException("Stub!");
-        }
-
-        static <K, V> java.util.concurrent.ConcurrentHashMap.TreeNode<K, V> rotateRight(
-                java.util.concurrent.ConcurrentHashMap.TreeNode<K, V> root,
-                java.util.concurrent.ConcurrentHashMap.TreeNode<K, V> p) {
-            throw new RuntimeException("Stub!");
-        }
-
-        static <K, V> java.util.concurrent.ConcurrentHashMap.TreeNode<K, V> balanceInsertion(
-                java.util.concurrent.ConcurrentHashMap.TreeNode<K, V> root,
-                java.util.concurrent.ConcurrentHashMap.TreeNode<K, V> x) {
-            throw new RuntimeException("Stub!");
-        }
-
-        static <K, V> java.util.concurrent.ConcurrentHashMap.TreeNode<K, V> balanceDeletion(
-                java.util.concurrent.ConcurrentHashMap.TreeNode<K, V> root,
-                java.util.concurrent.ConcurrentHashMap.TreeNode<K, V> x) {
-            throw new RuntimeException("Stub!");
-        }
-
-        static <K, V> boolean checkInvariants(
-                java.util.concurrent.ConcurrentHashMap.TreeNode<K, V> t) {
-            throw new RuntimeException("Stub!");
-        }
-
-        private static final long LOCKSTATE;
-
-        static {
-            LOCKSTATE = 0;
-        }
-
-        static final int READER = 4; // 0x4
-
-        private static final sun.misc.Unsafe U;
-
-        static {
-            U = null;
-        }
-
-        static final int WAITER = 2; // 0x2
-
-        static final int WRITER = 1; // 0x1
-
-        volatile java.util.concurrent.ConcurrentHashMap.TreeNode<K, V> first;
-
-        volatile int lockState;
-
-        java.util.concurrent.ConcurrentHashMap.TreeNode<K, V> root;
-
-        volatile java.lang.Thread waiter;
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class TreeNode<K, V> extends java.util.concurrent.ConcurrentHashMap.Node<K, V> {
-
-        TreeNode(
-                int hash,
-                K key,
-                V val,
-                java.util.concurrent.ConcurrentHashMap.Node<K, V> next,
-                java.util.concurrent.ConcurrentHashMap.TreeNode<K, V> parent) {
-            super(0, null, null, null);
-            throw new RuntimeException("Stub!");
-        }
-
-        java.util.concurrent.ConcurrentHashMap.Node<K, V> find(int h, java.lang.Object k) {
-            throw new RuntimeException("Stub!");
-        }
-
-        java.util.concurrent.ConcurrentHashMap.TreeNode<K, V> findTreeNode(
-                int h, java.lang.Object k, java.lang.Class<?> kc) {
-            throw new RuntimeException("Stub!");
-        }
-
-        java.util.concurrent.ConcurrentHashMap.TreeNode<K, V> left;
-
-        java.util.concurrent.ConcurrentHashMap.TreeNode<K, V> parent;
-
-        java.util.concurrent.ConcurrentHashMap.TreeNode<K, V> prev;
-
-        boolean red;
-
-        java.util.concurrent.ConcurrentHashMap.TreeNode<K, V> right;
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class ValueIterator<K, V>
-            extends java.util.concurrent.ConcurrentHashMap.BaseIterator<K, V>
-            implements java.util.Iterator<V>, java.util.Enumeration<V> {
-
-        ValueIterator(
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] tab,
-                int index,
-                int size,
-                int limit,
-                java.util.concurrent.ConcurrentHashMap<K, V> map) {
-            super(null, 0, 0, 0, null);
-            throw new RuntimeException("Stub!");
-        }
-
-        public V next() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public V nextElement() {
-            throw new RuntimeException("Stub!");
-        }
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class ValueSpliterator<K, V>
-            extends java.util.concurrent.ConcurrentHashMap.Traverser<K, V>
-            implements java.util.Spliterator<V> {
-
-        ValueSpliterator(
-                java.util.concurrent.ConcurrentHashMap.Node<K, V>[] tab,
-                int size,
-                int index,
-                int limit,
-                long est) {
-            super(null, 0, 0, 0);
-            throw new RuntimeException("Stub!");
-        }
-
-        public java.util.concurrent.ConcurrentHashMap.ValueSpliterator<K, V> trySplit() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public void forEachRemaining(java.util.function.Consumer<? super V> action) {
-            throw new RuntimeException("Stub!");
-        }
-
-        public boolean tryAdvance(java.util.function.Consumer<? super V> action) {
-            throw new RuntimeException("Stub!");
-        }
-
-        public long estimateSize() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public int characteristics() {
-            throw new RuntimeException("Stub!");
-        }
-
-        long est;
-    }
-
-    @SuppressWarnings({"unchecked", "deprecation", "all"})
-    static final class ValuesView<K, V>
-            extends java.util.concurrent.ConcurrentHashMap.CollectionView<K, V, V>
-            implements java.util.Collection<V>, java.io.Serializable {
-
-        ValuesView(java.util.concurrent.ConcurrentHashMap<K, V> map) {
-            super(null);
-            throw new RuntimeException("Stub!");
-        }
-
-        public boolean contains(java.lang.Object o) {
-            throw new RuntimeException("Stub!");
-        }
-
-        public boolean remove(java.lang.Object o) {
-            throw new RuntimeException("Stub!");
-        }
-
-        public java.util.Iterator<V> iterator() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public boolean add(V e) {
-            throw new RuntimeException("Stub!");
-        }
-
-        public boolean addAll(java.util.Collection<? extends V> c) {
-            throw new RuntimeException("Stub!");
-        }
-
-        public boolean removeIf(java.util.function.Predicate<? super V> filter) {
-            throw new RuntimeException("Stub!");
-        }
-
-        public java.util.Spliterator<V> spliterator() {
-            throw new RuntimeException("Stub!");
-        }
-
-        public void forEach(java.util.function.Consumer<? super V> action) {
-            throw new RuntimeException("Stub!");
-        }
-
-        private static final long serialVersionUID = 2249069246763182397L; // 0x1f364c905893293dL
-    }
-}
diff --git a/ojluni/annotations/sdk/nullability/java/nio/ByteBuffer.annotated.java b/ojluni/annotations/sdk/nullability/java/nio/ByteBuffer.annotated.java
index 7f954af..30c82ec 100644
--- a/ojluni/annotations/sdk/nullability/java/nio/ByteBuffer.annotated.java
+++ b/ojluni/annotations/sdk/nullability/java/nio/ByteBuffer.annotated.java
@@ -70,6 +70,20 @@
 
 public final int arrayOffset() { throw new RuntimeException("Stub!"); }
 
+@libcore.util.NonNull public java.nio.Buffer position(int newPosition) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public java.nio.Buffer limit(int newLimit) { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public java.nio.Buffer mark() { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public java.nio.Buffer reset() { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public java.nio.Buffer clear() { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public java.nio.Buffer flip() { throw new RuntimeException("Stub!"); }
+
+@libcore.util.NonNull public java.nio.Buffer rewind() { throw new RuntimeException("Stub!"); }
+
 @libcore.util.NonNull public abstract java.nio.ByteBuffer compact();
 
 public abstract boolean isDirect();
diff --git a/ojluni/src/main/java/java/lang/System.java b/ojluni/src/main/java/java/lang/System.java
index c321abb..8235bf7 100644
--- a/ojluni/src/main/java/java/lang/System.java
+++ b/ojluni/src/main/java/java/lang/System.java
@@ -994,11 +994,9 @@
 
         StructUtsname info = Libcore.os.uname();
         p.put("os.arch", info.machine);
-        if (p.get("os.name") != null && !p.get("os.name").equals(info.sysname)) {
-            logE("Wrong compile-time assumption for os.name: " + p.get("os.name") + " vs " +
-                    info.sysname);
-            p.put("os.name", info.sysname);
-        }
+        // os.name was previously hardcoded to "Linux", but was reverted due to support
+        // for Fuchsia. b/121268567 shows initialization regressions.
+        p.put("os.name", info.sysname);
         p.put("os.version", info.release);
 
         // Android-added: Undocumented properties that exist only on Android.
diff --git a/ojluni/src/main/java/java/net/AbstractPlainDatagramSocketImpl.java b/ojluni/src/main/java/java/net/AbstractPlainDatagramSocketImpl.java
index ad0a618..a3c738a 100644
--- a/ojluni/src/main/java/java/net/AbstractPlainDatagramSocketImpl.java
+++ b/ojluni/src/main/java/java/net/AbstractPlainDatagramSocketImpl.java
@@ -25,6 +25,7 @@
 package java.net;
 
 import libcore.io.IoBridge;
+import libcore.io.IoUtils;
 
 import java.io.FileDescriptor;
 import java.io.IOException;
@@ -96,9 +97,10 @@
             throw ioe;
         }
 
-        // Android-added: CloseGuard
+        // Android-added: CloseGuard/fdsan
         if (fd != null && fd.valid()) {
             guard.open("close");
+            IoUtils.setFdOwner(fd, this);
         }
     }
 
diff --git a/ojluni/src/main/java/java/net/AbstractPlainSocketImpl.java b/ojluni/src/main/java/java/net/AbstractPlainSocketImpl.java
index a36dae4..0500811 100644
--- a/ojluni/src/main/java/java/net/AbstractPlainSocketImpl.java
+++ b/ojluni/src/main/java/java/net/AbstractPlainSocketImpl.java
@@ -488,9 +488,12 @@
         return socketOutputStream;
     }
 
+    // Android-removed: this.fd is maintained by the concrete implementation.
+    /*
     void setFileDescriptor(FileDescriptor fd) {
         this.fd = fd;
     }
+    */
 
     void setAddress(InetAddress address) {
         this.address = address;
diff --git a/ojluni/src/main/java/java/net/PlainSocketImpl.java b/ojluni/src/main/java/java/net/PlainSocketImpl.java
index c0f280f..89ee53e 100644
--- a/ojluni/src/main/java/java/net/PlainSocketImpl.java
+++ b/ojluni/src/main/java/java/net/PlainSocketImpl.java
@@ -72,15 +72,19 @@
      * Constructs an empty instance.
      */
     PlainSocketImpl() {
-        this(new FileDescriptor());
+        // Android-changed: Let PlainSocketImpl construct its own FileDescriptor.
+        this.fd = new FileDescriptor();
     }
 
     /**
      * Constructs an instance with the given file descriptor.
      */
+    // Android-removed: Let PlainSocketImpl construct its own FileDescriptor.
+    /*
     PlainSocketImpl(FileDescriptor fd) {
         this.fd = fd;
     }
+    */
 
     protected <T> void setOption(SocketOption<T> name, T value) throws IOException {
         if (!name.equals(ExtendedSocketOptions.SO_FLOW_SLA)) {
@@ -122,6 +126,7 @@
         // The fd object must not change after calling bind, because we rely on this undocumented
         // behaviour. See libcore.java.net.SocketTest#testFileDescriptorStaysSame.
         fd.setInt$(IoBridge.socket(AF_INET6, isStream ? SOCK_STREAM : SOCK_DGRAM, 0).getInt$());
+        IoUtils.setFdOwner(fd, this);
 
         if (serverSocket != null) {
             IoUtils.setBlocking(fd, false);
@@ -196,6 +201,7 @@
             FileDescriptor newfd = Libcore.os.accept(fd, peerAddress);
 
             s.fd.setInt$(newfd.getInt$());
+            IoUtils.setFdOwner(s.fd, s);
             s.address = peerAddress.getAddress();
             s.port = peerAddress.getPort();
         } catch (ErrnoException errnoException) {
diff --git a/ojluni/src/main/java/java/nio/Buffer.java b/ojluni/src/main/java/java/nio/Buffer.java
index c912aaa..e517560 100644
--- a/ojluni/src/main/java/java/nio/Buffer.java
+++ b/ojluni/src/main/java/java/nio/Buffer.java
@@ -253,7 +253,7 @@
      * @throws  IllegalArgumentException
      *          If the preconditions on <tt>newPosition</tt> do not hold
      */
-    public final Buffer position(int newPosition) {
+    public Buffer position(int newPosition) {
         if ((newPosition > limit) || (newPosition < 0))
             // Android-changed: Improved error message.
             throw new IllegalArgumentException("Bad position " + newPosition + "/" + limit);
@@ -285,7 +285,7 @@
      * @throws  IllegalArgumentException
      *          If the preconditions on <tt>newLimit</tt> do not hold
      */
-    public final Buffer limit(int newLimit) {
+    public Buffer limit(int newLimit) {
         if ((newLimit > capacity) || (newLimit < 0))
             throw new IllegalArgumentException();
         limit = newLimit;
@@ -299,7 +299,7 @@
      *
      * @return  This buffer
      */
-    public final Buffer mark() {
+    public Buffer mark() {
         mark = position;
         return this;
     }
@@ -315,7 +315,7 @@
      * @throws  InvalidMarkException
      *          If the mark has not been set
      */
-    public final Buffer reset() {
+    public Buffer reset() {
         int m = mark;
         if (m < 0)
             throw new InvalidMarkException();
@@ -340,7 +340,7 @@
      *
      * @return  This buffer
      */
-    public final Buffer clear() {
+    public Buffer clear() {
         position = 0;
         limit = capacity;
         mark = -1;
@@ -368,7 +368,7 @@
      *
      * @return  This buffer
      */
-    public final Buffer flip() {
+    public Buffer flip() {
         limit = position;
         position = 0;
         mark = -1;
@@ -390,7 +390,7 @@
      *
      * @return  This buffer
      */
-    public final Buffer rewind() {
+    public Buffer rewind() {
         position = 0;
         mark = -1;
         return this;
diff --git a/ojluni/src/main/java/java/nio/ByteBuffer.java b/ojluni/src/main/java/java/nio/ByteBuffer.java
index f29cb5d..b286cbd 100644
--- a/ojluni/src/main/java/java/nio/ByteBuffer.java
+++ b/ojluni/src/main/java/java/nio/ByteBuffer.java
@@ -30,6 +30,8 @@
 
 import libcore.io.Memory;
 
+import dalvik.annotation.codegen.CovariantReturnType;
+
 /**
  * A byte buffer.
  *
@@ -803,6 +805,50 @@
         return offset;
     }
 
+    // BEGIN Android-added: covariant overloads of *Buffer methods that return this.
+    @CovariantReturnType(returnType = ByteBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer position(int newPosition) {
+        return super.position(newPosition);
+    }
+
+    @CovariantReturnType(returnType = ByteBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer limit(int newLimit) {
+        return super.limit(newLimit);
+    }
+
+    @CovariantReturnType(returnType = ByteBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer mark() {
+        return super.mark();
+    }
+
+    @CovariantReturnType(returnType = ByteBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer reset() {
+        return super.reset();
+    }
+
+    @CovariantReturnType(returnType = ByteBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer clear() {
+        return super.clear();
+    }
+
+    @CovariantReturnType(returnType = ByteBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer flip() {
+        return super.flip();
+    }
+
+    @CovariantReturnType(returnType = ByteBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer rewind() {
+        return super.rewind();
+    }
+    // END Android-added: covariant overloads of *Buffer methods that return this.
+
     /**
      * Compacts this buffer&nbsp;&nbsp;<i>(optional operation)</i>.
      *
diff --git a/ojluni/src/main/java/java/nio/CharBuffer.java b/ojluni/src/main/java/java/nio/CharBuffer.java
index fa7423e..6d73448 100644
--- a/ojluni/src/main/java/java/nio/CharBuffer.java
+++ b/ojluni/src/main/java/java/nio/CharBuffer.java
@@ -34,6 +34,8 @@
 import java.util.stream.StreamSupport;
 import java.util.stream.IntStream;
 
+import dalvik.annotation.codegen.CovariantReturnType;
+
 
 /**
  * A char buffer.
@@ -861,6 +863,50 @@
         return offset;
     }
 
+    // BEGIN Android-added: covariant overloads of *Buffer methods that return this.
+    @CovariantReturnType(returnType = CharBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer position(int newPosition) {
+        return super.position(newPosition);
+    }
+
+    @CovariantReturnType(returnType = CharBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer limit(int newLimit) {
+        return super.limit(newLimit);
+    }
+
+    @CovariantReturnType(returnType = CharBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer mark() {
+        return super.mark();
+    }
+
+    @CovariantReturnType(returnType = CharBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer reset() {
+        return super.reset();
+    }
+
+    @CovariantReturnType(returnType = CharBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer clear() {
+        return super.clear();
+    }
+
+    @CovariantReturnType(returnType = CharBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer flip() {
+        return super.flip();
+    }
+
+    @CovariantReturnType(returnType = CharBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer rewind() {
+        return super.rewind();
+    }
+    // END Android-added: covariant overloads of *Buffer methods that return this.
+
     /**
      * Compacts this buffer&nbsp;&nbsp;<i>(optional operation)</i>.
      *
diff --git a/ojluni/src/main/java/java/nio/DoubleBuffer.java b/ojluni/src/main/java/java/nio/DoubleBuffer.java
index 9c3ff87..bd80f4d 100644
--- a/ojluni/src/main/java/java/nio/DoubleBuffer.java
+++ b/ojluni/src/main/java/java/nio/DoubleBuffer.java
@@ -28,6 +28,8 @@
 package java.nio;
 
 
+import dalvik.annotation.codegen.CovariantReturnType;
+
 /**
  * A double buffer.
  *
@@ -635,6 +637,50 @@
         return offset;
     }
 
+    // BEGIN Android-added: covariant overloads of *Buffer methods that return this.
+    @CovariantReturnType(returnType = DoubleBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer position(int newPosition) {
+        return super.position(newPosition);
+    }
+
+    @CovariantReturnType(returnType = DoubleBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer limit(int newLimit) {
+        return super.limit(newLimit);
+    }
+
+    @CovariantReturnType(returnType = DoubleBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer mark() {
+        return super.mark();
+    }
+
+    @CovariantReturnType(returnType = DoubleBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer reset() {
+        return super.reset();
+    }
+
+    @CovariantReturnType(returnType = DoubleBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer clear() {
+        return super.clear();
+    }
+
+    @CovariantReturnType(returnType = DoubleBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer flip() {
+        return super.flip();
+    }
+
+    @CovariantReturnType(returnType = DoubleBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer rewind() {
+        return super.rewind();
+    }
+    // END Android-added: covariant overloads of *Buffer methods that return this.
+
     /**
      * Compacts this buffer&nbsp;&nbsp;<i>(optional operation)</i>.
      *
diff --git a/ojluni/src/main/java/java/nio/FloatBuffer.java b/ojluni/src/main/java/java/nio/FloatBuffer.java
index 04eac35..3d34211 100644
--- a/ojluni/src/main/java/java/nio/FloatBuffer.java
+++ b/ojluni/src/main/java/java/nio/FloatBuffer.java
@@ -28,6 +28,8 @@
 package java.nio;
 
 
+import dalvik.annotation.codegen.CovariantReturnType;
+
 /**
  * A float buffer.
  *
@@ -635,6 +637,50 @@
         return offset;
     }
 
+    // BEGIN Android-added: covariant overloads of *Buffer methods that return this.
+    @CovariantReturnType(returnType = FloatBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer position(int newPosition) {
+        return super.position(newPosition);
+    }
+
+    @CovariantReturnType(returnType = FloatBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer limit(int newLimit) {
+        return super.limit(newLimit);
+    }
+
+    @CovariantReturnType(returnType = FloatBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer mark() {
+        return super.mark();
+    }
+
+    @CovariantReturnType(returnType = FloatBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer reset() {
+        return super.reset();
+    }
+
+    @CovariantReturnType(returnType = FloatBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer clear() {
+        return super.clear();
+    }
+
+    @CovariantReturnType(returnType = FloatBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer flip() {
+        return super.flip();
+    }
+
+    @CovariantReturnType(returnType = FloatBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer rewind() {
+        return super.rewind();
+    }
+    // END Android-added: covariant overloads of *Buffer methods that return this.
+
     /**
      * Compacts this buffer&nbsp;&nbsp;<i>(optional operation)</i>.
      *
diff --git a/ojluni/src/main/java/java/nio/IntBuffer.java b/ojluni/src/main/java/java/nio/IntBuffer.java
index a8cfff8..7e34229 100644
--- a/ojluni/src/main/java/java/nio/IntBuffer.java
+++ b/ojluni/src/main/java/java/nio/IntBuffer.java
@@ -29,6 +29,8 @@
 package java.nio;
 
 
+import dalvik.annotation.codegen.CovariantReturnType;
+
 /**
  * An int buffer.
  *
@@ -636,6 +638,50 @@
         return offset;
     }
 
+    // BEGIN Android-added: covariant overloads of *Buffer methods that return this.
+    @CovariantReturnType(returnType = IntBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer position(int newPosition) {
+        return super.position(newPosition);
+    }
+
+    @CovariantReturnType(returnType = IntBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer limit(int newLimit) {
+        return super.limit(newLimit);
+    }
+
+    @CovariantReturnType(returnType = IntBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer mark() {
+        return super.mark();
+    }
+
+    @CovariantReturnType(returnType = IntBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer reset() {
+        return super.reset();
+    }
+
+    @CovariantReturnType(returnType = IntBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer clear() {
+        return super.clear();
+    }
+
+    @CovariantReturnType(returnType = IntBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer flip() {
+        return super.flip();
+    }
+
+    @CovariantReturnType(returnType = IntBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer rewind() {
+        return super.rewind();
+    }
+    // END Android-added: covariant overloads of *Buffer methods that return this.
+
     /**
      * Compacts this buffer&nbsp;&nbsp;<i>(optional operation)</i>.
      *
diff --git a/ojluni/src/main/java/java/nio/LongBuffer.java b/ojluni/src/main/java/java/nio/LongBuffer.java
index c64b8f5..5e5fa18 100644
--- a/ojluni/src/main/java/java/nio/LongBuffer.java
+++ b/ojluni/src/main/java/java/nio/LongBuffer.java
@@ -28,6 +28,8 @@
 package java.nio;
 
 
+import dalvik.annotation.codegen.CovariantReturnType;
+
 /**
  * A long buffer.
  *
@@ -635,6 +637,50 @@
         return offset;
     }
 
+    // BEGIN Android-added: covariant overloads of *Buffer methods that return this.
+    @CovariantReturnType(returnType = LongBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer position(int newPosition) {
+        return super.position(newPosition);
+    }
+
+    @CovariantReturnType(returnType = LongBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer limit(int newLimit) {
+        return super.limit(newLimit);
+    }
+
+    @CovariantReturnType(returnType = LongBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer mark() {
+        return super.mark();
+    }
+
+    @CovariantReturnType(returnType = LongBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer reset() {
+        return super.reset();
+    }
+
+    @CovariantReturnType(returnType = LongBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer clear() {
+        return super.clear();
+    }
+
+    @CovariantReturnType(returnType = LongBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer flip() {
+        return super.flip();
+    }
+
+    @CovariantReturnType(returnType = LongBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer rewind() {
+        return super.rewind();
+    }
+    // END Android-added: covariant overloads of *Buffer methods that return this.
+
     /**
      * Compacts this buffer&nbsp;&nbsp;<i>(optional operation)</i>.
      *
diff --git a/ojluni/src/main/java/java/nio/ShortBuffer.java b/ojluni/src/main/java/java/nio/ShortBuffer.java
index 13a689f..b2a479c 100644
--- a/ojluni/src/main/java/java/nio/ShortBuffer.java
+++ b/ojluni/src/main/java/java/nio/ShortBuffer.java
@@ -28,6 +28,8 @@
 package java.nio;
 
 
+import dalvik.annotation.codegen.CovariantReturnType;
+
 /**
  * A short buffer.
  *
@@ -635,6 +637,50 @@
         return offset;
     }
 
+    // BEGIN Android-added: covariant overloads of *Buffer methods that return this.
+    @CovariantReturnType(returnType = ShortBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer position(int newPosition) {
+        return super.position(newPosition);
+    }
+
+    @CovariantReturnType(returnType = ShortBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer limit(int newLimit) {
+        return super.limit(newLimit);
+    }
+
+    @CovariantReturnType(returnType = ShortBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer mark() {
+        return super.mark();
+    }
+
+    @CovariantReturnType(returnType = ShortBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer reset() {
+        return super.reset();
+    }
+
+    @CovariantReturnType(returnType = ShortBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer clear() {
+        return super.clear();
+    }
+
+    @CovariantReturnType(returnType = ShortBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer flip() {
+        return super.flip();
+    }
+
+    @CovariantReturnType(returnType = ShortBuffer.class, presentAfter = 28)
+    @Override
+    public Buffer rewind() {
+        return super.rewind();
+    }
+    // END Android-added: covariant overloads of *Buffer methods that return this.
+
     /**
      * Compacts this buffer&nbsp;&nbsp;<i>(optional operation)</i>.
      *
diff --git a/support/src/test/java/libcore/java/security/CpuFeatures.java b/support/src/test/java/libcore/java/security/CpuFeatures.java
index f22acfe3..4c4c8a00 100644
--- a/support/src/test/java/libcore/java/security/CpuFeatures.java
+++ b/support/src/test/java/libcore/java/security/CpuFeatures.java
@@ -28,7 +28,7 @@
 
 import dalvik.system.VMRuntime;
 
-public class CpuFeatures {
+class CpuFeatures {
     private CpuFeatures() {
     }
 
diff --git a/support/src/test/java/libcore/java/security/StandardNames.java b/support/src/test/java/libcore/java/security/StandardNames.java
index 3ca3501..eb9cf45 100644
--- a/support/src/test/java/libcore/java/security/StandardNames.java
+++ b/support/src/test/java/libcore/java/security/StandardNames.java
@@ -16,7 +16,6 @@
 
 package libcore.java.security;
 
-import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
@@ -28,12 +27,9 @@
 import java.security.spec.KeySpec;
 import java.security.spec.RSAPrivateCrtKeySpec;
 import java.security.spec.RSAPublicKeySpec;
-import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
@@ -70,47 +66,33 @@
 
     public static final boolean IS_RI
             = !"Dalvik Core Library".equals(System.getProperty("java.specification.name"));
-    public static final String JSSE_PROVIDER_NAME = (IS_RI) ? "SunJSSE" : "AndroidOpenSSL";
-    public static final String SECURITY_PROVIDER_NAME = (IS_RI) ? "SUN" : "BC";
 
-    public static final String KEY_MANAGER_FACTORY_DEFAULT = (IS_RI) ? "SunX509" : "PKIX";
-    public static final String TRUST_MANAGER_FACTORY_DEFAULT = "PKIX";
+    public static final String SECURITY_PROVIDER_NAME = (IS_RI) ? "SUN" : "BC";
 
     public static final String KEY_STORE_ALGORITHM = (IS_RI) ? "JKS" : "BKS";
 
     /**
      * RFC 5746's Signaling Cipher Suite Value to indicate a request for secure renegotiation
      */
-    public static final String CIPHER_SUITE_SECURE_RENEGOTIATION
+    private static final String CIPHER_SUITE_SECURE_RENEGOTIATION
             = "TLS_EMPTY_RENEGOTIATION_INFO_SCSV";
 
     /**
-     * From https://tools.ietf.org/html/draft-ietf-tls-downgrade-scsv-00 it is a
-     * signaling cipher suite value (SCSV) to indicate that this request is a
-     * protocol fallback (e.g., TLS 1.0 -> SSL 3.0) because the server didn't respond
-     * to the first request.
-     */
-    public static final String CIPHER_SUITE_FALLBACK = "TLS_FALLBACK_SCSV";
-
-    /**
      * A map from algorithm type (e.g. Cipher) to a set of algorithms (e.g. AES, DES, ...)
      */
-    public static final Map<String,Set<String>> PROVIDER_ALGORITHMS
-            = new HashMap<String,Set<String>>();
+    static final Map<String,Set<String>> PROVIDER_ALGORITHMS
+            = new HashMap<>();
 
-    public static final Map<String,Set<String>> CIPHER_MODES
-            = new HashMap<String,Set<String>>();
+    private static final Map<String,Set<String>> CIPHER_MODES
+            = new HashMap<>();
 
-    public static final Map<String,Set<String>> CIPHER_PADDINGS
-            = new HashMap<String,Set<String>>();
-
-    private static final Map<String, String[]> SSL_CONTEXT_PROTOCOLS_ENABLED
-            = new HashMap<String,String[]>();
+    private static final Map<String,Set<String>> CIPHER_PADDINGS
+            = new HashMap<>();
 
     private static void provide(String type, String algorithm) {
         Set<String> algorithms = PROVIDER_ALGORITHMS.get(type);
         if (algorithms == null) {
-            algorithms = new HashSet<String>();
+            algorithms = new HashSet<>();
             PROVIDER_ALGORITHMS.put(type, algorithms);
         }
         assertTrue("Duplicate " + type + " " + algorithm,
@@ -127,7 +109,7 @@
     private static void provideCipherModes(String algorithm, String newModes[]) {
         Set<String> modes = CIPHER_MODES.get(algorithm);
         if (modes == null) {
-            modes = new HashSet<String>();
+            modes = new HashSet<>();
             CIPHER_MODES.put(algorithm, modes);
         }
         modes.addAll(Arrays.asList(newModes));
@@ -135,23 +117,11 @@
     private static void provideCipherPaddings(String algorithm, String newPaddings[]) {
         Set<String> paddings = CIPHER_PADDINGS.get(algorithm);
         if (paddings == null) {
-            paddings = new HashSet<String>();
+            paddings = new HashSet<>();
             CIPHER_PADDINGS.put(algorithm, paddings);
         }
         paddings.addAll(Arrays.asList(newPaddings));
     }
-    private static void provideSslContextEnabledProtocols(String algorithm, TLSVersion minimum,
-            TLSVersion maximum) {
-        if (minimum.ordinal() > maximum.ordinal()) {
-            throw new RuntimeException("TLS version: minimum > maximum");
-        }
-        int versionsLength = maximum.ordinal() - minimum.ordinal() + 1;
-        String[] versionNames = new String[versionsLength];
-        for (int i = 0; i < versionsLength; i++) {
-            versionNames[i] = TLSVersion.values()[i + minimum.ordinal()].name;
-        }
-        SSL_CONTEXT_PROTOCOLS_ENABLED.put(algorithm, versionNames);
-    }
     static {
         provide("AlgorithmParameterGenerator", "DSA");
         provide("AlgorithmParameterGenerator", "DiffieHellman");
@@ -636,43 +606,16 @@
                 provide("KeyStore", "KnoxAndroidKeyStore");
             }
         }
-
-        if (IS_RI) {
-            provideSslContextEnabledProtocols("SSL", TLSVersion.SSLv3, TLSVersion.TLSv1);
-            provideSslContextEnabledProtocols("SSLv3", TLSVersion.SSLv3, TLSVersion.TLSv1);
-            provideSslContextEnabledProtocols("TLS", TLSVersion.SSLv3, TLSVersion.TLSv1);
-            provideSslContextEnabledProtocols("TLSv1", TLSVersion.SSLv3, TLSVersion.TLSv1);
-            provideSslContextEnabledProtocols("TLSv1.1", TLSVersion.SSLv3, TLSVersion.TLSv11);
-            provideSslContextEnabledProtocols("TLSv1.2", TLSVersion.SSLv3, TLSVersion.TLSv12);
-            provideSslContextEnabledProtocols("Default", TLSVersion.SSLv3, TLSVersion.TLSv1);
-        } else {
-            provideSslContextEnabledProtocols("SSL", TLSVersion.TLSv1, TLSVersion.TLSv12);
-            provideSslContextEnabledProtocols("TLS", TLSVersion.TLSv1, TLSVersion.TLSv12);
-            provideSslContextEnabledProtocols("TLSv1", TLSVersion.TLSv1, TLSVersion.TLSv12);
-            provideSslContextEnabledProtocols("TLSv1.1", TLSVersion.TLSv1, TLSVersion.TLSv12);
-            provideSslContextEnabledProtocols("TLSv1.2", TLSVersion.TLSv1, TLSVersion.TLSv12);
-            provideSslContextEnabledProtocols("Default", TLSVersion.TLSv1, TLSVersion.TLSv12);
-        }
     }
 
-    public static final String SSL_CONTEXT_PROTOCOLS_DEFAULT = "Default";
-    public static final Set<String> SSL_CONTEXT_PROTOCOLS = new HashSet<String>(Arrays.asList(
-        SSL_CONTEXT_PROTOCOLS_DEFAULT,
-        "SSL",
-        "TLS",
-        "TLSv1",
-        "TLSv1.1",
-        "TLSv1.2"));
-    public static final String SSL_CONTEXT_PROTOCOL_DEFAULT = "TLS";
-
-    public static final Set<String> KEY_TYPES = new HashSet<String>(Arrays.asList(
-        "RSA",
-        "DSA",
-        "DH_RSA",
-        "DH_DSA",
-        "EC",
-        "EC_EC",
-        "EC_RSA"));
+    public static final Set<String> KEY_TYPES = new HashSet<>(Arrays.asList(
+            "RSA",
+            "DSA",
+            "DH_RSA",
+            "DH_DSA",
+            "EC",
+            "EC_EC",
+            "EC_RSA"));
     static {
         if (IS_RI) {
             // DH_* are specified by standard names, but do not seem to be supported by RI
@@ -681,61 +624,15 @@
         }
     }
 
-    public static final Set<String> SSL_SOCKET_PROTOCOLS = new HashSet<String>(Arrays.asList(
-        "TLSv1",
-        "TLSv1.1",
-        "TLSv1.2",
-        "TLSv1.3"));
-    public static final Set<String> SSL_SOCKET_PROTOCOLS_CLIENT_DEFAULT =
-            new HashSet<String>(Arrays.asList(
-                "TLSv1",
-                "TLSv1.1",
-                "TLSv1.2"));
-    public static final Set<String> SSL_SOCKET_PROTOCOLS_SERVER_DEFAULT =
-            new HashSet<String>(Arrays.asList(
-                "TLSv1",
-                "TLSv1.1",
-                "TLSv1.2"));
-    static {
-        if (IS_RI) {
-            /* Even though we use OpenSSL's SSLv23_method which
-             * supports sending SSLv2 client hello messages, the
-             * OpenSSL implementation in s23_client_hello disables
-             * this if SSL_OP_NO_SSLv2 is specified, which we always
-             * do to disable general use of SSLv2.
-             */
-            SSL_SOCKET_PROTOCOLS.add("SSLv2Hello");
-
-            /* The RI still has SSLv3 as a default protocol. */
-            SSL_SOCKET_PROTOCOLS_CLIENT_DEFAULT.add("SSLv3");
-            SSL_SOCKET_PROTOCOLS_SERVER_DEFAULT.add("SSLv3");
-        }
-    }
-
-    private enum TLSVersion {
-        SSLv3("SSLv3"),
-        TLSv1("TLSv1"),
-        TLSv11("TLSv1.1"),
-        TLSv12("TLSv1.2"),
-        TLSv13("TLSv1.3"),
-        ;
-
-        private final String name;
-
-        TLSVersion(String name) {
-            this.name = name;
-        }
-    };
-
     /**
      * Valid values for X509TrustManager.checkClientTrusted authType,
      * either the algorithm of the public key or UNKNOWN.
      */
-    public static final Set<String> CLIENT_AUTH_TYPES = new HashSet<String>(Arrays.asList(
-        "RSA",
-        "DSA",
-        "EC",
-        "UNKNOWN"));
+    public static final Set<String> CLIENT_AUTH_TYPES = new HashSet<>(Arrays.asList(
+            "RSA",
+            "DSA",
+            "EC",
+            "UNKNOWN"));
 
     /**
      * Valid values for X509TrustManager.checkServerTrusted authType,
@@ -743,216 +640,26 @@
      * or GENERIC (for TLS 1.3 cipher suites that don't imply a specific
      * key exchange method).
      */
-    public static final Set<String> SERVER_AUTH_TYPES = new HashSet<String>(Arrays.asList(
-        "DHE_DSS",
-        "DHE_DSS_EXPORT",
-        "DHE_RSA",
-        "DHE_RSA_EXPORT",
-        "DH_DSS_EXPORT",
-        "DH_RSA_EXPORT",
-        "DH_anon",
-        "DH_anon_EXPORT",
-        "KRB5",
-        "KRB5_EXPORT",
-        "RSA",
-        "RSA_EXPORT",
-        "RSA_EXPORT1024",
-        "ECDH_ECDSA",
-        "ECDH_RSA",
-        "ECDHE_ECDSA",
-        "ECDHE_RSA",
-        "UNKNOWN",
-        "GENERIC"));
-
-    public static final String CIPHER_SUITE_INVALID = "SSL_NULL_WITH_NULL_NULL";
-
-    public static final Set<String> CIPHER_SUITES_NEITHER = new HashSet<String>();
-
-    public static final Set<String> CIPHER_SUITES_RI = new LinkedHashSet<String>();
-    public static final Set<String> CIPHER_SUITES_OPENSSL = new LinkedHashSet<String>();
-
-    public static final Set<String> CIPHER_SUITES;
-
-    private static final void addRi(String cipherSuite) {
-        CIPHER_SUITES_RI.add(cipherSuite);
-    }
-
-    private static final void addOpenSsl(String cipherSuite) {
-        CIPHER_SUITES_OPENSSL.add(cipherSuite);
-    }
-
-    private static final void addBoth(String cipherSuite) {
-        addRi(cipherSuite);
-        addOpenSsl(cipherSuite);
-    }
-
-    private static final void addNeither(String cipherSuite) {
-        CIPHER_SUITES_NEITHER.add(cipherSuite);
-    }
-
-    static {
-        // NOTE: This list needs to be kept in sync with Javadoc of javax.net.ssl.SSLSocket and
-        // javax.net.ssl.SSLEngine.
-        addBoth(   "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA");
-        addBoth(   "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA");
-        addBoth(   "TLS_RSA_WITH_AES_256_CBC_SHA");
-        addBoth(   "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA");
-        addBoth(   "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA");
-        addBoth(   "TLS_RSA_WITH_AES_128_CBC_SHA");
-        addBoth(   "SSL_RSA_WITH_3DES_EDE_CBC_SHA");
-
-        // TLSv1.2 cipher suites
-        addRi(   "TLS_RSA_WITH_AES_128_CBC_SHA256");
-        addRi(   "TLS_RSA_WITH_AES_256_CBC_SHA256");
-        addOpenSsl("TLS_RSA_WITH_AES_128_GCM_SHA256");
-        addOpenSsl("TLS_RSA_WITH_AES_256_GCM_SHA384");
-        addRi(   "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256");
-        addRi(   "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384");
-        addOpenSsl("TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256");
-        addOpenSsl("TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384");
-        addRi(   "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256");
-        addRi(   "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384");
-        addOpenSsl("TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256");
-        addOpenSsl("TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384");
-        addOpenSsl("TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256");
-        addOpenSsl("TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256");
-
-        // TLSv1.3 cipher suites
-        addOpenSsl("TLS_AES_128_GCM_SHA256");
-        addOpenSsl("TLS_AES_256_GCM_SHA384");
-        addOpenSsl("TLS_CHACHA20_POLY1305_SHA256");
-
-        // Pre-Shared Key (PSK) cipher suites
-        addOpenSsl("TLS_PSK_WITH_AES_128_CBC_SHA");
-        addOpenSsl("TLS_PSK_WITH_AES_256_CBC_SHA");
-        addOpenSsl("TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA");
-        addOpenSsl("TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA");
-        addOpenSsl("TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256");
-
-        // RFC 5746's Signaling Cipher Suite Value to indicate a request for secure renegotiation
-        addBoth(CIPHER_SUITE_SECURE_RENEGOTIATION);
-
-        // From https://tools.ietf.org/html/draft-ietf-tls-downgrade-scsv-00 to indicate
-        // TLS fallback request
-        addOpenSsl(CIPHER_SUITE_FALLBACK);
-
-        // non-defaultCipherSuites
-
-        // Android does not have Kerberos support
-        addRi(     "TLS_KRB5_WITH_RC4_128_SHA");
-        addRi(     "TLS_KRB5_WITH_RC4_128_MD5");
-        addRi(     "TLS_KRB5_WITH_3DES_EDE_CBC_SHA");
-        addRi(     "TLS_KRB5_WITH_3DES_EDE_CBC_MD5");
-        addRi(     "TLS_KRB5_WITH_DES_CBC_SHA");
-        addRi(     "TLS_KRB5_WITH_DES_CBC_MD5");
-        addRi(     "TLS_KRB5_EXPORT_WITH_RC4_40_SHA");
-        addRi(     "TLS_KRB5_EXPORT_WITH_RC4_40_MD5");
-        addRi(     "TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA");
-        addRi(     "TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5");
-
-        // Android does not have DSS support
-        addRi(     "SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA");
-        addRi(     "SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA");
-        addRi(     "SSL_DHE_DSS_WITH_DES_CBC_SHA");
-        addRi(     "TLS_DHE_DSS_WITH_AES_128_CBC_SHA");
-        addRi(     "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256");
-        addNeither("TLS_DHE_DSS_WITH_AES_128_GCM_SHA256");
-        addRi(     "TLS_DHE_DSS_WITH_AES_256_CBC_SHA");
-        addRi(     "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256");
-        addNeither("TLS_DHE_DSS_WITH_AES_256_GCM_SHA384");
-
-        // Android does not have RC4 support
-        addRi(     "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA");
-        addRi(     "TLS_ECDHE_RSA_WITH_RC4_128_SHA");
-        addRi(     "SSL_RSA_WITH_RC4_128_SHA");
-        addRi(     "SSL_RSA_WITH_RC4_128_MD5");
-
-        // Dropped
-        addRi(     "SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA");
-        addRi(     "SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA");
-        addRi(     "SSL_DHE_RSA_WITH_DES_CBC_SHA");
-        addNeither("SSL_DH_DSS_EXPORT_WITH_DES40_CBC_SHA");
-        addNeither("SSL_DH_RSA_EXPORT_WITH_DES40_CBC_SHA");
-        addRi(     "SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA");
-        addRi(     "SSL_DH_anon_EXPORT_WITH_RC4_40_MD5");
-        addRi(     "SSL_DH_anon_WITH_3DES_EDE_CBC_SHA");
-        addRi(     "SSL_DH_anon_WITH_DES_CBC_SHA");
-        addRi(     "SSL_DH_anon_WITH_RC4_128_MD5");
-        addRi(     "SSL_RSA_EXPORT_WITH_DES40_CBC_SHA");
-        addRi(     "SSL_RSA_EXPORT_WITH_RC4_40_MD5");
-        addRi(     "SSL_RSA_WITH_DES_CBC_SHA");
-        addRi(     "SSL_RSA_WITH_NULL_MD5");
-        addRi(     "SSL_RSA_WITH_NULL_SHA");
-        addRi(     "TLS_DHE_RSA_WITH_AES_128_CBC_SHA");
-        addRi(     "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256");
-        addNeither("TLS_DHE_RSA_WITH_AES_128_GCM_SHA256");
-        addNeither("TLS_DHE_RSA_WITH_AES_128_GCM_SHA384");
-        addRi(     "TLS_DHE_RSA_WITH_AES_256_CBC_SHA");
-        addRi(     "TLS_DHE_RSA_WITH_AES_256_CBC_SHA256");
-        addRi(     "TLS_DH_anon_WITH_AES_128_CBC_SHA");
-        addRi(     "TLS_DH_anon_WITH_AES_128_CBC_SHA256");
-        addNeither("TLS_DH_anon_WITH_AES_128_GCM_SHA256");
-        addRi(     "TLS_DH_anon_WITH_AES_256_CBC_SHA");
-        addRi(     "TLS_DH_anon_WITH_AES_256_CBC_SHA256");
-        addNeither("TLS_DH_anon_WITH_AES_256_GCM_SHA384");
-        addRi(     "TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA");
-        addRi(     "TLS_ECDHE_ECDSA_WITH_NULL_SHA");
-        addRi(     "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA");
-        addRi(     "TLS_ECDHE_RSA_WITH_NULL_SHA");
-        addRi(     "TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA");
-        addRi(     "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA");
-        addRi(     "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256");
-        addNeither("TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256");
-        addRi(     "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA");
-        addRi(     "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384");
-        addNeither("TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384");
-        addRi(     "TLS_ECDH_ECDSA_WITH_NULL_SHA");
-        addRi(     "TLS_ECDH_ECDSA_WITH_RC4_128_SHA");
-        addRi(     "TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA");
-        addRi(     "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA");
-        addRi(     "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256");
-        addNeither("TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256");
-        addRi(     "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA");
-        addRi(     "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384");
-        addNeither("TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384");
-        addRi(     "TLS_ECDH_RSA_WITH_NULL_SHA");
-        addRi(     "TLS_ECDH_RSA_WITH_RC4_128_SHA");
-        addRi(     "TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA");
-        addRi(     "TLS_ECDH_anon_WITH_AES_128_CBC_SHA");
-        addRi(     "TLS_ECDH_anon_WITH_AES_256_CBC_SHA");
-        addRi(     "TLS_ECDH_anon_WITH_NULL_SHA");
-        addRi(     "TLS_ECDH_anon_WITH_RC4_128_SHA");
-        addNeither("TLS_PSK_WITH_3DES_EDE_CBC_SHA");
-        addRi(     "TLS_RSA_WITH_NULL_SHA256");
-
-        // Old non standard exportable encryption
-        addNeither("SSL_RSA_EXPORT1024_WITH_DES_CBC_SHA");
-        addNeither("SSL_RSA_EXPORT1024_WITH_RC4_56_SHA");
-
-        // No RC2
-        addNeither("SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5");
-        addNeither("TLS_KRB5_EXPORT_WITH_RC2_CBC_40_SHA");
-        addNeither("TLS_KRB5_EXPORT_WITH_RC2_CBC_40_MD5");
-
-        CIPHER_SUITES = (IS_RI) ? CIPHER_SUITES_RI : CIPHER_SUITES_OPENSSL;
-    }
-
-    /**
-     * Cipher suites that are not negotiated when TLSv1.2 is selected on the RI.
-     */
-    public static final List<String> CIPHER_SUITES_OBSOLETE_TLS12 =
-            Arrays.asList(
-                    "SSL_RSA_WITH_DES_CBC_SHA",
-                    "SSL_DHE_RSA_WITH_DES_CBC_SHA",
-                    "SSL_DHE_DSS_WITH_DES_CBC_SHA",
-                    "SSL_DH_anon_WITH_DES_CBC_SHA",
-                    "SSL_RSA_EXPORT_WITH_RC4_40_MD5",
-                    "SSL_DH_anon_EXPORT_WITH_RC4_40_MD5",
-                    "SSL_RSA_EXPORT_WITH_DES40_CBC_SHA",
-                    "SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA",
-                    "SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA",
-                    "SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA"
-            );
+    public static final Set<String> SERVER_AUTH_TYPES = new HashSet<>(Arrays.asList(
+            "DHE_DSS",
+            "DHE_DSS_EXPORT",
+            "DHE_RSA",
+            "DHE_RSA_EXPORT",
+            "DH_DSS_EXPORT",
+            "DH_RSA_EXPORT",
+            "DH_anon",
+            "DH_anon_EXPORT",
+            "KRB5",
+            "KRB5_EXPORT",
+            "RSA",
+            "RSA_EXPORT",
+            "RSA_EXPORT1024",
+            "ECDH_ECDSA",
+            "ECDH_RSA",
+            "ECDHE_ECDSA",
+            "ECDHE_RSA",
+            "UNKNOWN",
+            "GENERIC"));
 
     /**
      * Cipher suites that are only supported with TLS 1.3.
@@ -1050,50 +757,13 @@
             : CpuFeatures.isAESHardwareAccelerated() ? CIPHER_SUITES_ANDROID_AES_HARDWARE
                     : CIPHER_SUITES_ANDROID_SOFTWARE;
 
-    // NOTE: This list needs to be kept in sync with Javadoc of javax.net.ssl.SSLSocket and
-    // javax.net.ssl.SSLEngine.
-    public static final List<String> CIPHER_SUITES_DEFAULT_PSK = Arrays.asList(
-            "TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256",
-            "TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA",
-            "TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA",
-            "TLS_PSK_WITH_AES_128_CBC_SHA",
-            "TLS_PSK_WITH_AES_256_CBC_SHA"
-            );
-
-    // Should be updated to match BoringSSL's defaults when they change.
-    // https://android.googlesource.com/platform/external/boringssl/+/master/src/ssl/t1_lib.c#305
-    public static final List<String> ELLIPTIC_CURVES_DEFAULT = Arrays.asList(
-            "x25519 (29)",
-            "secp256r1 (23)",
-            "secp384r1 (24)"
-            );
-
-    private static final Set<String> PERMITTED_DEFAULT_KEY_EXCHANGE_ALGS =
-            new HashSet<String>(Arrays.asList("RSA",
-                                              "DHE_RSA",
-                                              "DHE_DSS",
-                                              "ECDHE_RSA",
-                                              "ECDHE_ECDSA"));
-
-    private static final Set<String> PERMITTED_DEFAULT_BULK_ENCRYPTION_CIPHERS =
-            new HashSet<String>(Arrays.asList("AES_128_CBC",
-                                              "AES_256_CBC",
-                                              "AES_128_GCM",
-                                              "AES_256_GCM",
-                                              "CHACHA20_POLY1305"));
-
-    private static final Set<String> PERMITTED_DEFAULT_MACS =
-            new HashSet<String>(Arrays.asList("SHA",
-                                              "SHA256",
-                                              "SHA384"));
-
-    public static final Map<String, Class<? extends KeySpec>> PRIVATE_KEY_SPEC_CLASSES;
-    public static final Map<String, Class<? extends KeySpec>> PUBLIC_KEY_SPEC_CLASSES;
-    public static final Map<String, Integer> MINIMUM_KEY_SIZE;
+    private static final Map<String, Class<? extends KeySpec>> PRIVATE_KEY_SPEC_CLASSES;
+    private static final Map<String, Class<? extends KeySpec>> PUBLIC_KEY_SPEC_CLASSES;
+    private static final Map<String, Integer> MINIMUM_KEY_SIZE;
     static {
-        PRIVATE_KEY_SPEC_CLASSES = new HashMap<String, Class<? extends KeySpec>>();
-        PUBLIC_KEY_SPEC_CLASSES = new HashMap<String, Class<? extends KeySpec>>();
-        MINIMUM_KEY_SIZE = new HashMap<String, Integer>();
+        PRIVATE_KEY_SPEC_CLASSES = new HashMap<>();
+        PUBLIC_KEY_SPEC_CLASSES = new HashMap<>();
+        MINIMUM_KEY_SIZE = new HashMap<>();
         PRIVATE_KEY_SPEC_CLASSES.put("RSA", RSAPrivateCrtKeySpec.class);
         PUBLIC_KEY_SPEC_CLASSES.put("RSA", RSAPublicKeySpec.class);
         MINIMUM_KEY_SIZE.put("RSA", 512);
@@ -1120,178 +790,4 @@
         return MINIMUM_KEY_SIZE.get(algName);
     }
 
-    /**
-     * Asserts that the cipher suites array is non-null and that it
-     * all of its contents are cipher suites known to this
-     * implementation. As a convenience, returns any unenabled cipher
-     * suites in a test for those that want to verify separately that
-     * all cipher suites were included.
-     */
-    private static Set<String> assertValidCipherSuites(
-            Set<String> expected, String[] cipherSuites) {
-        assertNotNull(cipherSuites);
-        assertTrue(cipherSuites.length != 0);
-
-        // Make sure all cipherSuites names are expected
-        Set remainingCipherSuites = new HashSet<String>(expected);
-        Set unknownCipherSuites = new HashSet<String>();
-        for (String cipherSuite : cipherSuites) {
-            boolean removed = remainingCipherSuites.remove(cipherSuite);
-            if (!removed) {
-                unknownCipherSuites.add(cipherSuite);
-            }
-        }
-        assertEquals("Unknown cipher suites", Collections.EMPTY_SET, unknownCipherSuites);
-        return remainingCipherSuites;
-    }
-
-    /**
-     * After using assertValidCipherSuites on cipherSuites,
-     * assertSupportedCipherSuites additionally verifies that all
-     * supported cipher suites where in the input array.
-     */
-    private static void assertSupportedCipherSuites(Set<String> expected, String[] cipherSuites) {
-        Set<String> remainingCipherSuites = assertValidCipherSuites(expected, cipherSuites);
-        assertEquals("Missing cipher suites", Collections.EMPTY_SET, remainingCipherSuites);
-        assertEquals(expected.size(), cipherSuites.length);
-    }
-
-    /**
-     * Asserts that the protocols array is non-null and that it all of
-     * its contents are protocols known to this implementation. As a
-     * convenience, returns any unenabled protocols in a test for
-     * those that want to verify separately that all protocols were
-     * included.
-     */
-    private static Set<String> assertValidProtocols(Set<String> expected, String[] protocols) {
-        assertNotNull(protocols);
-        assertTrue(protocols.length != 0);
-
-        // Make sure all protocols names are expected
-        Set remainingProtocols = new HashSet<String>(expected);
-        Set unknownProtocols = new HashSet<String>();
-        for (String protocol : protocols) {
-            if (!remainingProtocols.remove(protocol)) {
-                unknownProtocols.add(protocol);
-            }
-        }
-        assertEquals("Unknown protocols", Collections.EMPTY_SET, unknownProtocols);
-        return remainingProtocols;
-    }
-
-    /**
-     * After using assertValidProtocols on protocols,
-     * assertSupportedProtocols additionally verifies that all
-     * supported protocols where in the input array.
-     */
-    private static void assertSupportedProtocols(Set<String> expected, String[] protocols) {
-        Set<String> remainingProtocols = assertValidProtocols(expected, protocols);
-        assertEquals("Missing protocols", Collections.EMPTY_SET, remainingProtocols);
-        assertEquals(expected.size(), protocols.length);
-    }
-
-    /**
-     * Asserts that the provided list of protocols matches the supported list of protocols.
-     */
-    public static void assertSupportedProtocols(String[] protocols) {
-        assertSupportedProtocols(SSL_SOCKET_PROTOCOLS, protocols);
-    }
-
-    /**
-     * Assert that the provided list of cipher suites contains only the supported cipher suites.
-     */
-    public static void assertValidCipherSuites(String[] cipherSuites) {
-        assertValidCipherSuites(CIPHER_SUITES, cipherSuites);
-    }
-
-    /**
-     * Assert that the provided list of cipher suites matches the supported list.
-     */
-    public static void assertSupportedCipherSuites(String[] cipherSuites) {
-        assertSupportedCipherSuites(CIPHER_SUITES, cipherSuites);
-    }
-
-    /**
-     * Assert cipher suites match the default list in content and priority order and contain
-     * only cipher suites permitted by default.
-     */
-    public static void assertDefaultCipherSuites(String[] cipherSuites) {
-        assertValidCipherSuites(cipherSuites);
-        assertEquals(CIPHER_SUITES_DEFAULT, Arrays.asList(cipherSuites));
-
-        // Assert that all the cipher suites are permitted to be in the default list.
-        // This assertion is a backup for the stricter assertion above.
-        //
-        // There is no point in asserting this for the RI as it's outside of our control.
-        if (!IS_RI) {
-            List<String> disallowedDefaultCipherSuites = new ArrayList<String>();
-            for (String cipherSuite : cipherSuites) {
-                if (!isPermittedDefaultCipherSuite(cipherSuite)) {
-                    disallowedDefaultCipherSuites.add(cipherSuite);
-                }
-            }
-            assertEquals(Collections.EMPTY_LIST, disallowedDefaultCipherSuites);
-        }
-    }
-
-    public static void assertDefaultEllipticCurves(String[] curves) {
-        assertEquals(ELLIPTIC_CURVES_DEFAULT, Arrays.asList(curves));
-    }
-
-    public static void assertSSLContextEnabledProtocols(String version, String[] protocols) {
-        assertEquals("For protocol \"" + version + "\"",
-                Arrays.toString(SSL_CONTEXT_PROTOCOLS_ENABLED.get(version)),
-                Arrays.toString(protocols));
-    }
-
-    private static boolean isPermittedDefaultCipherSuite(String cipherSuite) {
-        assertNotNull(cipherSuite);
-        if (CIPHER_SUITE_SECURE_RENEGOTIATION.equals(cipherSuite)) {
-            return true;
-        }
-        assertTrue(cipherSuite, cipherSuite.startsWith("TLS_") || cipherSuite.startsWith("SSL_"));
-
-        // Example: RSA_WITH_AES_128_CBC_SHA
-        String remainder = cipherSuite.substring("TLS_".length());
-        int macDelimiterIndex = remainder.lastIndexOf('_');
-        assertTrue(cipherSuite, macDelimiterIndex != -1);
-        // Example: SHA
-        String mac = remainder.substring(macDelimiterIndex + 1);
-
-        // Example: RSA_WITH_AES_128_CBC
-        remainder = remainder.substring(0, macDelimiterIndex);
-        int withDelimiterIndex = remainder.indexOf("_WITH_");
-        assertTrue(cipherSuite, withDelimiterIndex != -1);
-
-        // Example: RSA
-        String keyExchange = remainder.substring(0, withDelimiterIndex);
-        // Example: AES_128_CBC
-        String bulkEncryptionCipher = remainder.substring(withDelimiterIndex + "_WITH_".length());
-
-        if (!PERMITTED_DEFAULT_MACS.contains(mac)) {
-            return false;
-        }
-        if (!PERMITTED_DEFAULT_KEY_EXCHANGE_ALGS.contains(keyExchange)) {
-            return false;
-        }
-        if (!PERMITTED_DEFAULT_BULK_ENCRYPTION_CIPHERS.contains(bulkEncryptionCipher)) {
-            return false;
-        }
-
-        return true;
-    }
-
-    /**
-     * Get all supported mode names for the given cipher.
-     */
-    public static Set<String> getModesForCipher(String cipher) {
-        return CIPHER_MODES.get(cipher);
-    }
-
-    /**
-     * Get all supported padding names for the given cipher.
-     */
-    public static Set<String> getPaddingsForCipher(String cipher) {
-        return CIPHER_PADDINGS.get(cipher);
-    }
 }
diff --git a/support/src/test/java/libcore/javax/net/ssl/SSLConfigurationAsserts.java b/support/src/test/java/libcore/javax/net/ssl/SSLConfigurationAsserts.java
index bdaad65..d76ee49 100644
--- a/support/src/test/java/libcore/javax/net/ssl/SSLConfigurationAsserts.java
+++ b/support/src/test/java/libcore/javax/net/ssl/SSLConfigurationAsserts.java
@@ -16,20 +16,14 @@
 
 package libcore.javax.net.ssl;
 
-import junit.framework.Assert;
-import libcore.java.security.StandardNames;
 import java.io.IOException;
 import java.util.Arrays;
-import java.util.Collections;
 import java.util.HashSet;
-import java.util.Set;
 import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLEngine;
 import javax.net.ssl.SSLParameters;
-import javax.net.ssl.SSLServerSocket;
-import javax.net.ssl.SSLServerSocketFactory;
 import javax.net.ssl.SSLSocket;
 import javax.net.ssl.SSLSocketFactory;
+import junit.framework.Assert;
 
 /**
  * Assertions about the configuration of TLS/SSL primitives.
@@ -40,41 +34,6 @@
   private SSLConfigurationAsserts() {}
 
   /**
-   * Asserts that the provided {@link SSLContext} has the expected default configuration, and that
-   * {@link SSLSocketFactory}, {@link SSLServerSocketFactory}, {@link SSLSocket},
-   * {@link SSLServerSocket} and {@link SSLEngine} instances created from the context match the
-   * configuration.
-   */
-  public static void assertSSLContextDefaultConfiguration(SSLContext sslContext)
-      throws IOException {
-    SSLParameters defaultParameters = sslContext.getDefaultSSLParameters();
-    StandardNames.assertSSLContextEnabledProtocols(sslContext.getProtocol(),
-        defaultParameters.getProtocols());
-    StandardNames.assertDefaultCipherSuites(defaultParameters.getCipherSuites());
-    assertFalse(defaultParameters.getWantClientAuth());
-    assertFalse(defaultParameters.getNeedClientAuth());
-
-    SSLParameters supportedParameters = sslContext.getSupportedSSLParameters();
-    StandardNames.assertSupportedCipherSuites(supportedParameters.getCipherSuites());
-    StandardNames.assertSupportedProtocols(supportedParameters.getProtocols());
-    assertFalse(supportedParameters.getWantClientAuth());
-    assertFalse(supportedParameters.getNeedClientAuth());
-
-    assertContainsAll("Unsupported enabled cipher suites", supportedParameters.getCipherSuites(),
-        defaultParameters.getCipherSuites());
-    assertContainsAll("Unsupported enabled protocols", supportedParameters.getProtocols(),
-        defaultParameters.getProtocols());
-
-    assertSSLSocketFactoryConfigSameAsSSLContext(sslContext.getSocketFactory(), sslContext);
-    assertSSLServerSocketFactoryConfigSameAsSSLContext(sslContext.getServerSocketFactory(),
-        sslContext);
-
-    SSLEngine sslEngine = sslContext.createSSLEngine();
-    assertFalse(sslEngine.getUseClientMode());
-    assertSSLEngineConfigSameAsSSLContext(sslEngine, sslContext);
-  }
-
-  /**
    * Asserts that the provided {@link SSLSocketFactory} has the expected default configuration and
    * that {@link SSLSocket} instances created by the factory match the configuration.
    */
@@ -104,15 +63,6 @@
   }
 
   /**
-   * Asserts that the provided {@link SSLSocket} has the expected default configuration.
-   */
-  public static void assertSSLSocketDefaultConfiguration(SSLSocket sslSocket) throws Exception {
-    assertTrue(sslSocket.getUseClientMode());
-    assertTrue(sslSocket.getEnableSessionCreation());
-    assertSSLSocketConfigSameAsSSLContext(sslSocket, SSLContext.getDefault());
-  }
-
-  /**
    * Asserts that {@link SSLSocket}'s configuration matches {@code SSLContext's} configuration.
    */
   private static void assertSSLSocketConfigSameAsSSLContext(SSLSocket sslSocket,
@@ -129,95 +79,6 @@
         sslContext.getSupportedSSLParameters().getProtocols());
   }
 
-  /**
-   * Asserts that the provided {@link SSLServerSocketFactory} has the expected default
-   * configuration, and that {@link SSLServerSocket} instances created by the factory match the
-   * configuration.
-   */
-  public static void assertSSLServerSocketFactoryDefaultConfiguration(
-      SSLServerSocketFactory sslServerSocketFactory) throws Exception {
-    assertSSLServerSocketFactoryConfigSameAsSSLContext(sslServerSocketFactory,
-        SSLContext.getDefault());
-  }
-
-  /**
-   * Asserts that {@link SSLServerSocketFactory}'s configuration matches {@code SSLContext}'s
-   * configuration, and that {@link SSLServerSocket} instances obtained from the factory match this
-   * configuration as well.
-   */
-  private static void assertSSLServerSocketFactoryConfigSameAsSSLContext(
-      SSLServerSocketFactory sslServerSocketFactory, SSLContext sslContext)  throws IOException {
-    assertCipherSuitesEqual(sslContext.getDefaultSSLParameters().getCipherSuites(),
-        sslServerSocketFactory.getDefaultCipherSuites());
-    assertCipherSuitesEqual(sslContext.getSupportedSSLParameters().getCipherSuites(),
-        sslServerSocketFactory.getSupportedCipherSuites());
-    try (SSLServerSocket sslServerSocket =
-        (SSLServerSocket) sslServerSocketFactory.createServerSocket()) {
-      assertFalse(sslServerSocket.getUseClientMode());
-      assertTrue(sslServerSocket.getEnableSessionCreation());
-      assertSSLServerSocketConfigSameAsSSLContext(sslServerSocket, sslContext);
-    }
-  }
-
-  /**
-   * Asserts that the provided {@link SSLServerSocket} has the expected default configuration.
-   */
-  public static void assertSSLServerSocketDefaultConfiguration(SSLServerSocket sslServerSocket)
-      throws Exception {
-    assertFalse(sslServerSocket.getUseClientMode());
-    assertTrue(sslServerSocket.getEnableSessionCreation());
-    assertSSLServerSocketConfigSameAsSSLContext(sslServerSocket, SSLContext.getDefault());
-    // TODO: Check SSLParameters when supported by SSLServerSocket API
-  }
-
-  /**
-   * Asserts that {@link SSLServerSocket}'s configuration matches {@code SSLContext's}
-   * configuration.
-   */
-  private static void assertSSLServerSocketConfigSameAsSSLContext(SSLServerSocket sslServerSocket,
-      SSLContext sslContext) {
-    assertCipherSuitesEqual(sslServerSocket.getEnabledCipherSuites(),
-        sslContext.getDefaultSSLParameters().getCipherSuites());
-    assertProtocolsEqual(sslServerSocket.getEnabledProtocols(),
-        sslContext.getDefaultSSLParameters().getProtocols());
-
-    assertCipherSuitesEqual(sslServerSocket.getSupportedCipherSuites(),
-        sslContext.getSupportedSSLParameters().getCipherSuites());
-    assertProtocolsEqual(sslServerSocket.getSupportedProtocols(),
-        sslContext.getSupportedSSLParameters().getProtocols());
-
-    assertEquals(sslServerSocket.getNeedClientAuth(),
-        sslContext.getDefaultSSLParameters().getNeedClientAuth());
-    assertEquals(sslServerSocket.getWantClientAuth(),
-        sslContext.getDefaultSSLParameters().getWantClientAuth());
-  }
-
-  /**
-   * Asserts that the provided {@link SSLEngine} has the expected default configuration.
-   */
-  public static void assertSSLEngineDefaultConfiguration(SSLEngine sslEngine) throws Exception {
-    assertFalse(sslEngine.getUseClientMode());
-    assertTrue(sslEngine.getEnableSessionCreation());
-    assertSSLEngineConfigSameAsSSLContext(sslEngine, SSLContext.getDefault());
-  }
-
-  /**
-   * Asserts that {@link SSLEngine}'s configuration matches {@code SSLContext's} configuration.
-   */
-  private static void assertSSLEngineConfigSameAsSSLContext(SSLEngine sslEngine,
-      SSLContext sslContext) {
-    assertSSLParametersEqual(sslEngine.getSSLParameters(), sslContext.getDefaultSSLParameters());
-    assertCipherSuitesEqual(sslEngine.getEnabledCipherSuites(),
-        sslContext.getDefaultSSLParameters().getCipherSuites());
-    assertProtocolsEqual(sslEngine.getEnabledProtocols(),
-        sslContext.getDefaultSSLParameters().getProtocols());
-
-    assertCipherSuitesEqual(sslEngine.getSupportedCipherSuites(),
-        sslContext.getSupportedSSLParameters().getCipherSuites());
-    assertProtocolsEqual(sslEngine.getSupportedProtocols(),
-        sslContext.getSupportedSSLParameters().getProtocols());
-  }
-
   private static void assertSSLParametersEqual(SSLParameters expected, SSLParameters actual) {
     assertCipherSuitesEqual(expected.getCipherSuites(), actual.getCipherSuites());
     assertProtocolsEqual(expected.getProtocols(), actual.getProtocols());
@@ -236,13 +97,4 @@
     assertEquals(new HashSet<String>(Arrays.asList(expected)),
         new HashSet<String>(Arrays.asList(actual)));
   }
-
-  /**
-   * Asserts that the {@code container} contains all the {@code elements}.
-   */
-  private static void assertContainsAll(String message, String[] container, String[] elements) {
-    Set<String> elementsNotInContainer = new HashSet<String>(Arrays.asList(elements));
-    elementsNotInContainer.removeAll(Arrays.asList(container));
-    assertEquals(message, Collections.EMPTY_SET, elementsNotInContainer);
-  }
 }
diff --git a/support/src/test/java/org/apache/harmony/security/tests/support/MyBasicPermission.java b/support/src/test/java/org/apache/harmony/security/tests/support/MyBasicPermission.java
deleted file mode 100644
index a0dbcea..0000000
--- a/support/src/test/java/org/apache/harmony/security/tests/support/MyBasicPermission.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You under the Apache License, Version 2.0
- *  (the "License"); you may not use this file except in compliance with
- *  the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-package org.apache.harmony.security.tests.support;
-
-import java.security.BasicPermission;
-import java.security.Permission;
-
-public class MyBasicPermission extends BasicPermission {
-    public MyBasicPermission(String name) { super(""); }
-
-    @Override public String getActions() { return null; }
-
-    @Override public boolean implies(Permission permission) { return true; }
-}
diff --git a/support/src/test/java/org/apache/harmony/security/tests/support/MyGuard.java b/support/src/test/java/org/apache/harmony/security/tests/support/MyGuard.java
deleted file mode 100644
index 073c928..0000000
--- a/support/src/test/java/org/apache/harmony/security/tests/support/MyGuard.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You under the Apache License, Version 2.0
- *  (the "License"); you may not use this file except in compliance with
- *  the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-package org.apache.harmony.security.tests.support;
-
-import java.io.Serializable;
-import java.security.Guard;
-
-public class MyGuard implements Guard, Serializable {
-
-    private static final long serialVersionUID = 5767944725614823373L;
-
-    final boolean enabled;
-
-    public MyGuard(boolean state) {
-        enabled = state;
-    }
-
-    public void checkGuard(Object object) {
-        if (!enabled) {
-            throw new SecurityException();
-        }
-    }
-}
diff --git a/support/src/test/java/org/apache/harmony/security/tests/support/MyMessageDigest2.java b/support/src/test/java/org/apache/harmony/security/tests/support/MyMessageDigest2.java
deleted file mode 100644
index b9fb959..0000000
--- a/support/src/test/java/org/apache/harmony/security/tests/support/MyMessageDigest2.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You under the Apache License, Version 2.0
- *  (the "License"); you may not use this file except in compliance with
- *  the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-/**
-* @author Boris V. Kuznetsov
-* @version $Revision$
-*/
-
-package org.apache.harmony.security.tests.support;
-
-import java.security.MessageDigestSpi;
-
-/**
- * Tests implementation of MessageDigest
- *
- */
-public class MyMessageDigest2 extends MessageDigestSpi {
-
-    public static boolean runEngineReset = false;
-    public static boolean runEngineDigest = false;
-    public static boolean runEngineUpdate1 = false;
-    public static boolean runEngineUpdate2 = false;
-
-    /**
-     *
-     */
-    public void engineReset() {
-        runEngineReset = true;
-    }
-
-    /**
-     *
-     */
-    public byte[] engineDigest() {
-        runEngineDigest = true;
-        return new byte[0];
-    }
-
-    /**
-     *
-     */
-    public void engineUpdate(byte arg0) {
-        runEngineUpdate1 = true;
-    }
-
-    /**
-     *
-     */
-    public void engineUpdate(byte[] arg0, int arg1, int arg2) {
-        runEngineUpdate2 = true;
-    }
-
-    /**
-     * The implementation is not cloneable
-     */
-    public Object clone() throws CloneNotSupportedException {
-        throw new CloneNotSupportedException();
-    }
-}
diff --git a/support/src/test/java/org/apache/harmony/security/tests/support/MySSLContextSpi.java b/support/src/test/java/org/apache/harmony/security/tests/support/MySSLContextSpi.java
deleted file mode 100644
index 9da7a6f..0000000
--- a/support/src/test/java/org/apache/harmony/security/tests/support/MySSLContextSpi.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You under the Apache License, Version 2.0
- *  (the "License"); you may not use this file except in compliance with
- *  the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-package org.apache.harmony.security.tests.support;
-
-import java.nio.ByteBuffer;
-import java.security.KeyManagementException;
-import java.security.SecureRandom;
-import javax.net.ssl.KeyManager;
-import javax.net.ssl.SSLContextSpi;
-import javax.net.ssl.SSLEngine;
-import javax.net.ssl.SSLEngineResult;
-import javax.net.ssl.SSLException;
-import javax.net.ssl.SSLParameters;
-import javax.net.ssl.SSLServerSocketFactory;
-import javax.net.ssl.SSLSession;
-import javax.net.ssl.SSLSessionContext;
-import javax.net.ssl.SSLSocketFactory;
-import javax.net.ssl.TrustManager;
-
-/**
- * Additional class for verification of SSLContextSpi and SSLContext
- * functionality
- *
- */
-
-public class MySSLContextSpi extends SSLContextSpi {
-
-    private boolean init = false;
-
-    protected void engineInit(KeyManager[] km, TrustManager[] tm,
-            SecureRandom sr) throws KeyManagementException {
-        if (sr == null) {
-            throw new KeyManagementException(
-                    "secureRandom is null");
-        }
-        init = true;
-    }
-
-    protected SSLSocketFactory engineGetSocketFactory() {
-        if (!init) {
-            throw new RuntimeException("Not initialiazed");
-        }
-        return null;
-    }
-
-    protected SSLServerSocketFactory engineGetServerSocketFactory() {
-        if (!init) {
-            throw new RuntimeException("Not initialiazed");
-        }
-        return null;
-    }
-
-    protected SSLSessionContext engineGetServerSessionContext() {
-        if (!init) {
-            throw new RuntimeException("Not initialiazed");
-        }
-        return null;
-    }
-
-    protected SSLSessionContext engineGetClientSessionContext() {
-        if (!init) {
-            throw new RuntimeException("Not initialiazed");
-        }
-        return null;
-    }
-
-    protected SSLParameters engineGetDefaultSSLParameters() {
-        engineGetSocketFactory();
-        return null;
-    }
-
-    protected SSLParameters engineGetSupportedSSLParameters() {
-        engineGetSocketFactory();
-        return null;
-    }
-
-    /*
-     * FIXME: add these methods
-     */
-    protected SSLEngine engineCreateSSLEngine(String host, int port) {
-        if (!init) {
-            throw new RuntimeException("Not initialiazed");
-        }
-        return new tmpSSLEngine(host, port);
-    }
-
-    protected SSLEngine engineCreateSSLEngine() {
-        if (!init) {
-            throw new RuntimeException("Not initialiazed");
-        }
-        return new tmpSSLEngine();
-    }
-
-    public class tmpSSLEngine extends SSLEngine {
-        String tmpHost;
-        int tmpPort;
-        public tmpSSLEngine() {
-            tmpHost = null;
-            tmpPort = 0;
-        }
-        public tmpSSLEngine(String host, int port) {
-            tmpHost = host;
-            tmpPort = port;
-        }
-        public String getPeerHost() {
-            return tmpHost;
-        }
-        public int getPeerPort() {
-            return tmpPort;
-        }
-        public void beginHandshake() throws SSLException { }
-        public void closeInbound() throws SSLException { }
-        public void closeOutbound() {}
-        public Runnable getDelegatedTask() { return null; }
-        public String[] getEnabledCipherSuites() { return null; }
-        public String[] getEnabledProtocols() {return null; }
-        public boolean getEnableSessionCreation() { return true; }
-        public SSLEngineResult.HandshakeStatus getHandshakeStatus() { return null; }
-        public boolean getNeedClientAuth() { return true; }
-        public SSLSession getSession() { return null; }
-        public String[] getSupportedCipherSuites()  { return null; }
-        public String[] getSupportedProtocols()  { return null; }
-        public boolean getUseClientMode()  { return true; }
-        public boolean getWantClientAuth()  { return true; }
-        public boolean isInboundDone()  { return true; }
-        public boolean isOutboundDone()  { return true; }
-        public void setEnabledCipherSuites(String[] suites) { }
-        public void setEnabledProtocols(String[] protocols) { }
-        public void setEnableSessionCreation(boolean flag) { }
-        public void setNeedClientAuth(boolean need) { }
-        public void setUseClientMode(boolean mode) { }
-        public void setWantClientAuth(boolean want) { }
-        public SSLEngineResult unwrap(ByteBuffer src, ByteBuffer[] dsts,
-                int offset, int length) throws SSLException {
-            return null;
-        }
-        public SSLEngineResult wrap(ByteBuffer[] srcs, int offset,
-                int length, ByteBuffer dst) throws SSLException {
-            return null;
-        }
-    }
-}
diff --git a/support/src/test/java/org/apache/harmony/security/tests/support/MySignature2.java b/support/src/test/java/org/apache/harmony/security/tests/support/MySignature2.java
deleted file mode 100644
index 1742800..0000000
--- a/support/src/test/java/org/apache/harmony/security/tests/support/MySignature2.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You under the Apache License, Version 2.0
- *  (the "License"); you may not use this file except in compliance with
- *  the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-/**
-* @author Boris V. Kuznetsov
-* @version $Revision$
-*/
-
-package org.apache.harmony.security.tests.support;
-
-import java.security.InvalidKeyException;
-import java.security.InvalidParameterException;
-import java.security.PrivateKey;
-import java.security.PublicKey;
-import java.security.SignatureException;
-import java.security.SignatureSpi;
-
-/**
- * Tests implementation of Signature
- *
- */
-public class MySignature2 extends SignatureSpi {
-
-    public static boolean runEngineInitVerify = false;
-    public static boolean runEngineInitSign = false;
-    public static boolean runEngineUpdate1 = false;
-    public static boolean runEngineUpdate2 = false;
-    public static boolean runEngineSign = false;
-    public static boolean runEngineVerify = false;
-    public static boolean runEngineSetParameter = false;
-    public static boolean runEngineGetParameter = false;
-
-    protected void engineInitVerify(PublicKey publicKey)
-            throws InvalidKeyException {
-        runEngineInitVerify = true;
-    }
-
-    protected void engineInitSign(PrivateKey privateKey)
-            throws InvalidKeyException {
-        runEngineInitSign = true;
-    }
-
-    protected void engineUpdate(byte b) throws SignatureException {
-        runEngineUpdate1 = true;
-    }
-
-    protected void engineUpdate(byte[] b, int off, int len)
-            throws SignatureException {
-        runEngineUpdate2 = true;
-    }
-
-    protected byte[] engineSign() throws SignatureException {
-        runEngineSign = true;
-        return null;
-    }
-
-    protected boolean engineVerify(byte[] sigBytes) throws SignatureException {
-        runEngineVerify = true;
-        return false;
-    }
-
-    protected void engineSetParameter(String param, Object value)
-            throws InvalidParameterException {
-        runEngineSetParameter = true;
-    }
-
-    protected Object engineGetParameter(String param)
-            throws InvalidParameterException {
-        runEngineGetParameter = true;
-        return null;
-    }
-}
diff --git a/support/src/test/java/org/apache/harmony/security/tests/support/MyTrustManagerFactorySpi.java b/support/src/test/java/org/apache/harmony/security/tests/support/MyTrustManagerFactorySpi.java
deleted file mode 100644
index db9e0f8..0000000
--- a/support/src/test/java/org/apache/harmony/security/tests/support/MyTrustManagerFactorySpi.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You under the Apache License, Version 2.0
- *  (the "License"); you may not use this file except in compliance with
- *  the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-package org.apache.harmony.security.tests.support;
-
-import java.security.InvalidAlgorithmParameterException;
-import java.security.KeyStore;
-import java.security.KeyStoreException;
-
-import javax.net.ssl.ManagerFactoryParameters;
-import javax.net.ssl.TrustManager;
-import javax.net.ssl.TrustManagerFactorySpi;
-
-/**
- * Class for vertifying TrustManagerFactorySpi and TrustManagerFactory
- * functionality
- *
- */
-
-public class MyTrustManagerFactorySpi extends TrustManagerFactorySpi {
-    protected void engineInit(KeyStore ks) throws KeyStoreException {
-        if (ks == null) {
-            throw new KeyStoreException("Not supported operation for null KeyStore");
-        }
-    }
-
-    protected void engineInit(ManagerFactoryParameters spec)
-            throws InvalidAlgorithmParameterException {
-        if (spec == null) {
-            throw new InvalidAlgorithmParameterException("Null parameter");
-        }
-        if (spec instanceof Parameters) {
-            try {
-                engineInit(((Parameters)spec).getKeyStore());
-            } catch (KeyStoreException e) {
-                throw new RuntimeException(e);
-            }
-        } else {
-            throw new InvalidAlgorithmParameterException("Invalid parameter");
-        }
-    }
-
-    protected TrustManager[] engineGetTrustManagers() {
-        return null;
-    }
-
-
-    public static class Parameters implements ManagerFactoryParameters {
-        private KeyStore keyStore;
-        public Parameters (KeyStore ks) {
-            this.keyStore = ks;
-        }
-        public KeyStore getKeyStore() {
-            return keyStore;
-        }
-    }
-}
diff --git a/support/src/test/java/org/apache/harmony/security/tests/support/SecurityChecker.java b/support/src/test/java/org/apache/harmony/security/tests/support/SecurityChecker.java
deleted file mode 100644
index 2cf846a..0000000
--- a/support/src/test/java/org/apache/harmony/security/tests/support/SecurityChecker.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You under the Apache License, Version 2.0
- *  (the "License"); you may not use this file except in compliance with
- *  the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-/**
-* @author Alexey V. Varlamov
-* @version $Revision$
-*/
-
-package org.apache.harmony.security.tests.support;
-
-import java.security.Permission;
-
-/**
- * Custom security manager
- */
-
-public class SecurityChecker extends SecurityManager {
-
-    public boolean enableAccess;
-
-    public Permission checkTarget;
-
-    public boolean checkAsserted;
-
-    public SecurityChecker(Permission target, boolean enable) {
-        checkAsserted = false;
-        checkTarget = target;
-        enableAccess = enable;
-    }
-
-    public void checkPermission(Permission p) {
-        if (checkTarget.equals(p)) {
-            checkAsserted = true;
-            if (!enableAccess) {
-                throw new SecurityException();
-            }
-        }
-    }
-
-    public SecurityChecker reset() {
-        checkAsserted = false;
-        return this;
-    }
-}
\ No newline at end of file
diff --git a/support/src/test/java/org/apache/harmony/security/tests/support/TestUtils.java b/support/src/test/java/org/apache/harmony/security/tests/support/TestUtils.java
deleted file mode 100644
index d5d8842..0000000
--- a/support/src/test/java/org/apache/harmony/security/tests/support/TestUtils.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You under the Apache License, Version 2.0
- *  (the "License"); you may not use this file except in compliance with
- *  the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-/**
-* @author Vladimir N. Molotkov
-* @version $Revision$
-*/
-
-package org.apache.harmony.security.tests.support;
-
-import java.util.Properties;
-
-/**
- * Test utility class
- */
-public class TestUtils {
-
-    /**
-     * No need to instantiate
-     */
-    private TestUtils() {
-    }
-
-    /**
-     * Prints byte array <code>data</code> as hex to the
-     * <code>System.out</code> in the customizable form.
-     *
-     * @param perLine how many numbers put on single line
-     * @param prefix custom output number prefix
-     * @param delimiter custom output number delimiter
-     * @param data data to be printed
-     */
-    public static void printAsHex(int perLine,
-                                  String prefix,
-                                  String delimiter,
-                                  byte[] data) {
-        for (int i=0; i<data.length; i++) {
-            String tail = Integer.toHexString(0x000000ff & data[i]);
-            if (tail.length() == 1) {
-                tail = "0" + tail;
-            }
-            System.out.print(prefix + "0x" + tail + delimiter);
-
-            if (((i+1)%perLine) == 0) {
-                System.out.println("");
-            }
-        }
-        System.out.println("");
-    }
-
-    /**
-     * Sets system property
-     *
-     * @param key - the name of the system property.
-     * @param value - the value to be set
-     */
-    public static void setSystemProperty(String key, String value) {
-        Properties properties = System.getProperties();
-        if (value == null) {
-            properties.remove(key);
-        } else {
-            properties.setProperty(key, value);
-        }
-        System.setProperties(properties);
-    }
-}
diff --git a/support/src/test/java/org/apache/harmony/xnet/tests/support/X509KeyManagerImpl.java b/support/src/test/java/org/apache/harmony/xnet/tests/support/X509KeyManagerImpl.java
deleted file mode 100644
index ade99d2..0000000
--- a/support/src/test/java/org/apache/harmony/xnet/tests/support/X509KeyManagerImpl.java
+++ /dev/null
@@ -1,225 +0,0 @@
-package org.apache.harmony.xnet.tests.support;
-
-import java.io.ByteArrayInputStream;
-import java.security.KeyStore;
-import java.security.cert.CertificateFactory;
-import java.security.cert.X509Certificate;
-import java.security.cert.Certificate;
-import java.util.Enumeration;
-import java.util.Vector;
-import java.security.Principal;
-import java.security.PrivateKey;
-import java.net.Socket;
-
-import javax.net.ssl.X509KeyManager;
-
-public class X509KeyManagerImpl implements X509KeyManager {
-
-    private String keyType;
-    private String client = "CLIENT";
-    private String server = "SERVER";
-    private KeyStore keyTest;
-    private X509Certificate[] cert = null;
-
-    // creating a certificate
-    String certificate = "-----BEGIN CERTIFICATE-----\n"
-            + "MIICZTCCAdICBQL3AAC2MA0GCSqGSIb3DQEBAgUAMF8xCzAJBgNVBAYTAlVTMSAw\n"
-            + "HgYDVQQKExdSU0EgRGF0YSBTZWN1cml0eSwgSW5jLjEuMCwGA1UECxMlU2VjdXJl\n"
-            + "IFNlcnZlciBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05NzAyMjAwMDAwMDBa\n"
-            + "Fw05ODAyMjAyMzU5NTlaMIGWMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZv\n"
-            + "cm5pYTESMBAGA1UEBxMJUGFsbyBBbHRvMR8wHQYDVQQKExZTdW4gTWljcm9zeXN0\n"
-            + "ZW1zLCBJbmMuMSEwHwYDVQQLExhUZXN0IGFuZCBFdmFsdWF0aW9uIE9ubHkxGjAY\n"
-            + "BgNVBAMTEWFyZ29uLmVuZy5zdW4uY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCB\n"
-            + "iQKBgQCofmdY+PiUWN01FOzEewf+GaG+lFf132UpzATmYJkA4AEA/juW7jSi+LJk\n"
-            + "wJKi5GO4RyZoyimAL/5yIWDV6l1KlvxyKslr0REhMBaD/3Z3EsLTTEf5gVrQS6sT\n"
-            + "WMoSZAyzB39kFfsB6oUXNtV8+UKKxSxKbxvhQn267PeCz5VX2QIDAQABMA0GCSqG\n"
-            + "SIb3DQEBAgUAA34AXl3at6luiV/7I9MN5CXYoPJYI8Bcdc1hBagJvTMcmlqL2uOZ\n"
-            + "H9T5hNMEL9Tk6aI7yZPXcw/xI2K6pOR/FrMp0UwJmdxX7ljV6ZtUZf7pY492UqwC\n"
-            + "1777XQ9UEZyrKJvF5ntleeO0ayBqLGVKCWzWZX9YsXCpv47FNLZbupE=\n"
-            + "-----END CERTIFICATE-----\n";
-
-    ByteArrayInputStream certArray = new ByteArrayInputStream(certificate
-            .getBytes());
-
-    String certificate2 = "-----BEGIN CERTIFICATE-----\n"
-            + "MIICZzCCAdCgAwIBAgIBGzANBgkqhkiG9w0BAQUFADBhMQswCQYDVQQGEwJVUzEY\n"
-            + "MBYGA1UEChMPVS5TLiBHb3Zlcm5tZW50MQwwCgYDVQQLEwNEb0QxDDAKBgNVBAsT\n"
-            + "A1BLSTEcMBoGA1UEAxMTRG9EIFBLSSBNZWQgUm9vdCBDQTAeFw05ODA4MDMyMjAy\n"
-            + "MjlaFw0wODA4MDQyMjAyMjlaMGExCzAJBgNVBAYTAlVTMRgwFgYDVQQKEw9VLlMu\n"
-            + "IEdvdmVybm1lbnQxDDAKBgNVBAsTA0RvRDEMMAoGA1UECxMDUEtJMRwwGgYDVQQD\n"
-            + "ExNEb0QgUEtJIE1lZCBSb290IENBMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKB\n"
-            + "gQDbrM/J9FrJSX+zxFUbsI9Vw5QbguVBIa95rwW/0M8+sM0r5gd+DY6iubm6wnXk\n"
-            + "CSvbfQlFEDSKr4WYeeGp+d9WlDnQdtDFLdA45tCi5SHjnW+hGAmZnld0rz6wQekF\n"
-            + "5xQaa5A6wjhMlLOjbh27zyscrorMJ1O5FBOWnEHcRv6xqQIDAQABoy8wLTAdBgNV\n"
-            + "HQ4EFgQUVrmYR6m9701cHQ3r5kXyG7zsCN0wDAYDVR0TBAUwAwEB/zANBgkqhkiG\n"
-            + "9w0BAQUFAAOBgQDVX1Y0YqC7vekeZjVxtyuC8Mnxbrz6D109AX07LEIRzNYzwZ0w\n"
-            + "MTImSp9sEzWW+3FueBIU7AxGys2O7X0qmN3zgszPfSiocBuQuXIYQctJhKjF5KVc\n"
-            + "VGQRYYlt+myhl2vy6yPzEVCjiKwMEb1Spu0irCf+lFW2hsdjvmSQMtZvOw==\n"
-            + "-----END CERTIFICATE-----\n";
-
-    ByteArrayInputStream certArray2 = new ByteArrayInputStream(certificate2
-            .getBytes());
-
-    String certificate3 = "-----BEGIN CERTIFICATE-----\n"
-            + "MIIDXDCCAsWgAwIBAgIBSjANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJVUzEY\n"
-            + "MBYGA1UEChMPVS5TLiBHb3Zlcm5tZW50MQwwCgYDVQQLEwNEb0QxDDAKBgNVBAsT\n"
-            + "A1BLSTERMA8GA1UEAxMITWVkIENBLTEwHhcNOTgwODAyMTgwMjQwWhcNMDEwODAy\n"
-            + "MTgwMjQwWjB0MQswCQYDVQQGEwJVUzEYMBYGA1UEChMPVS5TLiBHb3Zlcm5tZW50\n"
-            + "MQwwCgYDVQQLEwNEb0QxDDAKBgNVBAsTA1BLSTENMAsGA1UECxMEVVNBRjEgMB4G\n"
-            + "A1UEAxMXR3VtYnkuSm9zZXBoLjAwMDAwMDUwNDQwgZ8wDQYJKoZIhvcNAQEBBQAD\n"
-            + "gY0AMIGJAoGBALT/R7bPqs1c1YqXAg5HNpZLgW2HuAc7RCaP06cE4R44GBLw/fQc\n"
-            + "VRNLn5pgbTXsDnjiZVd8qEgYqjKFQka4/tNhaF7No2tBZB+oYL/eP0IWtP+h/W6D\n"
-            + "KR5+UvIIdgmx7k3t9jp2Q51JpHhhKEb9WN54trCO9Yu7PYU+LI85jEIBAgMBAAGj\n"
-            + "ggEaMIIBFjAWBgNVHSAEDzANMAsGCWCGSAFlAgELAzAfBgNVHSMEGDAWgBQzOhTo\n"
-            + "CWdhiGUkIOx5cELXppMe9jAdBgNVHQ4EFgQUkLBJl+ayKgzOp/wwBX9M1lSkCg4w\n"
-            + "DgYDVR0PAQH/BAQDAgbAMAwGA1UdEwEB/wQCMAAwgZ0GA1UdHwSBlTCBkjCBj6CB\n"
-            + "jKCBiYaBhmxkYXA6Ly9kcy0xLmNoYW1iLmRpc2EubWlsL2NuJTNkTWVkJTIwQ0El\n"
-            + "MmQxJTJjb3UlM2RQS0klMmNvdSUzZERvRCUyY28lM2RVLlMuJTIwR292ZXJubWVu\n"
-            + "dCUyY2MlM2RVUz9jZXJ0aWZpY2F0ZVJldm9jYXRpb25MaXN0JTNiYmluYXJ5MA0G\n"
-            + "CSqGSIb3DQEBBQUAA4GBAFjapuDHMvIdUeYRyEYdShBR1JZC20tJ3MQnyBQveddz\n"
-            + "LGFDGpIkRAQU7T/5/ne8lMexyxViC21xOlK9LdbJCbVyywvb9uEm/1je9wieQQtr\n"
-            + "kjykuB+WB6qTCIslAO/eUmgzfzIENvnH8O+fH7QTr2PdkFkiPIqBJYHvw7F3XDqy\n"
-            + "-----END CERTIFICATE-----\n";
-
-    ByteArrayInputStream certArray3 = new ByteArrayInputStream(certificate3
-            .getBytes());
-
-
-    public X509KeyManagerImpl(String name) {
-        keyType = name;
-        try {
-            CertificateFactory cf = CertificateFactory.getInstance("X.509");
-            keyTest = KeyStore.getInstance(KeyStore.getDefaultType());
-            keyTest.load(null, null);
-            if (keyType.equals(client)) {
-                cert = new X509Certificate[2];
-                cert[0] = (X509Certificate) cf.generateCertificate(certArray);
-                cert[1] = (X509Certificate) cf.generateCertificate(certArray2);
-                //keyTest = KeyStore.getInstance(KeyStore.getDefaultType());
-                //keyTest.load(null, null);
-                keyTest.setCertificateEntry("clientAlias_01", cert[0]);
-                keyTest.setCertificateEntry("clientAlias_02", cert[0]);
-                keyTest.setCertificateEntry("clientAlias_03", cert[1]);
-            } else if (keyType.equals(server)) {
-                //CertificateFactory cf = CertificateFactory.getInstance("X.509");
-                cert = new X509Certificate[1];
-                cert[0] = (X509Certificate) cf.generateCertificate(certArray3);
-                //keyTest = KeyStore.getInstance(KeyStore.getDefaultType());
-                //keyTest.load(null, null);
-                keyTest.setCertificateEntry("serverAlias_00", cert[0]);
-            }
-        } catch (Exception ex) {
-            throw new IllegalArgumentException(ex.getMessage());
-        }
-    }
-
-    public String[] getClientAliases(String s, Principal[] aprincipal) {
-        if (s == null || s.equals("")) {
-            return null;
-        }
-        try {
-            if (s.equals(client)) {
-                Enumeration<String> aliase = keyTest.aliases();
-                Vector vec = new Vector();
-                int i = 0;
-                while (aliase.hasMoreElements()) {
-                    vec.addElement(aliase.nextElement());
-                    i++;
-                }
-                String[] res = new String[vec.size()];
-                for (i = 0; i < vec.size(); i++) {
-                    res[i] = vec.elementAt(i).toString();
-                }
-                return res;
-            } else return null;
-        } catch (Exception ex) {
-            throw new IllegalArgumentException(ex.getMessage());
-        }
-    }
-
-    public String chooseClientAlias(String[] as, Principal[] aprincipal, Socket socket) {
-        String alias = null;
-        if (as == null || as.length == 0) {
-            return null;
-        }
-        try {
-            if (as.length == 1 && as[0].equals(client)) {
-                if (socket == null) {
-                    alias = keyTest.getCertificateAlias(cert[0]);
-                } else {
-                    alias = keyTest.getCertificateAlias(cert[1]);
-                }
-                return alias;
-            }
-        } catch (Exception ex) {
-            throw new IllegalArgumentException(ex.getMessage());
-        }
-        return null;
-    }
-
-    public String[] getServerAliases(String s, Principal aprincipal[]) {
-        if (s == null || s.equals("")) {
-            return null;
-        }
-        try {
-            if (s.equals(server)) {
-                Enumeration<String> aliase = keyTest.aliases();
-                Vector vec = new Vector();
-                int i = 0;
-                while (aliase.hasMoreElements()) {
-                    vec.addElement(aliase.nextElement());
-                    i++;
-                }
-                String[] res = new String[vec.size()];
-                for (i = 0; i < vec.size(); i++) {
-                    res[i] = vec.elementAt(i).toString();
-                }
-                return res;
-            } else return null;
-        } catch (Exception ex) {
-            throw new IllegalArgumentException(ex.getMessage());
-        }
-    }
-
-    public String chooseServerAlias(String as, Principal[] aprincipal, Socket socket) {
-        String alias = null;
-        if (as == null || as.equals("")) {
-            return null;
-        }
-        try {
-            if (as.equals(server) && socket != null) {
-                return alias = keyTest.getCertificateAlias(cert[0]);
-            } else {
-                return null;
-            }
-        } catch (Exception ex) {
-            throw new IllegalArgumentException(ex.getMessage());
-        }
-    }
-
-    public X509Certificate[] getCertificateChain(String s) {
-        /*try {
-            if (s != null && !s.equals("")) {
-                X509Certificate[] cert = (X509Certificate[]) keyTest.getCertificateChain(s);
-                return cert;
-            } else return null;
-        } catch (Exception ex) {
-            throw new IllegalArgumentException(ex.getMessage());
-        }*/
-        return null;
-    }
-
-    public PrivateKey getPrivateKey(String s) {
-        /*try {
-            if (s != null && !s.equals("")) {
-                Certificate[] cert = keyTest.getCertificateChain(s);
-                PrivateKey pk = (PrivateKey) keyTest.getKey(s, null);
-                return pk;
-            } else return null;
-        } catch (Exception ex) {
-            throw new IllegalArgumentException(ex.getMessage());
-        }*/
-        return null;
-    }
-
-}
diff --git a/support/src/test/java/tests/http/MockResponse.java b/support/src/test/java/tests/http/MockResponse.java
deleted file mode 100644
index d3aaa9d..0000000
--- a/support/src/test/java/tests/http/MockResponse.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Copyright (C) 2010 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package tests.http;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.util.ArrayList;
-import java.util.List;
-import static tests.http.MockWebServer.ASCII;
-
-/**
- * A scripted response to be replayed by the mock web server.
- */
-public class MockResponse implements Cloneable {
-    private static final String RFC_1123_DATE_FORMAT = "EEE, dd MMM yyyy HH:mm:ss zzz";
-    private static final String EMPTY_BODY_HEADER = "Content-Length: 0";
-    private static final String CHUNKED_BODY_HEADER = "Transfer-encoding: chunked";
-    private static final byte[] EMPTY_BODY = new byte[0];
-
-    private String status = "HTTP/1.1 200 OK";
-    private List<String> headers = new ArrayList<String>();
-    private byte[] body = EMPTY_BODY;
-    private SocketPolicy socketPolicy = SocketPolicy.KEEP_OPEN;
-
-    public MockResponse() {
-        headers.add(EMPTY_BODY_HEADER);
-    }
-
-    @Override public MockResponse clone() {
-        try {
-            MockResponse result = (MockResponse) super.clone();
-            result.headers = new ArrayList<String>(result.headers);
-            return result;
-        } catch (CloneNotSupportedException e) {
-            throw new AssertionError();
-        }
-    }
-
-    /**
-     * Returns the HTTP response line, such as "HTTP/1.1 200 OK".
-     */
-    public String getStatus() {
-        return status;
-    }
-
-    public MockResponse setResponseCode(int code) {
-        this.status = "HTTP/1.1 " + code + " OK";
-        return this;
-    }
-
-    public MockResponse setStatus(String status) {
-        this.status = status;
-        return this;
-    }
-
-    /**
-     * Returns the HTTP headers, such as "Content-Length: 0".
-     */
-    public List<String> getHeaders() {
-        return headers;
-    }
-
-    public MockResponse clearHeaders() {
-        headers.clear();
-        return this;
-    }
-
-    public MockResponse addHeader(String header) {
-        headers.add(header);
-        return this;
-    }
-
-    /**
-     * Returns an input stream containing the raw HTTP payload.
-     */
-    public byte[] getBody() {
-        return body;
-    }
-
-    public MockResponse setBody(byte[] body) {
-        if (this.body == EMPTY_BODY) {
-            headers.remove(EMPTY_BODY_HEADER);
-        }
-        this.headers.add("Content-Length: " + body.length);
-        this.body = body;
-        return this;
-    }
-
-    public MockResponse setBody(String body) {
-        try {
-            return setBody(body.getBytes(ASCII));
-        } catch (UnsupportedEncodingException e) {
-            throw new AssertionError();
-        }
-    }
-
-    public MockResponse setChunkedBody(byte[] body, int maxChunkSize) throws IOException {
-        headers.remove(EMPTY_BODY_HEADER);
-        headers.add(CHUNKED_BODY_HEADER);
-
-        ByteArrayOutputStream bytesOut = new ByteArrayOutputStream();
-        int pos = 0;
-        while (pos < body.length) {
-            int chunkSize = Math.min(body.length - pos, maxChunkSize);
-            bytesOut.write(Integer.toHexString(chunkSize).getBytes(ASCII));
-            bytesOut.write("\r\n".getBytes(ASCII));
-            bytesOut.write(body, pos, chunkSize);
-            bytesOut.write("\r\n".getBytes(ASCII));
-            pos += chunkSize;
-        }
-        bytesOut.write("0\r\n\r\n".getBytes(ASCII)); // last chunk + empty trailer + crlf
-        this.body = bytesOut.toByteArray();
-        return this;
-    }
-
-    public MockResponse setChunkedBody(String body, int maxChunkSize) throws IOException {
-        return setChunkedBody(body.getBytes(ASCII), maxChunkSize);
-    }
-
-    public SocketPolicy getSocketPolicy() {
-        return socketPolicy;
-    }
-
-    public MockResponse setSocketPolicy(SocketPolicy socketPolicy) {
-        this.socketPolicy = socketPolicy;
-        return this;
-    }
-
-    @Override public String toString() {
-        return status;
-    }
-}
diff --git a/support/src/test/java/tests/http/MockWebServer.java b/support/src/test/java/tests/http/MockWebServer.java
deleted file mode 100644
index 1b776b2..0000000
--- a/support/src/test/java/tests/http/MockWebServer.java
+++ /dev/null
@@ -1,503 +0,0 @@
-/*
- * Copyright (C) 2010 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package tests.http;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.HttpURLConnection;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.MalformedURLException;
-import java.net.Proxy;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.net.SocketException;
-import java.net.URL;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-import java.util.Set;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.LinkedBlockingDeque;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import javax.net.ssl.SSLSocket;
-import javax.net.ssl.SSLSocketFactory;
-import static tests.http.SocketPolicy.DISCONNECT_AT_START;
-
-/**
- * A scriptable web server. Callers supply canned responses and the server
- * replays them upon request in sequence.
- *
- * @deprecated Use {@code com.google.mockwebserver.MockWebServer} instead.
- */
-@Deprecated
-public final class MockWebServer {
-
-    static final String ASCII = "US-ASCII";
-
-    private static final Logger logger = Logger.getLogger(MockWebServer.class.getName());
-    private final BlockingQueue<RecordedRequest> requestQueue
-            = new LinkedBlockingQueue<RecordedRequest>();
-    private final BlockingQueue<MockResponse> responseQueue
-            = new LinkedBlockingDeque<MockResponse>();
-    private final Set<Socket> openClientSockets
-            = Collections.newSetFromMap(new ConcurrentHashMap<Socket, Boolean>());
-    private boolean singleResponse;
-    private final AtomicInteger requestCount = new AtomicInteger();
-    private int bodyLimit = Integer.MAX_VALUE;
-    private ServerSocket serverSocket;
-    private SSLSocketFactory sslSocketFactory;
-    private ExecutorService executor;
-    private boolean tunnelProxy;
-
-    private int port = -1;
-
-    public int getPort() {
-        if (port == -1) {
-            throw new IllegalStateException("Cannot retrieve port before calling play()");
-        }
-        return port;
-    }
-
-    public String getHostName() {
-        return InetAddress.getLoopbackAddress().getHostName();
-    }
-
-    public Proxy toProxyAddress() {
-        return new Proxy(Proxy.Type.HTTP, new InetSocketAddress(getHostName(), getPort()));
-    }
-
-    /**
-     * Returns a URL for connecting to this server.
-     *
-     * @param path the request path, such as "/".
-     */
-    public URL getUrl(String path) throws MalformedURLException, UnknownHostException {
-        return sslSocketFactory != null
-                ? new URL("https://" + getHostName() + ":" + getPort() + path)
-                : new URL("http://" + getHostName() + ":" + getPort() + path);
-    }
-
-    /**
-     * Sets the number of bytes of the POST body to keep in memory to the given
-     * limit.
-     */
-    public void setBodyLimit(int maxBodyLength) {
-        this.bodyLimit = maxBodyLength;
-    }
-
-    /**
-     * Serve requests with HTTPS rather than otherwise.
-     *
-     * @param tunnelProxy whether to expect the HTTP CONNECT method before
-     *     negotiating TLS.
-     */
-    public void useHttps(SSLSocketFactory sslSocketFactory, boolean tunnelProxy) {
-        this.sslSocketFactory = sslSocketFactory;
-        this.tunnelProxy = tunnelProxy;
-    }
-
-    /**
-     * Awaits the next HTTP request, removes it, and returns it. Callers should
-     * use this to verify the request sent was as intended.
-     */
-    public RecordedRequest takeRequest() throws InterruptedException {
-        return requestQueue.take();
-    }
-
-    /**
-     * Returns the number of HTTP requests received thus far by this server.
-     * This may exceed the number of HTTP connections when connection reuse is
-     * in practice.
-     */
-    public int getRequestCount() {
-        return requestCount.get();
-    }
-
-    public void enqueue(MockResponse response) {
-        responseQueue.add(response.clone());
-    }
-
-    /**
-     * By default, this class processes requests coming in by adding them to a
-     * queue and serves responses by removing them from another queue. This mode
-     * is appropriate for correctness testing.
-     *
-     * <p>Serving a single response causes the server to be stateless: requests
-     * are not enqueued, and responses are not dequeued. This mode is appropriate
-     * for benchmarking.
-     */
-    public void setSingleResponse(boolean singleResponse) {
-        this.singleResponse = singleResponse;
-    }
-
-    /**
-     * Equivalent to {@code play(0)}.
-     */
-    public void play() throws IOException {
-        play(0);
-    }
-
-    /**
-     * Starts the server, serves all enqueued requests, and shuts the server
-     * down.
-     *
-     * @param port the port to listen to, or 0 for any available port.
-     *     Automated tests should always use port 0 to avoid flakiness when a
-     *     specific port is unavailable.
-     */
-    public void play(int port) throws IOException {
-        executor = Executors.newCachedThreadPool();
-        serverSocket = new ServerSocket(port);
-        serverSocket.setReuseAddress(true);
-
-        this.port = serverSocket.getLocalPort();
-        executor.execute(namedRunnable("MockWebServer-accept-" + port, new Runnable() {
-            public void run() {
-                try {
-                    acceptConnections();
-                } catch (Throwable e) {
-                    logger.log(Level.WARNING, "MockWebServer connection failed", e);
-                }
-
-                /*
-                 * This gnarly block of code will release all sockets and
-                 * all thread, even if any close fails.
-                 */
-                try {
-                    serverSocket.close();
-                } catch (Throwable e) {
-                    logger.log(Level.WARNING, "MockWebServer server socket close failed", e);
-                }
-                for (Iterator<Socket> s = openClientSockets.iterator(); s.hasNext();) {
-                    try {
-                        s.next().close();
-                        s.remove();
-                    } catch (Throwable e) {
-                        logger.log(Level.WARNING, "MockWebServer socket close failed", e);
-                    }
-                }
-                try {
-                    executor.shutdown();
-                } catch (Throwable e) {
-                    logger.log(Level.WARNING, "MockWebServer executor shutdown failed", e);
-                }
-            }
-
-            private void acceptConnections() throws Exception {
-                do {
-                    Socket socket;
-                    try {
-                        socket = serverSocket.accept();
-                    } catch (SocketException ignored) {
-                        continue;
-                    }
-                    MockResponse peek = responseQueue.peek();
-                    if (peek != null && peek.getSocketPolicy() == DISCONNECT_AT_START) {
-                        responseQueue.take();
-                        socket.close();
-                    } else {
-                        openClientSockets.add(socket);
-                        serveConnection(socket);
-                    }
-                } while (!responseQueue.isEmpty());
-            }
-        }));
-    }
-
-    public void shutdown() throws IOException {
-        if (serverSocket != null) {
-            serverSocket.close(); // should cause acceptConnections() to break out
-        }
-    }
-
-    private void serveConnection(final Socket raw) {
-        String name = "MockWebServer-" + raw.getRemoteSocketAddress();
-        executor.execute(namedRunnable(name, new Runnable() {
-            int sequenceNumber = 0;
-
-            public void run() {
-                try {
-                    processConnection();
-                } catch (Exception e) {
-                    logger.log(Level.WARNING, "MockWebServer connection failed", e);
-                }
-            }
-
-            public void processConnection() throws Exception {
-                Socket socket;
-                if (sslSocketFactory != null) {
-                    if (tunnelProxy) {
-                        createTunnel();
-                    }
-                    socket = sslSocketFactory.createSocket(
-                            raw, raw.getInetAddress().getHostAddress(), raw.getPort(), true);
-                    ((SSLSocket) socket).setUseClientMode(false);
-                    openClientSockets.add(socket);
-                    openClientSockets.remove(raw);
-                } else {
-                    socket = raw;
-                }
-
-                InputStream in = new BufferedInputStream(socket.getInputStream());
-                OutputStream out = new BufferedOutputStream(socket.getOutputStream());
-
-                while (!responseQueue.isEmpty() && processOneRequest(in, out, socket)) {}
-
-                if (sequenceNumber == 0) {
-                    logger.warning("MockWebServer connection didn't make a request");
-                }
-
-                in.close();
-                out.close();
-                socket.close();
-                if (responseQueue.isEmpty()) {
-                    shutdown();
-                }
-                openClientSockets.remove(socket);
-            }
-
-            /**
-             * Respond to CONNECT requests until a SWITCH_TO_SSL_AT_END response
-             * is dispatched.
-             */
-            private void createTunnel() throws IOException, InterruptedException {
-                while (true) {
-                    MockResponse connect = responseQueue.peek();
-                    if (!processOneRequest(raw.getInputStream(), raw.getOutputStream(), raw)) {
-                        throw new IllegalStateException("Tunnel without any CONNECT!");
-                    }
-                    if (connect.getSocketPolicy() == SocketPolicy.UPGRADE_TO_SSL_AT_END) {
-                        return;
-                    }
-                }
-            }
-
-            /**
-             * Reads a request and writes its response. Returns true if a request
-             * was processed.
-             */
-            private boolean processOneRequest(InputStream in, OutputStream out, Socket socket)
-                    throws IOException, InterruptedException {
-                RecordedRequest request = readRequest(in, sequenceNumber);
-                if (request == null) {
-                    return false;
-                }
-                MockResponse response = dispatch(request);
-                writeResponse(out, response);
-                if (response.getSocketPolicy() == SocketPolicy.DISCONNECT_AT_END) {
-                    in.close();
-                    out.close();
-                } else if (response.getSocketPolicy() == SocketPolicy.SHUTDOWN_INPUT_AT_END) {
-                    socket.shutdownInput();
-                } else if (response.getSocketPolicy() == SocketPolicy.SHUTDOWN_OUTPUT_AT_END) {
-                    socket.shutdownOutput();
-                }
-                sequenceNumber++;
-                return true;
-            }
-        }));
-    }
-
-    /**
-     * @param sequenceNumber the index of this request on this connection.
-     */
-    private RecordedRequest readRequest(InputStream in, int sequenceNumber) throws IOException {
-        String request;
-        try {
-            request = readAsciiUntilCrlf(in);
-        } catch (IOException streamIsClosed) {
-            return null; // no request because we closed the stream
-        }
-        if (request.isEmpty()) {
-            return null; // no request because the stream is exhausted
-        }
-
-        List<String> headers = new ArrayList<String>();
-        int contentLength = -1;
-        boolean chunked = false;
-        String header;
-        while (!(header = readAsciiUntilCrlf(in)).isEmpty()) {
-            headers.add(header);
-            String lowercaseHeader = header.toLowerCase(Locale.ROOT);
-            if (contentLength == -1 && lowercaseHeader.startsWith("content-length:")) {
-                contentLength = Integer.parseInt(header.substring(15).trim());
-            }
-            if (lowercaseHeader.startsWith("transfer-encoding:") &&
-                    lowercaseHeader.substring(18).trim().equals("chunked")) {
-                chunked = true;
-            }
-        }
-
-        boolean hasBody = false;
-        TruncatingOutputStream requestBody = new TruncatingOutputStream();
-        List<Integer> chunkSizes = new ArrayList<Integer>();
-        if (contentLength != -1) {
-            hasBody = true;
-            transfer(contentLength, in, requestBody);
-        } else if (chunked) {
-            hasBody = true;
-            while (true) {
-                int chunkSize = Integer.parseInt(readAsciiUntilCrlf(in).trim(), 16);
-                if (chunkSize == 0) {
-                    readEmptyLine(in);
-                    break;
-                }
-                chunkSizes.add(chunkSize);
-                transfer(chunkSize, in, requestBody);
-                readEmptyLine(in);
-            }
-        }
-
-        if (request.startsWith("OPTIONS ") || request.startsWith("GET ")
-                || request.startsWith("HEAD ") || request.startsWith("DELETE ")
-                || request .startsWith("TRACE ") || request.startsWith("CONNECT ")) {
-            if (hasBody) {
-                throw new IllegalArgumentException("Request must not have a body: " + request);
-            }
-        } else if (request.startsWith("POST ") || request.startsWith("PUT ")) {
-            if (!hasBody) {
-                throw new IllegalArgumentException("Request must have a body: " + request);
-            }
-        } else {
-            throw new UnsupportedOperationException("Unexpected method: " + request);
-        }
-
-        return new RecordedRequest(request, headers, chunkSizes,
-                requestBody.numBytesReceived, requestBody.toByteArray(), sequenceNumber);
-    }
-
-    /**
-     * Returns a response to satisfy {@code request}.
-     */
-    private MockResponse dispatch(RecordedRequest request) throws InterruptedException {
-        if (responseQueue.isEmpty()) {
-            throw new IllegalStateException("Unexpected request: " + request);
-        }
-
-        // to permit interactive/browser testing, ignore requests for favicons
-        if (request.getRequestLine().equals("GET /favicon.ico HTTP/1.1")) {
-            System.out.println("served " + request.getRequestLine());
-            return new MockResponse()
-                        .setResponseCode(HttpURLConnection.HTTP_NOT_FOUND);
-        }
-
-        if (singleResponse) {
-            return responseQueue.peek();
-        } else {
-            requestCount.incrementAndGet();
-            requestQueue.add(request);
-            return responseQueue.take();
-        }
-    }
-
-    private void writeResponse(OutputStream out, MockResponse response) throws IOException {
-        out.write((response.getStatus() + "\r\n").getBytes(ASCII));
-        for (String header : response.getHeaders()) {
-            out.write((header + "\r\n").getBytes(ASCII));
-        }
-        out.write(("\r\n").getBytes(ASCII));
-        out.write(response.getBody());
-        out.flush();
-    }
-
-    /**
-     * Transfer bytes from {@code in} to {@code out} until either {@code length}
-     * bytes have been transferred or {@code in} is exhausted.
-     */
-    private void transfer(int length, InputStream in, OutputStream out) throws IOException {
-        byte[] buffer = new byte[1024];
-        while (length > 0) {
-            int count = in.read(buffer, 0, Math.min(buffer.length, length));
-            if (count == -1) {
-                return;
-            }
-            out.write(buffer, 0, count);
-            length -= count;
-        }
-    }
-
-    /**
-     * Returns the text from {@code in} until the next "\r\n", or null if
-     * {@code in} is exhausted.
-     */
-    private String readAsciiUntilCrlf(InputStream in) throws IOException {
-        StringBuilder builder = new StringBuilder();
-        while (true) {
-            int c = in.read();
-            if (c == '\n' && builder.length() > 0 && builder.charAt(builder.length() - 1) == '\r') {
-                builder.deleteCharAt(builder.length() - 1);
-                return builder.toString();
-            } else if (c == -1) {
-                return builder.toString();
-            } else {
-                builder.append((char) c);
-            }
-        }
-    }
-
-    private void readEmptyLine(InputStream in) throws IOException {
-        String line = readAsciiUntilCrlf(in);
-        if (!line.isEmpty()) {
-            throw new IllegalStateException("Expected empty but was: " + line);
-        }
-    }
-
-    /**
-     * An output stream that drops data after bodyLimit bytes.
-     */
-    private class TruncatingOutputStream extends ByteArrayOutputStream {
-        private int numBytesReceived = 0;
-        @Override public void write(byte[] buffer, int offset, int len) {
-            numBytesReceived += len;
-            super.write(buffer, offset, Math.min(len, bodyLimit - count));
-        }
-        @Override public void write(int oneByte) {
-            numBytesReceived++;
-            if (count < bodyLimit) {
-                super.write(oneByte);
-            }
-        }
-    }
-
-    private static Runnable namedRunnable(final String name, final Runnable runnable) {
-        return new Runnable() {
-            public void run() {
-                String originalName = Thread.currentThread().getName();
-                Thread.currentThread().setName(name);
-                try {
-                    runnable.run();
-                } finally {
-                    Thread.currentThread().setName(originalName);
-                }
-            }
-        };
-    }
-}
diff --git a/support/src/test/java/tests/http/RecordedRequest.java b/support/src/test/java/tests/http/RecordedRequest.java
deleted file mode 100644
index c805006..0000000
--- a/support/src/test/java/tests/http/RecordedRequest.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (C) 2010 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package tests.http;
-
-import java.util.List;
-
-/**
- * An HTTP request that came into the mock web server.
- */
-public final class RecordedRequest {
-    private final String requestLine;
-    private final List<String> headers;
-    private final List<Integer> chunkSizes;
-    private final int bodySize;
-    private final byte[] body;
-    private final int sequenceNumber;
-
-    RecordedRequest(String requestLine, List<String> headers, List<Integer> chunkSizes,
-            int bodySize, byte[] body, int sequenceNumber) {
-        this.requestLine = requestLine;
-        this.headers = headers;
-        this.chunkSizes = chunkSizes;
-        this.bodySize = bodySize;
-        this.body = body;
-        this.sequenceNumber = sequenceNumber;
-    }
-
-    public String getRequestLine() {
-        return requestLine;
-    }
-
-    public List<String> getHeaders() {
-        return headers;
-    }
-
-    /**
-     * Returns the sizes of the chunks of this request's body, or an empty list
-     * if the request's body was empty or unchunked.
-     */
-    public List<Integer> getChunkSizes() {
-        return chunkSizes;
-    }
-
-    /**
-     * Returns the total size of the body of this POST request (before
-     * truncation).
-     */
-    public int getBodySize() {
-        return bodySize;
-    }
-
-    /**
-     * Returns the body of this POST request. This may be truncated.
-     */
-    public byte[] getBody() {
-        return body;
-    }
-
-    /**
-     * Returns the index of this request on its HTTP connection. Since a single
-     * HTTP connection may serve multiple requests, each request is assigned its
-     * own sequence number.
-     */
-    public int getSequenceNumber() {
-        return sequenceNumber;
-    }
-
-    @Override public String toString() {
-        return requestLine;
-    }
-}
diff --git a/support/src/test/java/tests/http/SocketPolicy.java b/support/src/test/java/tests/http/SocketPolicy.java
deleted file mode 100644
index 820b400..0000000
--- a/support/src/test/java/tests/http/SocketPolicy.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (C) 2010 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package tests.http;
-
-/**
- * What should be done with the incoming socket.
- */
-public enum SocketPolicy {
-
-    /**
-     * Keep the socket open after the response. This is the default HTTP/1.1
-     * behavior.
-     */
-    KEEP_OPEN,
-
-    /**
-     * Close the socket after the response. This is the default HTTP/1.0
-     * behavior.
-     */
-    DISCONNECT_AT_END,
-
-    /**
-     * Wrap the socket with SSL at the completion of this request/response
-     * pair. Used for CONNECT messages to tunnel SSL over an HTTP proxy.
-     */
-    UPGRADE_TO_SSL_AT_END,
-
-    /**
-     * Request immediate close of connection without even reading the
-     * request.
-     *
-     * <p>Use to simulate the real life case of losing connection
-     * because of bugger SSL server close connection when it seems
-     * something like a compression method or TLS extension it doesn't
-     * understand, instead of simply ignoring it like it should.
-     */
-    DISCONNECT_AT_START,
-
-    /**
-     * Shutdown the socket input after sending the response. For testing bad
-     * behavior.
-     */
-    SHUTDOWN_INPUT_AT_END,
-
-    /**
-     * Shutdown the socket output after sending the response. For testing bad
-     * behavior.
-     */
-    SHUTDOWN_OUTPUT_AT_END
-}
diff --git a/support/src/test/java/tests/net/DelegatingSSLSocketFactory.java b/support/src/test/java/tests/net/DelegatingSSLSocketFactory.java
deleted file mode 100644
index 5cbde84..0000000
--- a/support/src/test/java/tests/net/DelegatingSSLSocketFactory.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (C) 2014 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package tests.net;
-
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.Socket;
-import java.net.UnknownHostException;
-
-import javax.net.ssl.SSLSocket;
-import javax.net.ssl.SSLSocketFactory;
-
-/**
- * {@link SSLSocketFactory} which delegates all invocations to the provided delegate
- * {@code SSLSocketFactory}.
- */
-public class DelegatingSSLSocketFactory extends SSLSocketFactory {
-
-  private final SSLSocketFactory mDelegate;
-
-  public DelegatingSSLSocketFactory(SSLSocketFactory delegate) {
-    this.mDelegate = delegate;
-  }
-
-  /**
-   * Invoked after obtaining a socket from the delegate and before returning it to the caller.
-   *
-   * <p>The default implementation does nothing.
-   */
-  protected SSLSocket configureSocket(SSLSocket socket) throws IOException {
-    return socket;
-  }
-
-  @Override
-  public String[] getDefaultCipherSuites() {
-    return mDelegate.getDefaultCipherSuites();
-  }
-
-  @Override
-  public String[] getSupportedCipherSuites() {
-    return mDelegate.getSupportedCipherSuites();
-  }
-
-  @Override
-  public Socket createSocket() throws IOException {
-    SSLSocket socket = (SSLSocket) mDelegate.createSocket();
-    return configureSocket(socket);
-  }
-
-  @Override
-  public Socket createSocket(Socket s, String host, int port, boolean autoClose)
-      throws IOException {
-    SSLSocket socket = (SSLSocket) mDelegate.createSocket(s, host, port, autoClose);
-    return configureSocket(socket);
-  }
-
-  @Override
-  public Socket createSocket(String host, int port) throws IOException, UnknownHostException {
-    SSLSocket socket = (SSLSocket) mDelegate.createSocket(host, port);
-    return configureSocket(socket);
-  }
-
-  @Override
-  public Socket createSocket(String host, int port, InetAddress localHost, int localPort)
-      throws IOException, UnknownHostException {
-    SSLSocket socket = (SSLSocket) mDelegate.createSocket(host, port, localHost, localPort);
-    return configureSocket(socket);
-  }
-
-  @Override
-  public Socket createSocket(InetAddress host, int port) throws IOException {
-    SSLSocket socket = (SSLSocket) mDelegate.createSocket(host, port);
-    return configureSocket(socket);
-  }
-
-  @Override
-  public Socket createSocket(InetAddress address, int port, InetAddress localAddress,
-      int localPort) throws IOException {
-    SSLSocket socket = (SSLSocket) mDelegate.createSocket(address, port, localAddress, localPort);
-    return configureSocket(socket);
-  }
-}
diff --git a/support/src/test/java/tests/security/AlgorithmParameterAsymmetricHelper.java b/support/src/test/java/tests/security/AlgorithmParameterAsymmetricHelper.java
deleted file mode 100644
index f92ba24..0000000
--- a/support/src/test/java/tests/security/AlgorithmParameterAsymmetricHelper.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package tests.security;
-
-import java.security.AlgorithmParameters;
-import java.security.InvalidAlgorithmParameterException;
-import java.security.InvalidKeyException;
-import java.security.KeyPair;
-import java.security.KeyPairGenerator;
-import java.security.NoSuchAlgorithmException;
-import java.util.Arrays;
-import javax.crypto.BadPaddingException;
-import javax.crypto.Cipher;
-import javax.crypto.IllegalBlockSizeException;
-import javax.crypto.NoSuchPaddingException;
-import junit.framework.Assert;
-
-public class AlgorithmParameterAsymmetricHelper extends TestHelper<AlgorithmParameters> {
-
-    private static final String plainData = "some data to encrypt and decrypt";
-    private final String algorithmName;
-
-    public AlgorithmParameterAsymmetricHelper(String algorithmName) {
-        this.algorithmName = algorithmName;
-    }
-
-    @Override
-    public void test(AlgorithmParameters parameters) throws Exception {
-        KeyPairGenerator generator = KeyPairGenerator.getInstance(algorithmName);
-        generator.initialize(1024);
-        KeyPair keyPair = generator.generateKeyPair();
-
-        Cipher cipher = Cipher.getInstance(algorithmName);
-        cipher.init(Cipher.ENCRYPT_MODE, keyPair.getPublic(), parameters);
-        byte[] bs = cipher.doFinal(plainData.getBytes());
-
-        cipher.init(Cipher.DECRYPT_MODE, keyPair.getPrivate(), parameters);
-        byte[] decrypted = cipher.doFinal(bs);
-        Assert.assertTrue(Arrays.equals(plainData.getBytes(), decrypted));
-    }
-}
diff --git a/support/src/test/java/tests/security/AlgorithmParameterGeneratorTest.java b/support/src/test/java/tests/security/AlgorithmParameterGeneratorTest.java
deleted file mode 100644
index 1578c0a..0000000
--- a/support/src/test/java/tests/security/AlgorithmParameterGeneratorTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package tests.security;
-
-import java.security.AlgorithmParameterGenerator;
-import java.security.AlgorithmParameters;
-import java.security.NoSuchAlgorithmException;
-import junit.framework.TestCase;
-
-public abstract class AlgorithmParameterGeneratorTest extends TestCase {
-
-    private final String algorithmName;
-    private final TestHelper<AlgorithmParameters> helper;
-
-    protected AlgorithmParameterGeneratorTest(String algorithmName, TestHelper<AlgorithmParameters> helper) {
-        this.algorithmName = algorithmName;
-        this.helper = helper;
-    }
-
-    public void testAlgorithmParameterGenerator() throws Exception {
-        AlgorithmParameterGenerator generator = AlgorithmParameterGenerator.getInstance(algorithmName);
-        generator.init(1024);
-
-        AlgorithmParameters parameters = generator.generateParameters();
-        assertNotNull("generated parameters are null", parameters);
-        helper.test(parameters);
-    }
-}
diff --git a/support/src/test/java/tests/security/AlgorithmParameterKeyAgreementHelper.java b/support/src/test/java/tests/security/AlgorithmParameterKeyAgreementHelper.java
deleted file mode 100644
index 92b9ff1..0000000
--- a/support/src/test/java/tests/security/AlgorithmParameterKeyAgreementHelper.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package tests.security;
-
-import java.security.AlgorithmParameters;
-import java.security.InvalidKeyException;
-import java.security.KeyPair;
-import java.security.KeyPairGenerator;
-import java.security.NoSuchAlgorithmException;
-import javax.crypto.KeyAgreement;
-import junit.framework.Assert;
-
-public class AlgorithmParameterKeyAgreementHelper extends TestHelper<AlgorithmParameters> {
-
-    private final String algorithmName;
-
-    public AlgorithmParameterKeyAgreementHelper(String algorithmName) {
-        this.algorithmName = algorithmName;
-    }
-
-    @Override
-    public void test(AlgorithmParameters parameters) throws Exception {
-        KeyPairGenerator generator = KeyPairGenerator.getInstance(algorithmName);
-        generator.initialize(1024);
-
-        KeyPair keyPair = generator.generateKeyPair();
-        KeyAgreement keyAgreement = KeyAgreement.getInstance(algorithmName);
-        keyAgreement.init(keyPair.getPrivate());
-        keyAgreement.doPhase(keyPair.getPublic(), true);
-        Assert.assertNotNull("generated secret is null", keyAgreement.generateSecret());
-    }
-}
diff --git a/support/src/test/java/tests/security/AlgorithmParameterSignatureHelper.java b/support/src/test/java/tests/security/AlgorithmParameterSignatureHelper.java
deleted file mode 100644
index c4d5e4b..0000000
--- a/support/src/test/java/tests/security/AlgorithmParameterSignatureHelper.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package tests.security;
-
-import java.security.AlgorithmParameters;
-import java.security.InvalidAlgorithmParameterException;
-import java.security.InvalidKeyException;
-import java.security.KeyPair;
-import java.security.KeyPairGenerator;
-import java.security.NoSuchAlgorithmException;
-import java.security.Signature;
-import java.security.SignatureException;
-import java.security.spec.AlgorithmParameterSpec;
-import java.security.spec.InvalidParameterSpecException;
-import junit.framework.Assert;
-
-public class AlgorithmParameterSignatureHelper<T extends AlgorithmParameterSpec>
-        extends TestHelper<AlgorithmParameters> {
-
-    private final String algorithmName;
-    private final String plainData = "some data do sign and verify";
-    private final Class<T> parameterSpecClass;
-
-    public AlgorithmParameterSignatureHelper(String algorithmName, Class<T> parameterSpecCla1ss) {
-        this.algorithmName = algorithmName;
-        this.parameterSpecClass = parameterSpecCla1ss;
-    }
-
-    @Override
-    public void test(AlgorithmParameters parameters) throws Exception {
-        Signature signature = Signature.getInstance(algorithmName);
-        T parameterSpec = parameters.getParameterSpec(parameterSpecClass);
-        KeyPairGenerator generator = KeyPairGenerator.getInstance(algorithmName);
-
-        generator.initialize(parameterSpec);
-        KeyPair keyPair = generator.genKeyPair();
-
-        signature.initSign(keyPair.getPrivate());
-        signature.update(plainData.getBytes());
-        byte[] signed = signature.sign();
-
-        signature.initVerify(keyPair.getPublic());
-        signature.update(plainData.getBytes());
-        Assert.assertTrue("signature should verify", signature.verify(signed));
-    }
-}
diff --git a/support/src/test/java/tests/security/AlgorithmParameterSymmetricHelper.java b/support/src/test/java/tests/security/AlgorithmParameterSymmetricHelper.java
deleted file mode 100644
index 09fabd1..0000000
--- a/support/src/test/java/tests/security/AlgorithmParameterSymmetricHelper.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package tests.security;
-
-import java.security.AlgorithmParameters;
-import java.security.InvalidAlgorithmParameterException;
-import java.security.InvalidKeyException;
-import java.security.Key;
-import java.security.NoSuchAlgorithmException;
-import java.util.Arrays;
-import javax.crypto.BadPaddingException;
-import javax.crypto.Cipher;
-import javax.crypto.IllegalBlockSizeException;
-import javax.crypto.KeyGenerator;
-import javax.crypto.NoSuchPaddingException;
-import junit.framework.Assert;
-
-public class AlgorithmParameterSymmetricHelper extends TestHelper<AlgorithmParameters> {
-
-    private static final String plainData = "some data to encrypt and decrypt";
-    private final String algorithmName;
-    private final int keySize;
-    private String blockmode;
-
-    public AlgorithmParameterSymmetricHelper(String algorithmName, int keySize) {
-        this.algorithmName = algorithmName;
-        this.keySize = keySize;
-    }
-
-    public AlgorithmParameterSymmetricHelper(String algorithmName, String blockmode, int keySize) {
-        this(algorithmName, keySize);
-        this.blockmode = blockmode;
-    }
-
-    @Override
-    public void test(AlgorithmParameters parameters) throws Exception {
-        KeyGenerator generator = KeyGenerator.getInstance(algorithmName);
-        generator.init(keySize);
-
-        Key key = generator.generateKey();
-        String transformation = algorithmName;
-        if (blockmode != null)
-        {
-            transformation += "/" + blockmode;
-        }
-
-        Cipher cipher = Cipher.getInstance(transformation);
-        cipher.init(Cipher.ENCRYPT_MODE, key, parameters);
-        byte[] bs = cipher.doFinal(plainData.getBytes());
-
-        cipher.init(Cipher.DECRYPT_MODE, key, parameters);
-        byte[] decrypted = cipher.doFinal(bs);
-
-        Assert.assertTrue(Arrays.equals(plainData.getBytes(), decrypted));
-    }
-}
diff --git a/support/src/test/java/tests/security/AlgorithmParametersTest.java b/support/src/test/java/tests/security/AlgorithmParametersTest.java
deleted file mode 100644
index fc85642..0000000
--- a/support/src/test/java/tests/security/AlgorithmParametersTest.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package tests.security;
-
-import java.security.AlgorithmParameters;
-import java.security.NoSuchAlgorithmException;
-import java.security.spec.AlgorithmParameterSpec;
-import java.security.spec.InvalidParameterSpecException;
-import junit.framework.TestCase;
-
-public abstract class AlgorithmParametersTest extends TestCase {
-
-    private final String algorithmName;
-    private final TestHelper<AlgorithmParameters> helper;
-    private final AlgorithmParameterSpec parameterData;
-
-    public AlgorithmParametersTest(String algorithmName,
-            TestHelper<AlgorithmParameters> helper, AlgorithmParameterSpec parameterData) {
-        this.algorithmName = algorithmName;
-        this.helper = helper;
-        this.parameterData = parameterData;
-    }
-
-    public void testAlgorithmParameters() throws Exception {
-        AlgorithmParameters algorithmParameters = AlgorithmParameters.getInstance(algorithmName);
-        algorithmParameters.init(parameterData);
-        helper.test(algorithmParameters);
-    }
-}
diff --git a/support/src/test/java/tests/security/CipherAsymmetricCryptHelper.java b/support/src/test/java/tests/security/CipherAsymmetricCryptHelper.java
deleted file mode 100644
index 5742d1c..0000000
--- a/support/src/test/java/tests/security/CipherAsymmetricCryptHelper.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package tests.security;
-
-import java.security.KeyPair;
-import javax.crypto.Cipher;
-
-public class CipherAsymmetricCryptHelper extends CipherHelper<KeyPair> {
-
-    private static final String plainData = "some data to encrypt and decrypt test";
-
-    public CipherAsymmetricCryptHelper(String algorithmName) {
-        super(algorithmName, plainData, Cipher.ENCRYPT_MODE,
-                Cipher.DECRYPT_MODE);
-    }
-
-    public void test(KeyPair keyPair) throws Exception {
-        test(keyPair.getPrivate(), keyPair.getPublic());
-    }
-}
diff --git a/support/src/test/java/tests/security/CipherHelper.java b/support/src/test/java/tests/security/CipherHelper.java
deleted file mode 100644
index e1d64bf..0000000
--- a/support/src/test/java/tests/security/CipherHelper.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package tests.security;
-
-import java.security.InvalidKeyException;
-import java.security.Key;
-import java.security.NoSuchAlgorithmException;
-import javax.crypto.BadPaddingException;
-import javax.crypto.Cipher;
-import javax.crypto.IllegalBlockSizeException;
-import javax.crypto.NoSuchPaddingException;
-import junit.framework.Assert;
-
-public abstract class CipherHelper<T> extends TestHelper<T> {
-
-    private final String algorithmName;
-    private final String plainData;
-    private final int mode1;
-    private final int mode2;
-
-    public CipherHelper(String algorithmName, String plainData, int mode1, int mode2) {
-        this.algorithmName = algorithmName;
-        this.plainData = plainData;
-        this.mode1 = mode1;
-        this.mode2 = mode2;
-    }
-
-    public void test(Key encryptKey, Key decryptKey) throws Exception {
-        Cipher cipher = Cipher.getInstance(algorithmName);
-        cipher.init(mode1, encryptKey);
-        byte[] encrypted = cipher.doFinal(plainData.getBytes());
-
-        cipher.init(mode2, decryptKey);
-        byte[] decrypted = cipher.doFinal(encrypted);
-        String decryptedString = new String(decrypted);
-
-        Assert.assertEquals("transformed data does not match", plainData, decryptedString);
-    }
-}
diff --git a/support/src/test/java/tests/security/CipherSymmetricCryptHelper.java b/support/src/test/java/tests/security/CipherSymmetricCryptHelper.java
deleted file mode 100644
index 42d644c..0000000
--- a/support/src/test/java/tests/security/CipherSymmetricCryptHelper.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package tests.security;
-
-import javax.crypto.Cipher;
-import javax.crypto.SecretKey;
-
-public class CipherSymmetricCryptHelper extends CipherHelper<SecretKey/*, U*/> {
-
-    private static final String plainData = "some data to encrypt and decrypt test";
-
-    public CipherSymmetricCryptHelper(String algorithmName) {
-        super(algorithmName, plainData, Cipher.ENCRYPT_MODE,
-                Cipher.DECRYPT_MODE);
-    }
-
-    public void test(SecretKey key) throws Exception {
-        test(key, key);
-    }
-}
diff --git a/support/src/test/java/tests/security/DefaultKeys.java b/support/src/test/java/tests/security/DefaultKeys.java
deleted file mode 100644
index e83efc6..0000000
--- a/support/src/test/java/tests/security/DefaultKeys.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package tests.security;
-
-import java.security.KeyFactory;
-import java.security.NoSuchAlgorithmException;
-import java.security.PrivateKey;
-import java.security.PublicKey;
-import java.security.spec.InvalidKeySpecException;
-import java.security.spec.KeySpec;
-import java.security.spec.PKCS8EncodedKeySpec;
-import java.security.spec.X509EncodedKeySpec;
-import java.util.HashMap;
-
-public class DefaultKeys {
-    private static final byte[] RSA_private = new byte[] {
-        (byte) 0x30, (byte) 0x82, (byte) 0x02, (byte) 0x75, (byte) 0x02, (byte) 0x01, (byte) 0x00, (byte) 0x30, (byte) 0x0D, (byte) 0x06, (byte) 0x09, (byte) 0x2A, (byte) 0x86, (byte) 0x48, (byte) 0x86, (byte) 0xF7, (byte) 0x0D,
-        (byte) 0x01, (byte) 0x01, (byte) 0x01, (byte) 0x05, (byte) 0x00, (byte) 0x04, (byte) 0x82, (byte) 0x02, (byte) 0x5F, (byte) 0x30, (byte) 0x82, (byte) 0x02, (byte) 0x5B, (byte) 0x02, (byte) 0x01, (byte) 0x00, (byte) 0x02,
-        (byte) 0x81, (byte) 0x81, (byte) 0x00, (byte) 0x99, (byte) 0xA5, (byte) 0x96, (byte) 0x72, (byte) 0xAE, (byte) 0xBB, (byte) 0x59, (byte) 0x36, (byte) 0xA8, (byte) 0x12, (byte) 0x17, (byte) 0x05, (byte) 0x4C, (byte) 0x63,
-        (byte) 0x9E, (byte) 0xB8, (byte) 0x85, (byte) 0xD4, (byte) 0x2D, (byte) 0x71, (byte) 0xD7, (byte) 0x29, (byte) 0xB9, (byte) 0x05, (byte) 0x0F, (byte) 0xB4, (byte) 0x57, (byte) 0xFB, (byte) 0xD3, (byte) 0x95, (byte) 0x5C,
-        (byte) 0x21, (byte) 0xEC, (byte) 0xB5, (byte) 0xEB, (byte) 0x67, (byte) 0xA2, (byte) 0x4F, (byte) 0xC1, (byte) 0x93, (byte) 0xEF, (byte) 0x96, (byte) 0x41, (byte) 0x05, (byte) 0x3D, (byte) 0xC5, (byte) 0x3E, (byte) 0x04,
-        (byte) 0x4D, (byte) 0xC6, (byte) 0xCF, (byte) 0x32, (byte) 0x7C, (byte) 0x1F, (byte) 0x66, (byte) 0xA3, (byte) 0xC5, (byte) 0x27, (byte) 0x79, (byte) 0xEC, (byte) 0x2E, (byte) 0x67, (byte) 0xFA, (byte) 0x19, (byte) 0x5B,
-        (byte) 0xE3, (byte) 0xB1, (byte) 0x69, (byte) 0xDA, (byte) 0x63, (byte) 0xBC, (byte) 0xDA, (byte) 0xD3, (byte) 0xBB, (byte) 0xAD, (byte) 0x8C, (byte) 0x38, (byte) 0x7B, (byte) 0x4A, (byte) 0x9C, (byte) 0xD4, (byte) 0x4D,
-        (byte) 0xD2, (byte) 0x33, (byte) 0xB7, (byte) 0x4E, (byte) 0x04, (byte) 0xB6, (byte) 0xDF, (byte) 0x62, (byte) 0x55, (byte) 0x48, (byte) 0x5C, (byte) 0x94, (byte) 0x02, (byte) 0xF7, (byte) 0x84, (byte) 0xE6, (byte) 0x9B,
-        (byte) 0x57, (byte) 0xFF, (byte) 0x17, (byte) 0x2A, (byte) 0xA1, (byte) 0x74, (byte) 0x8D, (byte) 0x07, (byte) 0xD8, (byte) 0xCE, (byte) 0xF7, (byte) 0x0B, (byte) 0x59, (byte) 0xFB, (byte) 0x13, (byte) 0x6E, (byte) 0xF1,
-        (byte) 0xC3, (byte) 0xAB, (byte) 0x3E, (byte) 0x72, (byte) 0x1B, (byte) 0x62, (byte) 0x09, (byte) 0xE8, (byte) 0xD8, (byte) 0x41, (byte) 0x69, (byte) 0xE1, (byte) 0x02, (byte) 0x03, (byte) 0x01, (byte) 0x00, (byte) 0x01,
-        (byte) 0x02, (byte) 0x81, (byte) 0x80, (byte) 0x57, (byte) 0xD6, (byte) 0x1C, (byte) 0x2E, (byte) 0x2F, (byte) 0xCA, (byte) 0x16, (byte) 0xF4, (byte) 0x72, (byte) 0x1C, (byte) 0xF5, (byte) 0x60, (byte) 0x28, (byte) 0x0D,
-        (byte) 0x83, (byte) 0x7D, (byte) 0x85, (byte) 0xB4, (byte) 0x88, (byte) 0xCE, (byte) 0x5D, (byte) 0xED, (byte) 0x12, (byte) 0x42, (byte) 0xDC, (byte) 0x79, (byte) 0x83, (byte) 0x1B, (byte) 0x0A, (byte) 0x18, (byte) 0x86,
-        (byte) 0xF5, (byte) 0x35, (byte) 0xF7, (byte) 0xC2, (byte) 0x3E, (byte) 0x1A, (byte) 0xC2, (byte) 0x71, (byte) 0xAD, (byte) 0xFA, (byte) 0xF7, (byte) 0xF0, (byte) 0xEF, (byte) 0xE8, (byte) 0x22, (byte) 0x4C, (byte) 0x93,
-        (byte) 0xF5, (byte) 0x4A, (byte) 0xC4, (byte) 0xC4, (byte) 0xDD, (byte) 0xC4, (byte) 0xAD, (byte) 0xCE, (byte) 0xCE, (byte) 0x35, (byte) 0x05, (byte) 0x34, (byte) 0x8A, (byte) 0x4B, (byte) 0x12, (byte) 0xE4, (byte) 0x69,
-        (byte) 0xE6, (byte) 0xDA, (byte) 0x07, (byte) 0x1A, (byte) 0x77, (byte) 0x5C, (byte) 0xA7, (byte) 0x21, (byte) 0x41, (byte) 0x89, (byte) 0x8C, (byte) 0x95, (byte) 0x6A, (byte) 0x5D, (byte) 0x9C, (byte) 0x3C, (byte) 0xAE,
-        (byte) 0xC3, (byte) 0xE4, (byte) 0x64, (byte) 0x54, (byte) 0xDA, (byte) 0xFB, (byte) 0xBA, (byte) 0xA6, (byte) 0xE5, (byte) 0x8A, (byte) 0x7F, (byte) 0xFA, (byte) 0x1A, (byte) 0x3F, (byte) 0x9B, (byte) 0xAB, (byte) 0xDA,
-        (byte) 0x3D, (byte) 0x3B, (byte) 0x43, (byte) 0xF0, (byte) 0x0C, (byte) 0x06, (byte) 0x57, (byte) 0x43, (byte) 0x45, (byte) 0xEE, (byte) 0x8C, (byte) 0x27, (byte) 0x05, (byte) 0xAF, (byte) 0xCD, (byte) 0x5A, (byte) 0x47,
-        (byte) 0xB9, (byte) 0xEA, (byte) 0xD9, (byte) 0xAA, (byte) 0x66, (byte) 0xDB, (byte) 0xE3, (byte) 0xDC, (byte) 0x54, (byte) 0x47, (byte) 0x60, (byte) 0x01, (byte) 0x02, (byte) 0x41, (byte) 0x00, (byte) 0xED, (byte) 0xE9,
-        (byte) 0xBD, (byte) 0xD5, (byte) 0x02, (byte) 0x6D, (byte) 0x44, (byte) 0x0E, (byte) 0x3F, (byte) 0x74, (byte) 0x0C, (byte) 0x45, (byte) 0x54, (byte) 0x88, (byte) 0xFE, (byte) 0x5C, (byte) 0xFC, (byte) 0xF2, (byte) 0x31,
-        (byte) 0x7B, (byte) 0xAF, (byte) 0x15, (byte) 0x77, (byte) 0x7A, (byte) 0xDC, (byte) 0xC6, (byte) 0x9E, (byte) 0x7E, (byte) 0xC1, (byte) 0xCA, (byte) 0x84, (byte) 0xC7, (byte) 0x4B, (byte) 0xC4, (byte) 0x41, (byte) 0xE1,
-        (byte) 0x85, (byte) 0xE4, (byte) 0x5A, (byte) 0xA7, (byte) 0x3D, (byte) 0x54, (byte) 0x87, (byte) 0x0D, (byte) 0x7A, (byte) 0xC5, (byte) 0x47, (byte) 0x5C, (byte) 0xF2, (byte) 0xAD, (byte) 0x14, (byte) 0x4D, (byte) 0x63,
-        (byte) 0xB0, (byte) 0xDC, (byte) 0x34, (byte) 0xB5, (byte) 0xDA, (byte) 0x17, (byte) 0x0D, (byte) 0x4E, (byte) 0x2B, (byte) 0x9E, (byte) 0x81, (byte) 0x02, (byte) 0x41, (byte) 0x00, (byte) 0xA5, (byte) 0x53, (byte) 0xDB,
-        (byte) 0xD8, (byte) 0x28, (byte) 0x57, (byte) 0x65, (byte) 0x2B, (byte) 0xFA, (byte) 0xF2, (byte) 0x21, (byte) 0xB8, (byte) 0x60, (byte) 0xAE, (byte) 0x43, (byte) 0x4B, (byte) 0x51, (byte) 0x85, (byte) 0xCB, (byte) 0xDA,
-        (byte) 0x89, (byte) 0x5A, (byte) 0x7D, (byte) 0x05, (byte) 0xDA, (byte) 0xFC, (byte) 0xAF, (byte) 0x46, (byte) 0x86, (byte) 0xBC, (byte) 0x3F, (byte) 0xD1, (byte) 0xEA, (byte) 0xA4, (byte) 0x56, (byte) 0xA3, (byte) 0xE6,
-        (byte) 0xD4, (byte) 0xA2, (byte) 0x08, (byte) 0x93, (byte) 0x63, (byte) 0x21, (byte) 0x0E, (byte) 0xC5, (byte) 0x3C, (byte) 0x97, (byte) 0x7E, (byte) 0x71, (byte) 0x0B, (byte) 0x79, (byte) 0xF8, (byte) 0x60, (byte) 0x73,
-        (byte) 0xD1, (byte) 0xF9, (byte) 0xD4, (byte) 0x66, (byte) 0x29, (byte) 0x7D, (byte) 0xDC, (byte) 0x22, (byte) 0xDB, (byte) 0x61, (byte) 0x02, (byte) 0x40, (byte) 0x5D, (byte) 0x3D, (byte) 0xEF, (byte) 0x85, (byte) 0x4D,
-        (byte) 0x27, (byte) 0x2F, (byte) 0xB5, (byte) 0xF9, (byte) 0xCE, (byte) 0x6C, (byte) 0x84, (byte) 0xBB, (byte) 0x85, (byte) 0xD9, (byte) 0x52, (byte) 0xEE, (byte) 0x5B, (byte) 0xA9, (byte) 0x63, (byte) 0x15, (byte) 0x12,
-        (byte) 0x6F, (byte) 0xBA, (byte) 0x3A, (byte) 0x4E, (byte) 0xA9, (byte) 0x8D, (byte) 0x7A, (byte) 0x3B, (byte) 0xF9, (byte) 0xDF, (byte) 0xF5, (byte) 0xE4, (byte) 0xDC, (byte) 0x01, (byte) 0x1C, (byte) 0x2D, (byte) 0x8C,
-        (byte) 0x0D, (byte) 0xE1, (byte) 0x6E, (byte) 0x80, (byte) 0x63, (byte) 0x9B, (byte) 0x0B, (byte) 0x38, (byte) 0x55, (byte) 0xC8, (byte) 0x52, (byte) 0x67, (byte) 0x13, (byte) 0x91, (byte) 0x8F, (byte) 0x9E, (byte) 0x2E,
-        (byte) 0x16, (byte) 0x5B, (byte) 0x7C, (byte) 0x0F, (byte) 0x5D, (byte) 0xE4, (byte) 0xA0, (byte) 0x81, (byte) 0x02, (byte) 0x40, (byte) 0x20, (byte) 0x12, (byte) 0x11, (byte) 0x5E, (byte) 0x70, (byte) 0x0C, (byte) 0xEC,
-        (byte) 0x02, (byte) 0x49, (byte) 0x0E, (byte) 0xB9, (byte) 0x3D, (byte) 0xD3, (byte) 0xFB, (byte) 0x59, (byte) 0xF0, (byte) 0x7D, (byte) 0x62, (byte) 0xEF, (byte) 0xF5, (byte) 0x77, (byte) 0x99, (byte) 0x87, (byte) 0x11,
-        (byte) 0x20, (byte) 0xB6, (byte) 0xCD, (byte) 0xA5, (byte) 0x67, (byte) 0xB3, (byte) 0x92, (byte) 0xC9, (byte) 0xBC, (byte) 0xB3, (byte) 0x9E, (byte) 0x5E, (byte) 0xF3, (byte) 0x03, (byte) 0x22, (byte) 0x5F, (byte) 0x79,
-        (byte) 0x7F, (byte) 0xCC, (byte) 0x44, (byte) 0xDA, (byte) 0x3B, (byte) 0xF3, (byte) 0xC3, (byte) 0x42, (byte) 0x58, (byte) 0x90, (byte) 0x93, (byte) 0x7E, (byte) 0xDA, (byte) 0x58, (byte) 0xCC, (byte) 0x16, (byte) 0xC8,
-        (byte) 0xAE, (byte) 0x99, (byte) 0xCC, (byte) 0x9F, (byte) 0x32, (byte) 0x61, (byte) 0x02, (byte) 0x40, (byte) 0x02, (byte) 0x29, (byte) 0xDB, (byte) 0x00, (byte) 0x0F, (byte) 0x0A, (byte) 0x17, (byte) 0x33, (byte) 0x7E,
-        (byte) 0xC5, (byte) 0xEC, (byte) 0x21, (byte) 0x47, (byte) 0x65, (byte) 0xDC, (byte) 0xE5, (byte) 0xC2, (byte) 0x0D, (byte) 0x42, (byte) 0x28, (byte) 0xE1, (byte) 0x17, (byte) 0x1A, (byte) 0x00, (byte) 0xBD, (byte) 0xBE,
-        (byte) 0x1C, (byte) 0x7D, (byte) 0xCA, (byte) 0x93, (byte) 0x67, (byte) 0x8F, (byte) 0x28, (byte) 0xB7, (byte) 0x60, (byte) 0x8E, (byte) 0xF0, (byte) 0x5D, (byte) 0xCD, (byte) 0xFA, (byte) 0xDD, (byte) 0x6B, (byte) 0x72,
-        (byte) 0xF7, (byte) 0x48, (byte) 0xD9, (byte) 0x3C, (byte) 0x40, (byte) 0x7C, (byte) 0xB0, (byte) 0xD7, (byte) 0x58, (byte) 0xC2, (byte) 0x53, (byte) 0xAD, (byte) 0x04, (byte) 0xF6, (byte) 0x0B, (byte) 0x35, (byte) 0x51,
-        (byte) 0x45, (byte) 0xB9, (byte) 0x4F, (byte) 0x49  };
-        private static final byte[] RSA_public = new byte[] {
-        (byte) 0x30, (byte) 0x81, (byte) 0x9F, (byte) 0x30, (byte) 0x0D, (byte) 0x06, (byte) 0x09, (byte) 0x2A, (byte) 0x86, (byte) 0x48, (byte) 0x86, (byte) 0xF7, (byte) 0x0D, (byte) 0x01, (byte) 0x01, (byte) 0x01, (byte) 0x05,
-        (byte) 0x00, (byte) 0x03, (byte) 0x81, (byte) 0x8D, (byte) 0x00, (byte) 0x30, (byte) 0x81, (byte) 0x89, (byte) 0x02, (byte) 0x81, (byte) 0x81, (byte) 0x00, (byte) 0x99, (byte) 0xA5, (byte) 0x96, (byte) 0x72, (byte) 0xAE,
-        (byte) 0xBB, (byte) 0x59, (byte) 0x36, (byte) 0xA8, (byte) 0x12, (byte) 0x17, (byte) 0x05, (byte) 0x4C, (byte) 0x63, (byte) 0x9E, (byte) 0xB8, (byte) 0x85, (byte) 0xD4, (byte) 0x2D, (byte) 0x71, (byte) 0xD7, (byte) 0x29,
-        (byte) 0xB9, (byte) 0x05, (byte) 0x0F, (byte) 0xB4, (byte) 0x57, (byte) 0xFB, (byte) 0xD3, (byte) 0x95, (byte) 0x5C, (byte) 0x21, (byte) 0xEC, (byte) 0xB5, (byte) 0xEB, (byte) 0x67, (byte) 0xA2, (byte) 0x4F, (byte) 0xC1,
-        (byte) 0x93, (byte) 0xEF, (byte) 0x96, (byte) 0x41, (byte) 0x05, (byte) 0x3D, (byte) 0xC5, (byte) 0x3E, (byte) 0x04, (byte) 0x4D, (byte) 0xC6, (byte) 0xCF, (byte) 0x32, (byte) 0x7C, (byte) 0x1F, (byte) 0x66, (byte) 0xA3,
-        (byte) 0xC5, (byte) 0x27, (byte) 0x79, (byte) 0xEC, (byte) 0x2E, (byte) 0x67, (byte) 0xFA, (byte) 0x19, (byte) 0x5B, (byte) 0xE3, (byte) 0xB1, (byte) 0x69, (byte) 0xDA, (byte) 0x63, (byte) 0xBC, (byte) 0xDA, (byte) 0xD3,
-        (byte) 0xBB, (byte) 0xAD, (byte) 0x8C, (byte) 0x38, (byte) 0x7B, (byte) 0x4A, (byte) 0x9C, (byte) 0xD4, (byte) 0x4D, (byte) 0xD2, (byte) 0x33, (byte) 0xB7, (byte) 0x4E, (byte) 0x04, (byte) 0xB6, (byte) 0xDF, (byte) 0x62,
-        (byte) 0x55, (byte) 0x48, (byte) 0x5C, (byte) 0x94, (byte) 0x02, (byte) 0xF7, (byte) 0x84, (byte) 0xE6, (byte) 0x9B, (byte) 0x57, (byte) 0xFF, (byte) 0x17, (byte) 0x2A, (byte) 0xA1, (byte) 0x74, (byte) 0x8D, (byte) 0x07,
-        (byte) 0xD8, (byte) 0xCE, (byte) 0xF7, (byte) 0x0B, (byte) 0x59, (byte) 0xFB, (byte) 0x13, (byte) 0x6E, (byte) 0xF1, (byte) 0xC3, (byte) 0xAB, (byte) 0x3E, (byte) 0x72, (byte) 0x1B, (byte) 0x62, (byte) 0x09, (byte) 0xE8,
-        (byte) 0xD8, (byte) 0x41, (byte) 0x69, (byte) 0xE1, (byte) 0x02, (byte) 0x03, (byte) 0x01, (byte) 0x00, (byte) 0x01     };
-        private static final byte[] DSA_private = new byte[] {
-        (byte) 0x30, (byte) 0x82, (byte) 0x01, (byte) 0x4B, (byte) 0x02, (byte) 0x01, (byte) 0x00, (byte) 0x30, (byte) 0x82, (byte) 0x01, (byte) 0x2C, (byte) 0x06, (byte) 0x07, (byte) 0x2A, (byte) 0x86, (byte) 0x48, (byte) 0xCE,
-        (byte) 0x38, (byte) 0x04, (byte) 0x01, (byte) 0x30, (byte) 0x82, (byte) 0x01, (byte) 0x1F, (byte) 0x02, (byte) 0x81, (byte) 0x81, (byte) 0x00, (byte) 0xFD, (byte) 0x7F, (byte) 0x53, (byte) 0x81, (byte) 0x1D, (byte) 0x75,
-        (byte) 0x12, (byte) 0x29, (byte) 0x52, (byte) 0xDF, (byte) 0x4A, (byte) 0x9C, (byte) 0x2E, (byte) 0xEC, (byte) 0xE4, (byte) 0xE7, (byte) 0xF6, (byte) 0x11, (byte) 0xB7, (byte) 0x52, (byte) 0x3C, (byte) 0xEF, (byte) 0x44,
-        (byte) 0x00, (byte) 0xC3, (byte) 0x1E, (byte) 0x3F, (byte) 0x80, (byte) 0xB6, (byte) 0x51, (byte) 0x26, (byte) 0x69, (byte) 0x45, (byte) 0x5D, (byte) 0x40, (byte) 0x22, (byte) 0x51, (byte) 0xFB, (byte) 0x59, (byte) 0x3D,
-        (byte) 0x8D, (byte) 0x58, (byte) 0xFA, (byte) 0xBF, (byte) 0xC5, (byte) 0xF5, (byte) 0xBA, (byte) 0x30, (byte) 0xF6, (byte) 0xCB, (byte) 0x9B, (byte) 0x55, (byte) 0x6C, (byte) 0xD7, (byte) 0x81, (byte) 0x3B, (byte) 0x80,
-        (byte) 0x1D, (byte) 0x34, (byte) 0x6F, (byte) 0xF2, (byte) 0x66, (byte) 0x60, (byte) 0xB7, (byte) 0x6B, (byte) 0x99, (byte) 0x50, (byte) 0xA5, (byte) 0xA4, (byte) 0x9F, (byte) 0x9F, (byte) 0xE8, (byte) 0x04, (byte) 0x7B,
-        (byte) 0x10, (byte) 0x22, (byte) 0xC2, (byte) 0x4F, (byte) 0xBB, (byte) 0xA9, (byte) 0xD7, (byte) 0xFE, (byte) 0xB7, (byte) 0xC6, (byte) 0x1B, (byte) 0xF8, (byte) 0x3B, (byte) 0x57, (byte) 0xE7, (byte) 0xC6, (byte) 0xA8,
-        (byte) 0xA6, (byte) 0x15, (byte) 0x0F, (byte) 0x04, (byte) 0xFB, (byte) 0x83, (byte) 0xF6, (byte) 0xD3, (byte) 0xC5, (byte) 0x1E, (byte) 0xC3, (byte) 0x02, (byte) 0x35, (byte) 0x54, (byte) 0x13, (byte) 0x5A, (byte) 0x16,
-        (byte) 0x91, (byte) 0x32, (byte) 0xF6, (byte) 0x75, (byte) 0xF3, (byte) 0xAE, (byte) 0x2B, (byte) 0x61, (byte) 0xD7, (byte) 0x2A, (byte) 0xEF, (byte) 0xF2, (byte) 0x22, (byte) 0x03, (byte) 0x19, (byte) 0x9D, (byte) 0xD1,
-        (byte) 0x48, (byte) 0x01, (byte) 0xC7, (byte) 0x02, (byte) 0x15, (byte) 0x00, (byte) 0x97, (byte) 0x60, (byte) 0x50, (byte) 0x8F, (byte) 0x15, (byte) 0x23, (byte) 0x0B, (byte) 0xCC, (byte) 0xB2, (byte) 0x92, (byte) 0xB9,
-        (byte) 0x82, (byte) 0xA2, (byte) 0xEB, (byte) 0x84, (byte) 0x0B, (byte) 0xF0, (byte) 0x58, (byte) 0x1C, (byte) 0xF5, (byte) 0x02, (byte) 0x81, (byte) 0x81, (byte) 0x00, (byte) 0xF7, (byte) 0xE1, (byte) 0xA0, (byte) 0x85,
-        (byte) 0xD6, (byte) 0x9B, (byte) 0x3D, (byte) 0xDE, (byte) 0xCB, (byte) 0xBC, (byte) 0xAB, (byte) 0x5C, (byte) 0x36, (byte) 0xB8, (byte) 0x57, (byte) 0xB9, (byte) 0x79, (byte) 0x94, (byte) 0xAF, (byte) 0xBB, (byte) 0xFA,
-        (byte) 0x3A, (byte) 0xEA, (byte) 0x82, (byte) 0xF9, (byte) 0x57, (byte) 0x4C, (byte) 0x0B, (byte) 0x3D, (byte) 0x07, (byte) 0x82, (byte) 0x67, (byte) 0x51, (byte) 0x59, (byte) 0x57, (byte) 0x8E, (byte) 0xBA, (byte) 0xD4,
-        (byte) 0x59, (byte) 0x4F, (byte) 0xE6, (byte) 0x71, (byte) 0x07, (byte) 0x10, (byte) 0x81, (byte) 0x80, (byte) 0xB4, (byte) 0x49, (byte) 0x16, (byte) 0x71, (byte) 0x23, (byte) 0xE8, (byte) 0x4C, (byte) 0x28, (byte) 0x16,
-        (byte) 0x13, (byte) 0xB7, (byte) 0xCF, (byte) 0x09, (byte) 0x32, (byte) 0x8C, (byte) 0xC8, (byte) 0xA6, (byte) 0xE1, (byte) 0x3C, (byte) 0x16, (byte) 0x7A, (byte) 0x8B, (byte) 0x54, (byte) 0x7C, (byte) 0x8D, (byte) 0x28,
-        (byte) 0xE0, (byte) 0xA3, (byte) 0xAE, (byte) 0x1E, (byte) 0x2B, (byte) 0xB3, (byte) 0xA6, (byte) 0x75, (byte) 0x91, (byte) 0x6E, (byte) 0xA3, (byte) 0x7F, (byte) 0x0B, (byte) 0xFA, (byte) 0x21, (byte) 0x35, (byte) 0x62,
-        (byte) 0xF1, (byte) 0xFB, (byte) 0x62, (byte) 0x7A, (byte) 0x01, (byte) 0x24, (byte) 0x3B, (byte) 0xCC, (byte) 0xA4, (byte) 0xF1, (byte) 0xBE, (byte) 0xA8, (byte) 0x51, (byte) 0x90, (byte) 0x89, (byte) 0xA8, (byte) 0x83,
-        (byte) 0xDF, (byte) 0xE1, (byte) 0x5A, (byte) 0xE5, (byte) 0x9F, (byte) 0x06, (byte) 0x92, (byte) 0x8B, (byte) 0x66, (byte) 0x5E, (byte) 0x80, (byte) 0x7B, (byte) 0x55, (byte) 0x25, (byte) 0x64, (byte) 0x01, (byte) 0x4C,
-        (byte) 0x3B, (byte) 0xFE, (byte) 0xCF, (byte) 0x49, (byte) 0x2A, (byte) 0x04, (byte) 0x16, (byte) 0x02, (byte) 0x14, (byte) 0x0E, (byte) 0x90, (byte) 0xB7, (byte) 0x92, (byte) 0x01, (byte) 0x98, (byte) 0xCD, (byte) 0x85,
-        (byte) 0x87, (byte) 0x77, (byte) 0x2F, (byte) 0xB4, (byte) 0x31, (byte) 0xFD, (byte) 0xDE, (byte) 0xFA, (byte) 0x08, (byte) 0x6D, (byte) 0x0C, (byte) 0xE3  };
-        private static final byte[] DSA_public = new byte[] {
-        (byte) 0x30, (byte) 0x82, (byte) 0x01, (byte) 0xB8, (byte) 0x30, (byte) 0x82, (byte) 0x01, (byte) 0x2C, (byte) 0x06, (byte) 0x07, (byte) 0x2A, (byte) 0x86, (byte) 0x48, (byte) 0xCE, (byte) 0x38, (byte) 0x04, (byte) 0x01,
-        (byte) 0x30, (byte) 0x82, (byte) 0x01, (byte) 0x1F, (byte) 0x02, (byte) 0x81, (byte) 0x81, (byte) 0x00, (byte) 0xFD, (byte) 0x7F, (byte) 0x53, (byte) 0x81, (byte) 0x1D, (byte) 0x75, (byte) 0x12, (byte) 0x29, (byte) 0x52,
-        (byte) 0xDF, (byte) 0x4A, (byte) 0x9C, (byte) 0x2E, (byte) 0xEC, (byte) 0xE4, (byte) 0xE7, (byte) 0xF6, (byte) 0x11, (byte) 0xB7, (byte) 0x52, (byte) 0x3C, (byte) 0xEF, (byte) 0x44, (byte) 0x00, (byte) 0xC3, (byte) 0x1E,
-        (byte) 0x3F, (byte) 0x80, (byte) 0xB6, (byte) 0x51, (byte) 0x26, (byte) 0x69, (byte) 0x45, (byte) 0x5D, (byte) 0x40, (byte) 0x22, (byte) 0x51, (byte) 0xFB, (byte) 0x59, (byte) 0x3D, (byte) 0x8D, (byte) 0x58, (byte) 0xFA,
-        (byte) 0xBF, (byte) 0xC5, (byte) 0xF5, (byte) 0xBA, (byte) 0x30, (byte) 0xF6, (byte) 0xCB, (byte) 0x9B, (byte) 0x55, (byte) 0x6C, (byte) 0xD7, (byte) 0x81, (byte) 0x3B, (byte) 0x80, (byte) 0x1D, (byte) 0x34, (byte) 0x6F,
-        (byte) 0xF2, (byte) 0x66, (byte) 0x60, (byte) 0xB7, (byte) 0x6B, (byte) 0x99, (byte) 0x50, (byte) 0xA5, (byte) 0xA4, (byte) 0x9F, (byte) 0x9F, (byte) 0xE8, (byte) 0x04, (byte) 0x7B, (byte) 0x10, (byte) 0x22, (byte) 0xC2,
-        (byte) 0x4F, (byte) 0xBB, (byte) 0xA9, (byte) 0xD7, (byte) 0xFE, (byte) 0xB7, (byte) 0xC6, (byte) 0x1B, (byte) 0xF8, (byte) 0x3B, (byte) 0x57, (byte) 0xE7, (byte) 0xC6, (byte) 0xA8, (byte) 0xA6, (byte) 0x15, (byte) 0x0F,
-        (byte) 0x04, (byte) 0xFB, (byte) 0x83, (byte) 0xF6, (byte) 0xD3, (byte) 0xC5, (byte) 0x1E, (byte) 0xC3, (byte) 0x02, (byte) 0x35, (byte) 0x54, (byte) 0x13, (byte) 0x5A, (byte) 0x16, (byte) 0x91, (byte) 0x32, (byte) 0xF6,
-        (byte) 0x75, (byte) 0xF3, (byte) 0xAE, (byte) 0x2B, (byte) 0x61, (byte) 0xD7, (byte) 0x2A, (byte) 0xEF, (byte) 0xF2, (byte) 0x22, (byte) 0x03, (byte) 0x19, (byte) 0x9D, (byte) 0xD1, (byte) 0x48, (byte) 0x01, (byte) 0xC7,
-        (byte) 0x02, (byte) 0x15, (byte) 0x00, (byte) 0x97, (byte) 0x60, (byte) 0x50, (byte) 0x8F, (byte) 0x15, (byte) 0x23, (byte) 0x0B, (byte) 0xCC, (byte) 0xB2, (byte) 0x92, (byte) 0xB9, (byte) 0x82, (byte) 0xA2, (byte) 0xEB,
-        (byte) 0x84, (byte) 0x0B, (byte) 0xF0, (byte) 0x58, (byte) 0x1C, (byte) 0xF5, (byte) 0x02, (byte) 0x81, (byte) 0x81, (byte) 0x00, (byte) 0xF7, (byte) 0xE1, (byte) 0xA0, (byte) 0x85, (byte) 0xD6, (byte) 0x9B, (byte) 0x3D,
-        (byte) 0xDE, (byte) 0xCB, (byte) 0xBC, (byte) 0xAB, (byte) 0x5C, (byte) 0x36, (byte) 0xB8, (byte) 0x57, (byte) 0xB9, (byte) 0x79, (byte) 0x94, (byte) 0xAF, (byte) 0xBB, (byte) 0xFA, (byte) 0x3A, (byte) 0xEA, (byte) 0x82,
-        (byte) 0xF9, (byte) 0x57, (byte) 0x4C, (byte) 0x0B, (byte) 0x3D, (byte) 0x07, (byte) 0x82, (byte) 0x67, (byte) 0x51, (byte) 0x59, (byte) 0x57, (byte) 0x8E, (byte) 0xBA, (byte) 0xD4, (byte) 0x59, (byte) 0x4F, (byte) 0xE6,
-        (byte) 0x71, (byte) 0x07, (byte) 0x10, (byte) 0x81, (byte) 0x80, (byte) 0xB4, (byte) 0x49, (byte) 0x16, (byte) 0x71, (byte) 0x23, (byte) 0xE8, (byte) 0x4C, (byte) 0x28, (byte) 0x16, (byte) 0x13, (byte) 0xB7, (byte) 0xCF,
-        (byte) 0x09, (byte) 0x32, (byte) 0x8C, (byte) 0xC8, (byte) 0xA6, (byte) 0xE1, (byte) 0x3C, (byte) 0x16, (byte) 0x7A, (byte) 0x8B, (byte) 0x54, (byte) 0x7C, (byte) 0x8D, (byte) 0x28, (byte) 0xE0, (byte) 0xA3, (byte) 0xAE,
-        (byte) 0x1E, (byte) 0x2B, (byte) 0xB3, (byte) 0xA6, (byte) 0x75, (byte) 0x91, (byte) 0x6E, (byte) 0xA3, (byte) 0x7F, (byte) 0x0B, (byte) 0xFA, (byte) 0x21, (byte) 0x35, (byte) 0x62, (byte) 0xF1, (byte) 0xFB, (byte) 0x62,
-        (byte) 0x7A, (byte) 0x01, (byte) 0x24, (byte) 0x3B, (byte) 0xCC, (byte) 0xA4, (byte) 0xF1, (byte) 0xBE, (byte) 0xA8, (byte) 0x51, (byte) 0x90, (byte) 0x89, (byte) 0xA8, (byte) 0x83, (byte) 0xDF, (byte) 0xE1, (byte) 0x5A,
-        (byte) 0xE5, (byte) 0x9F, (byte) 0x06, (byte) 0x92, (byte) 0x8B, (byte) 0x66, (byte) 0x5E, (byte) 0x80, (byte) 0x7B, (byte) 0x55, (byte) 0x25, (byte) 0x64, (byte) 0x01, (byte) 0x4C, (byte) 0x3B, (byte) 0xFE, (byte) 0xCF,
-        (byte) 0x49, (byte) 0x2A, (byte) 0x03, (byte) 0x81, (byte) 0x85, (byte) 0x00, (byte) 0x02, (byte) 0x81, (byte) 0x81, (byte) 0x00, (byte) 0x98, (byte) 0x33, (byte) 0x90, (byte) 0x14, (byte) 0x79, (byte) 0xC7, (byte) 0xC8,
-        (byte) 0x57, (byte) 0xE1, (byte) 0x82, (byte) 0x53, (byte) 0x5B, (byte) 0x6E, (byte) 0x01, (byte) 0x07, (byte) 0x1E, (byte) 0xA5, (byte) 0x98, (byte) 0xC4, (byte) 0x57, (byte) 0x5D, (byte) 0x23, (byte) 0xAB, (byte) 0x72,
-        (byte) 0x9A, (byte) 0xB3, (byte) 0x2F, (byte) 0x39, (byte) 0xCB, (byte) 0xC5, (byte) 0xD0, (byte) 0x97, (byte) 0xD5, (byte) 0x62, (byte) 0x8C, (byte) 0xD9, (byte) 0xE6, (byte) 0xE2, (byte) 0x05, (byte) 0xC6, (byte) 0x05,
-        (byte) 0x71, (byte) 0x16, (byte) 0xE3, (byte) 0xE8, (byte) 0x04, (byte) 0xE8, (byte) 0x46, (byte) 0x12, (byte) 0x0C, (byte) 0xF8, (byte) 0xFC, (byte) 0x8E, (byte) 0x15, (byte) 0x26, (byte) 0x32, (byte) 0xF7, (byte) 0x8C,
-        (byte) 0x04, (byte) 0x3B, (byte) 0x53, (byte) 0x68, (byte) 0x9A, (byte) 0xA3, (byte) 0xB7, (byte) 0x4D, (byte) 0x13, (byte) 0x40, (byte) 0x0F, (byte) 0xBE, (byte) 0x03, (byte) 0x87, (byte) 0xD8, (byte) 0xF1, (byte) 0xFE,
-        (byte) 0x4B, (byte) 0xF5, (byte) 0x44, (byte) 0x19, (byte) 0x29, (byte) 0xBB, (byte) 0x0D, (byte) 0x0C, (byte) 0x52, (byte) 0xC6, (byte) 0x84, (byte) 0x33, (byte) 0x62, (byte) 0x73, (byte) 0x5D, (byte) 0x03, (byte) 0xFF,
-        (byte) 0x6F, (byte) 0x0A, (byte) 0x5A, (byte) 0xF3, (byte) 0x9E, (byte) 0x52, (byte) 0xF2, (byte) 0xC2, (byte) 0xC8, (byte) 0x00, (byte) 0x52, (byte) 0xC7, (byte) 0x75, (byte) 0xA4, (byte) 0xFD, (byte) 0x71, (byte) 0x2D,
-        (byte) 0x7B, (byte) 0x7A, (byte) 0x31, (byte) 0x27, (byte) 0x6E, (byte) 0xAC, (byte) 0xB6, (byte) 0x40, (byte) 0x14, (byte) 0x4E, (byte) 0xB4, (byte) 0xBB, (byte) 0xB1, (byte) 0x51, (byte) 0x63, (byte) 0x29, (byte) 0x81,
-        (byte) 0x06, (byte) 0xF9    };
-        private static final byte[] DH_private = new byte[] {
-        (byte) 0x30, (byte) 0x82, (byte) 0x01, (byte) 0xA8, (byte) 0x02, (byte) 0x01, (byte) 0x00, (byte) 0x30, (byte) 0x82, (byte) 0x01, (byte) 0x1B, (byte) 0x06, (byte) 0x09, (byte) 0x2A, (byte) 0x86, (byte) 0x48, (byte) 0x86,
-        (byte) 0xF7, (byte) 0x0D, (byte) 0x01, (byte) 0x03, (byte) 0x01, (byte) 0x30, (byte) 0x82, (byte) 0x01, (byte) 0x0C, (byte) 0x02, (byte) 0x81, (byte) 0x81, (byte) 0x00, (byte) 0xFD, (byte) 0x7F, (byte) 0x53, (byte) 0x81,
-        (byte) 0x1D, (byte) 0x75, (byte) 0x12, (byte) 0x29, (byte) 0x52, (byte) 0xDF, (byte) 0x4A, (byte) 0x9C, (byte) 0x2E, (byte) 0xEC, (byte) 0xE4, (byte) 0xE7, (byte) 0xF6, (byte) 0x11, (byte) 0xB7, (byte) 0x52, (byte) 0x3C,
-        (byte) 0xEF, (byte) 0x44, (byte) 0x00, (byte) 0xC3, (byte) 0x1E, (byte) 0x3F, (byte) 0x80, (byte) 0xB6, (byte) 0x51, (byte) 0x26, (byte) 0x69, (byte) 0x45, (byte) 0x5D, (byte) 0x40, (byte) 0x22, (byte) 0x51, (byte) 0xFB,
-        (byte) 0x59, (byte) 0x3D, (byte) 0x8D, (byte) 0x58, (byte) 0xFA, (byte) 0xBF, (byte) 0xC5, (byte) 0xF5, (byte) 0xBA, (byte) 0x30, (byte) 0xF6, (byte) 0xCB, (byte) 0x9B, (byte) 0x55, (byte) 0x6C, (byte) 0xD7, (byte) 0x81,
-        (byte) 0x3B, (byte) 0x80, (byte) 0x1D, (byte) 0x34, (byte) 0x6F, (byte) 0xF2, (byte) 0x66, (byte) 0x60, (byte) 0xB7, (byte) 0x6B, (byte) 0x99, (byte) 0x50, (byte) 0xA5, (byte) 0xA4, (byte) 0x9F, (byte) 0x9F, (byte) 0xE8,
-        (byte) 0x04, (byte) 0x7B, (byte) 0x10, (byte) 0x22, (byte) 0xC2, (byte) 0x4F, (byte) 0xBB, (byte) 0xA9, (byte) 0xD7, (byte) 0xFE, (byte) 0xB7, (byte) 0xC6, (byte) 0x1B, (byte) 0xF8, (byte) 0x3B, (byte) 0x57, (byte) 0xE7,
-        (byte) 0xC6, (byte) 0xA8, (byte) 0xA6, (byte) 0x15, (byte) 0x0F, (byte) 0x04, (byte) 0xFB, (byte) 0x83, (byte) 0xF6, (byte) 0xD3, (byte) 0xC5, (byte) 0x1E, (byte) 0xC3, (byte) 0x02, (byte) 0x35, (byte) 0x54, (byte) 0x13,
-        (byte) 0x5A, (byte) 0x16, (byte) 0x91, (byte) 0x32, (byte) 0xF6, (byte) 0x75, (byte) 0xF3, (byte) 0xAE, (byte) 0x2B, (byte) 0x61, (byte) 0xD7, (byte) 0x2A, (byte) 0xEF, (byte) 0xF2, (byte) 0x22, (byte) 0x03, (byte) 0x19,
-        (byte) 0x9D, (byte) 0xD1, (byte) 0x48, (byte) 0x01, (byte) 0xC7, (byte) 0x02, (byte) 0x81, (byte) 0x81, (byte) 0x00, (byte) 0xF7, (byte) 0xE1, (byte) 0xA0, (byte) 0x85, (byte) 0xD6, (byte) 0x9B, (byte) 0x3D, (byte) 0xDE,
-        (byte) 0xCB, (byte) 0xBC, (byte) 0xAB, (byte) 0x5C, (byte) 0x36, (byte) 0xB8, (byte) 0x57, (byte) 0xB9, (byte) 0x79, (byte) 0x94, (byte) 0xAF, (byte) 0xBB, (byte) 0xFA, (byte) 0x3A, (byte) 0xEA, (byte) 0x82, (byte) 0xF9,
-        (byte) 0x57, (byte) 0x4C, (byte) 0x0B, (byte) 0x3D, (byte) 0x07, (byte) 0x82, (byte) 0x67, (byte) 0x51, (byte) 0x59, (byte) 0x57, (byte) 0x8E, (byte) 0xBA, (byte) 0xD4, (byte) 0x59, (byte) 0x4F, (byte) 0xE6, (byte) 0x71,
-        (byte) 0x07, (byte) 0x10, (byte) 0x81, (byte) 0x80, (byte) 0xB4, (byte) 0x49, (byte) 0x16, (byte) 0x71, (byte) 0x23, (byte) 0xE8, (byte) 0x4C, (byte) 0x28, (byte) 0x16, (byte) 0x13, (byte) 0xB7, (byte) 0xCF, (byte) 0x09,
-        (byte) 0x32, (byte) 0x8C, (byte) 0xC8, (byte) 0xA6, (byte) 0xE1, (byte) 0x3C, (byte) 0x16, (byte) 0x7A, (byte) 0x8B, (byte) 0x54, (byte) 0x7C, (byte) 0x8D, (byte) 0x28, (byte) 0xE0, (byte) 0xA3, (byte) 0xAE, (byte) 0x1E,
-        (byte) 0x2B, (byte) 0xB3, (byte) 0xA6, (byte) 0x75, (byte) 0x91, (byte) 0x6E, (byte) 0xA3, (byte) 0x7F, (byte) 0x0B, (byte) 0xFA, (byte) 0x21, (byte) 0x35, (byte) 0x62, (byte) 0xF1, (byte) 0xFB, (byte) 0x62, (byte) 0x7A,
-        (byte) 0x01, (byte) 0x24, (byte) 0x3B, (byte) 0xCC, (byte) 0xA4, (byte) 0xF1, (byte) 0xBE, (byte) 0xA8, (byte) 0x51, (byte) 0x90, (byte) 0x89, (byte) 0xA8, (byte) 0x83, (byte) 0xDF, (byte) 0xE1, (byte) 0x5A, (byte) 0xE5,
-        (byte) 0x9F, (byte) 0x06, (byte) 0x92, (byte) 0x8B, (byte) 0x66, (byte) 0x5E, (byte) 0x80, (byte) 0x7B, (byte) 0x55, (byte) 0x25, (byte) 0x64, (byte) 0x01, (byte) 0x4C, (byte) 0x3B, (byte) 0xFE, (byte) 0xCF, (byte) 0x49,
-        (byte) 0x2A, (byte) 0x02, (byte) 0x02, (byte) 0x03, (byte) 0xFE, (byte) 0x04, (byte) 0x81, (byte) 0x83, (byte) 0x02, (byte) 0x81, (byte) 0x80, (byte) 0x35, (byte) 0xFE, (byte) 0x44, (byte) 0x0A, (byte) 0xA3, (byte) 0xA0,
-        (byte) 0xCB, (byte) 0x52, (byte) 0xC2, (byte) 0x32, (byte) 0xCA, (byte) 0x38, (byte) 0x1F, (byte) 0x18, (byte) 0xEB, (byte) 0x27, (byte) 0x6E, (byte) 0x77, (byte) 0x25, (byte) 0x40, (byte) 0x1F, (byte) 0x64, (byte) 0x5D,
-        (byte) 0x4B, (byte) 0x59, (byte) 0x41, (byte) 0xB6, (byte) 0xCB, (byte) 0xDF, (byte) 0x73, (byte) 0xE0, (byte) 0x01, (byte) 0x5A, (byte) 0x79, (byte) 0x0D, (byte) 0x8D, (byte) 0x08, (byte) 0xE6, (byte) 0x7F, (byte) 0x86,
-        (byte) 0x58, (byte) 0xCF, (byte) 0x7F, (byte) 0x4B, (byte) 0x2E, (byte) 0xDB, (byte) 0x4C, (byte) 0xDF, (byte) 0x75, (byte) 0xB5, (byte) 0x16, (byte) 0xC4, (byte) 0xA9, (byte) 0x49, (byte) 0xEE, (byte) 0x00, (byte) 0x56,
-        (byte) 0xA0, (byte) 0x60, (byte) 0x08, (byte) 0x8E, (byte) 0x0D, (byte) 0xC7, (byte) 0xC9, (byte) 0x45, (byte) 0x0C, (byte) 0x5D, (byte) 0xB7, (byte) 0x4C, (byte) 0xC4, (byte) 0x7E, (byte) 0xAB, (byte) 0x1F, (byte) 0xEA,
-        (byte) 0xCF, (byte) 0x08, (byte) 0x6D, (byte) 0x05, (byte) 0xA1, (byte) 0x7F, (byte) 0x63, (byte) 0x6F, (byte) 0xB3, (byte) 0x91, (byte) 0xA3, (byte) 0xE1, (byte) 0xB0, (byte) 0x36, (byte) 0x02, (byte) 0x3F, (byte) 0x55,
-        (byte) 0x71, (byte) 0x38, (byte) 0x37, (byte) 0x9A, (byte) 0x19, (byte) 0xA3, (byte) 0xAF, (byte) 0xC8, (byte) 0xD5, (byte) 0x22, (byte) 0xDD, (byte) 0x00, (byte) 0x81, (byte) 0x19, (byte) 0xB6, (byte) 0x3C, (byte) 0x5F,
-        (byte) 0xD9, (byte) 0xDF, (byte) 0xFD, (byte) 0x58, (byte) 0xB1, (byte) 0xE6, (byte) 0xD1, (byte) 0xD2, (byte) 0x58, (byte) 0xEF, (byte) 0x44, (byte) 0x6E, (byte) 0x66, (byte) 0x92, (byte) 0x1E, (byte) 0x30, (byte) 0x0B,
-        (byte) 0x90, (byte) 0x8E, (byte) 0x29   };
-        private static final byte[] DH_public = new byte[] {
-        (byte) 0x30, (byte) 0x82, (byte) 0x01, (byte) 0xA7, (byte) 0x30, (byte) 0x82, (byte) 0x01, (byte) 0x1B, (byte) 0x06, (byte) 0x09, (byte) 0x2A, (byte) 0x86, (byte) 0x48, (byte) 0x86, (byte) 0xF7, (byte) 0x0D, (byte) 0x01,
-        (byte) 0x03, (byte) 0x01, (byte) 0x30, (byte) 0x82, (byte) 0x01, (byte) 0x0C, (byte) 0x02, (byte) 0x81, (byte) 0x81, (byte) 0x00, (byte) 0xFD, (byte) 0x7F, (byte) 0x53, (byte) 0x81, (byte) 0x1D, (byte) 0x75, (byte) 0x12,
-        (byte) 0x29, (byte) 0x52, (byte) 0xDF, (byte) 0x4A, (byte) 0x9C, (byte) 0x2E, (byte) 0xEC, (byte) 0xE4, (byte) 0xE7, (byte) 0xF6, (byte) 0x11, (byte) 0xB7, (byte) 0x52, (byte) 0x3C, (byte) 0xEF, (byte) 0x44, (byte) 0x00,
-        (byte) 0xC3, (byte) 0x1E, (byte) 0x3F, (byte) 0x80, (byte) 0xB6, (byte) 0x51, (byte) 0x26, (byte) 0x69, (byte) 0x45, (byte) 0x5D, (byte) 0x40, (byte) 0x22, (byte) 0x51, (byte) 0xFB, (byte) 0x59, (byte) 0x3D, (byte) 0x8D,
-        (byte) 0x58, (byte) 0xFA, (byte) 0xBF, (byte) 0xC5, (byte) 0xF5, (byte) 0xBA, (byte) 0x30, (byte) 0xF6, (byte) 0xCB, (byte) 0x9B, (byte) 0x55, (byte) 0x6C, (byte) 0xD7, (byte) 0x81, (byte) 0x3B, (byte) 0x80, (byte) 0x1D,
-        (byte) 0x34, (byte) 0x6F, (byte) 0xF2, (byte) 0x66, (byte) 0x60, (byte) 0xB7, (byte) 0x6B, (byte) 0x99, (byte) 0x50, (byte) 0xA5, (byte) 0xA4, (byte) 0x9F, (byte) 0x9F, (byte) 0xE8, (byte) 0x04, (byte) 0x7B, (byte) 0x10,
-        (byte) 0x22, (byte) 0xC2, (byte) 0x4F, (byte) 0xBB, (byte) 0xA9, (byte) 0xD7, (byte) 0xFE, (byte) 0xB7, (byte) 0xC6, (byte) 0x1B, (byte) 0xF8, (byte) 0x3B, (byte) 0x57, (byte) 0xE7, (byte) 0xC6, (byte) 0xA8, (byte) 0xA6,
-        (byte) 0x15, (byte) 0x0F, (byte) 0x04, (byte) 0xFB, (byte) 0x83, (byte) 0xF6, (byte) 0xD3, (byte) 0xC5, (byte) 0x1E, (byte) 0xC3, (byte) 0x02, (byte) 0x35, (byte) 0x54, (byte) 0x13, (byte) 0x5A, (byte) 0x16, (byte) 0x91,
-        (byte) 0x32, (byte) 0xF6, (byte) 0x75, (byte) 0xF3, (byte) 0xAE, (byte) 0x2B, (byte) 0x61, (byte) 0xD7, (byte) 0x2A, (byte) 0xEF, (byte) 0xF2, (byte) 0x22, (byte) 0x03, (byte) 0x19, (byte) 0x9D, (byte) 0xD1, (byte) 0x48,
-        (byte) 0x01, (byte) 0xC7, (byte) 0x02, (byte) 0x81, (byte) 0x81, (byte) 0x00, (byte) 0xF7, (byte) 0xE1, (byte) 0xA0, (byte) 0x85, (byte) 0xD6, (byte) 0x9B, (byte) 0x3D, (byte) 0xDE, (byte) 0xCB, (byte) 0xBC, (byte) 0xAB,
-        (byte) 0x5C, (byte) 0x36, (byte) 0xB8, (byte) 0x57, (byte) 0xB9, (byte) 0x79, (byte) 0x94, (byte) 0xAF, (byte) 0xBB, (byte) 0xFA, (byte) 0x3A, (byte) 0xEA, (byte) 0x82, (byte) 0xF9, (byte) 0x57, (byte) 0x4C, (byte) 0x0B,
-        (byte) 0x3D, (byte) 0x07, (byte) 0x82, (byte) 0x67, (byte) 0x51, (byte) 0x59, (byte) 0x57, (byte) 0x8E, (byte) 0xBA, (byte) 0xD4, (byte) 0x59, (byte) 0x4F, (byte) 0xE6, (byte) 0x71, (byte) 0x07, (byte) 0x10, (byte) 0x81,
-        (byte) 0x80, (byte) 0xB4, (byte) 0x49, (byte) 0x16, (byte) 0x71, (byte) 0x23, (byte) 0xE8, (byte) 0x4C, (byte) 0x28, (byte) 0x16, (byte) 0x13, (byte) 0xB7, (byte) 0xCF, (byte) 0x09, (byte) 0x32, (byte) 0x8C, (byte) 0xC8,
-        (byte) 0xA6, (byte) 0xE1, (byte) 0x3C, (byte) 0x16, (byte) 0x7A, (byte) 0x8B, (byte) 0x54, (byte) 0x7C, (byte) 0x8D, (byte) 0x28, (byte) 0xE0, (byte) 0xA3, (byte) 0xAE, (byte) 0x1E, (byte) 0x2B, (byte) 0xB3, (byte) 0xA6,
-        (byte) 0x75, (byte) 0x91, (byte) 0x6E, (byte) 0xA3, (byte) 0x7F, (byte) 0x0B, (byte) 0xFA, (byte) 0x21, (byte) 0x35, (byte) 0x62, (byte) 0xF1, (byte) 0xFB, (byte) 0x62, (byte) 0x7A, (byte) 0x01, (byte) 0x24, (byte) 0x3B,
-        (byte) 0xCC, (byte) 0xA4, (byte) 0xF1, (byte) 0xBE, (byte) 0xA8, (byte) 0x51, (byte) 0x90, (byte) 0x89, (byte) 0xA8, (byte) 0x83, (byte) 0xDF, (byte) 0xE1, (byte) 0x5A, (byte) 0xE5, (byte) 0x9F, (byte) 0x06, (byte) 0x92,
-        (byte) 0x8B, (byte) 0x66, (byte) 0x5E, (byte) 0x80, (byte) 0x7B, (byte) 0x55, (byte) 0x25, (byte) 0x64, (byte) 0x01, (byte) 0x4C, (byte) 0x3B, (byte) 0xFE, (byte) 0xCF, (byte) 0x49, (byte) 0x2A, (byte) 0x02, (byte) 0x02,
-        (byte) 0x03, (byte) 0xFE, (byte) 0x03, (byte) 0x81, (byte) 0x85, (byte) 0x00, (byte) 0x02, (byte) 0x81, (byte) 0x81, (byte) 0x00, (byte) 0xD4, (byte) 0xC2, (byte) 0xC2, (byte) 0x84, (byte) 0xEB, (byte) 0xEC, (byte) 0xB6,
-        (byte) 0xF1, (byte) 0x29, (byte) 0x2B, (byte) 0xAB, (byte) 0x8F, (byte) 0xC1, (byte) 0x48, (byte) 0x4C, (byte) 0x47, (byte) 0xCE, (byte) 0x0B, (byte) 0x97, (byte) 0x4C, (byte) 0xFC, (byte) 0x27, (byte) 0x10, (byte) 0x0A,
-        (byte) 0x5F, (byte) 0x3E, (byte) 0xE6, (byte) 0xF9, (byte) 0x9B, (byte) 0x15, (byte) 0xDF, (byte) 0x83, (byte) 0x01, (byte) 0xFA, (byte) 0x69, (byte) 0x57, (byte) 0xEC, (byte) 0x6B, (byte) 0x68, (byte) 0xC7, (byte) 0x96,
-        (byte) 0x33, (byte) 0x98, (byte) 0xA4, (byte) 0xB0, (byte) 0xA3, (byte) 0x18, (byte) 0x01, (byte) 0x66, (byte) 0x7A, (byte) 0x4A, (byte) 0xF3, (byte) 0x3C, (byte) 0xD9, (byte) 0x2A, (byte) 0x48, (byte) 0xFD, (byte) 0x3A,
-        (byte) 0x31, (byte) 0xFC, (byte) 0x97, (byte) 0x52, (byte) 0x36, (byte) 0x20, (byte) 0x0E, (byte) 0x69, (byte) 0xB6, (byte) 0x32, (byte) 0x8B, (byte) 0x4E, (byte) 0xDA, (byte) 0x8B, (byte) 0x04, (byte) 0x88, (byte) 0xF8,
-        (byte) 0x30, (byte) 0xA9, (byte) 0x65, (byte) 0x68, (byte) 0x47, (byte) 0xBB, (byte) 0xA1, (byte) 0xF6, (byte) 0xD6, (byte) 0x18, (byte) 0x11, (byte) 0x48, (byte) 0x8D, (byte) 0x8F, (byte) 0x4B, (byte) 0xC1, (byte) 0xE1,
-        (byte) 0xA4, (byte) 0x43, (byte) 0x83, (byte) 0x1F, (byte) 0x6B, (byte) 0x6D, (byte) 0xEE, (byte) 0xA7, (byte) 0xA3, (byte) 0x5F, (byte) 0xD2, (byte) 0x95, (byte) 0x09, (byte) 0xD4, (byte) 0xEA, (byte) 0x85, (byte) 0x0C,
-        (byte) 0xA5, (byte) 0xC9, (byte) 0x93, (byte) 0xCE, (byte) 0xC1, (byte) 0x1D, (byte) 0x30, (byte) 0x73, (byte) 0xA3, (byte) 0xE1, (byte) 0x69, (byte) 0xA8, (byte) 0x11, (byte) 0x98, (byte) 0x78, (byte) 0xF3, (byte) 0xF9,
-        (byte) 0x8F, (byte) 0x04    };
-
-
-
-    private static final HashMap<String, KeySpec> keys = new HashMap<String, KeySpec>();
-    static {
-        keys.put("DH_public", new X509EncodedKeySpec(DH_public));
-        keys.put("DH_private", new PKCS8EncodedKeySpec(DH_private));
-        keys.put("DSA_public", new X509EncodedKeySpec(DSA_public));
-        keys.put("DSA_private", new PKCS8EncodedKeySpec(DSA_private));
-        keys.put("RSA_public", new X509EncodedKeySpec(RSA_public));
-        keys.put("RSA_private", new PKCS8EncodedKeySpec(RSA_private));
-    }
-
-    public static PrivateKey getPrivateKey(String algorithmName) throws NoSuchAlgorithmException, InvalidKeySpecException
-    {
-        KeyFactory factory = KeyFactory.getInstance(algorithmName);
-        return factory.generatePrivate(keys.get(algorithmName + "_private"));
-    }
-
-    public static PublicKey getPublicKey(String algorithmName) throws NoSuchAlgorithmException, InvalidKeySpecException
-    {
-        KeyFactory factory = KeyFactory.getInstance(algorithmName);
-        return factory.generatePublic(keys.get(algorithmName + "_public"));
-    }
-}
diff --git a/support/src/test/java/tests/security/KeyFactoryTest.java b/support/src/test/java/tests/security/KeyFactoryTest.java
deleted file mode 100644
index 46a6502..0000000
--- a/support/src/test/java/tests/security/KeyFactoryTest.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package tests.security;
-
-import java.security.Key;
-import java.security.KeyFactory;
-import java.security.KeyPair;
-import java.security.NoSuchAlgorithmException;
-import java.security.PrivateKey;
-import java.security.PublicKey;
-import java.security.spec.InvalidKeySpecException;
-import java.security.spec.KeySpec;
-import junit.framework.TestCase;
-
-public abstract class KeyFactoryTest<PublicKeySpec extends KeySpec, PrivateKeySpec extends KeySpec>
-        extends TestCase {
-
-    private final String algorithmName;
-    private final Class<PublicKeySpec> publicKeySpecClass;
-    private final Class<PrivateKeySpec> privateKeySpecClass;
-    private KeyFactory factory;
-
-    public KeyFactoryTest(String algorithmName,
-            Class<PublicKeySpec> publicKeySpecClass,
-            Class<PrivateKeySpec> privateKeySpecClass) {
-        this.algorithmName = algorithmName;
-        this.publicKeySpecClass = publicKeySpecClass;
-        this.privateKeySpecClass = privateKeySpecClass;
-    }
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        factory = getFactory();
-    }
-
-    private KeyFactory getFactory() throws Exception {
-        return KeyFactory.getInstance(algorithmName);
-    }
-
-    public void testKeyFactory() throws Exception {
-        PrivateKeySpec privateKeySpec = factory.getKeySpec(DefaultKeys.getPrivateKey(algorithmName),
-                                                           privateKeySpecClass);
-        PrivateKey privateKey =  factory.generatePrivate(privateKeySpec);
-        PublicKeySpec publicKeySpec = factory.getKeySpec(DefaultKeys.getPublicKey(algorithmName),
-                                                         publicKeySpecClass);
-        PublicKey publicKey = factory.generatePublic(publicKeySpec);
-        check(new KeyPair(publicKey, privateKey));
-    }
-
-    protected void check(KeyPair keyPair) throws Exception {}
-}
diff --git a/support/src/test/java/tests/security/KeyPairGeneratorTest.java b/support/src/test/java/tests/security/KeyPairGeneratorTest.java
deleted file mode 100644
index 89e7e69..0000000
--- a/support/src/test/java/tests/security/KeyPairGeneratorTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package tests.security;
-
-import java.security.KeyPair;
-import java.security.KeyPairGenerator;
-import java.security.NoSuchAlgorithmException;
-import junit.framework.TestCase;
-
-public abstract class KeyPairGeneratorTest extends TestCase {
-
-    private final String algorithmName;
-    private final TestHelper<KeyPair> helper;
-
-    private KeyPairGenerator generator;
-
-    protected KeyPairGeneratorTest(String algorithmName, TestHelper<KeyPair> helper) {
-        this.algorithmName = algorithmName;
-        this.helper = helper;
-    }
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        generator = KeyPairGenerator.getInstance(algorithmName);
-    }
-
-    public void testKeyPairGenerator() throws Exception {
-        generator.initialize(1024);
-
-        KeyPair keyPair = generator.generateKeyPair();
-
-        assertNotNull("no keypair generated", keyPair);
-        assertNotNull("no public key generated", keyPair.getPublic());
-        assertNotNull("no private key generated", keyPair.getPrivate());
-
-        helper.test(keyPair);
-    }
-}
diff --git a/support/src/test/java/tests/security/SignatureHelper.java b/support/src/test/java/tests/security/SignatureHelper.java
deleted file mode 100644
index b4fc1db..0000000
--- a/support/src/test/java/tests/security/SignatureHelper.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package tests.security;
-
-import java.security.InvalidKeyException;
-import java.security.KeyPair;
-import java.security.NoSuchAlgorithmException;
-import java.security.PrivateKey;
-import java.security.PublicKey;
-import java.security.Signature;
-import java.security.SignatureException;
-import junit.framework.Assert;
-
-public class SignatureHelper extends TestHelper<KeyPair> {
-
-    private final String algorithmName;
-    private final String plainData = "some data do sign and verify";
-
-    public SignatureHelper(String algorithmName) {
-        this.algorithmName = algorithmName;
-    }
-
-    @Override
-    public void test(KeyPair keyPair) throws Exception {
-        test(keyPair.getPrivate(), keyPair.getPublic());
-    }
-
-    public void test(PrivateKey encryptKey, PublicKey decryptKey) throws Exception {
-        Signature signature = Signature.getInstance(algorithmName);
-        signature.initSign(encryptKey);
-        signature.update(plainData.getBytes());
-        byte[] signed = signature.sign();
-
-        signature.initVerify(decryptKey);
-        signature.update(plainData.getBytes());
-        Assert.assertTrue("signature could not be verified", signature.verify(signed));
-    }
-}
diff --git a/support/src/test/java/tests/security/TestHelper.java b/support/src/test/java/tests/security/TestHelper.java
deleted file mode 100644
index be146b2..0000000
--- a/support/src/test/java/tests/security/TestHelper.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package tests.security;
-
-public abstract class TestHelper<T> {
-    public abstract void test(T testObject) throws Exception;
-}
diff --git a/support/src/test/java/tests/util/CallVerificationStack.java b/support/src/test/java/tests/util/CallVerificationStack.java
deleted file mode 100644
index 6c1881b..0000000
--- a/support/src/test/java/tests/util/CallVerificationStack.java
+++ /dev/null
@@ -1,353 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package tests.util;
-
-import java.util.Stack;
-
-/**
- * A stack to store the parameters of a call, as well as the call stack.
- *
- */
-public class CallVerificationStack extends Stack<Object> {
-
-    /*
-     * --------------------------------------------------------------------
-     * Class variables
-     * --------------------------------------------------------------------
-     */
-
-    private static final long serialVersionUID = 1L;
-
-    // the singleton
-    private static final CallVerificationStack _instance = new CallVerificationStack();
-
-    /*
-     * --------------------------------------------------------------------
-     * Instance variables
-     * --------------------------------------------------------------------
-     */
-
-    // the call stack, store StackTraceElement
-    private final Stack<StackTraceElement> callStack = new Stack<StackTraceElement>();
-
-    /*
-     * -------------------------------------------------------------------
-     * Constructors
-     * -------------------------------------------------------------------
-     */
-
-    /**
-     * Can't be instantiated.
-     */
-    private CallVerificationStack() {
-        // empty
-    }
-
-    /*
-     * -------------------------------------------------------------------
-     * Methods
-     * -------------------------------------------------------------------
-     */
-
-    /**
-     * Gets the singleton instance.
-     *
-     * @return the singleton instance
-     */
-    public static CallVerificationStack getInstance() {
-        return _instance;
-    }
-
-    /**
-     * Pushes the call stack.
-     */
-    private void pushCallStack() {
-        StackTraceElement[] eles = (new Throwable()).getStackTrace();
-        int i;
-        for (i = 1; i < eles.length; i++) {
-            if (!eles[i].getClassName().equals(this.getClass().getName())) {
-                break;
-            }
-        }
-        this.callStack.push(eles[i]);
-    }
-
-    /**
-     * Gets the "current" calling class name.
-     *
-     * @return the "current" calling class name
-     */
-    public String getCurrentSourceClass() {
-        return this.callStack.peek().getClassName();
-    }
-
-    /**
-     * Gets the "current" calling method name.
-     *
-     * @return the "current" calling method name
-     */
-    public String getCurrentSourceMethod() {
-        return this.callStack.peek().getMethodName();
-    }
-
-    /**
-     * Clear the parameter stack and the call stack.
-     *
-     */
-    @Override
-    public void clear() {
-        this.callStack.clear();
-        super.clear();
-    }
-
-    @Override
-    public Object push(Object o) {
-        pushCallStack();
-        return super.push(o);
-    }
-
-    /**
-     * Pushes a boolean onto the top of this stack.
-     *
-     * @param val
-     *            the value to push
-     */
-    public void push(boolean val) {
-        this.push(new BaseTypeWrapper(val));
-    }
-
-    /**
-     * Pushes a char onto the top of this stack.
-     *
-     * @param val
-     *            the value to push
-     */
-    public void push(char val) {
-        this.push(new BaseTypeWrapper(val));
-    }
-
-    /**
-     * Pushes a double onto the top of this stack.
-     *
-     * @param val
-     *            the value to push
-     */
-    public void push(double val) {
-        this.push(new BaseTypeWrapper(val));
-    }
-
-    /**
-     * Pushes a float onto the top of this stack.
-     *
-     * @param val
-     *            the value to push
-     */
-    public void push(float val) {
-        this.push(new BaseTypeWrapper(val));
-    }
-
-    /**
-     * Pushes an int onto the top of this stack.
-     *
-     * @param val
-     *            the value to push
-     */
-    public void push(int val) {
-        this.push(new BaseTypeWrapper(val));
-    }
-
-    /**
-     * Pushes a long onto the top of this stack.
-     *
-     * @param val
-     *            the value to push
-     */
-    public void push(long val) {
-        this.push(new BaseTypeWrapper(val));
-    }
-
-    /**
-     * Pushes a short onto the top of this stack.
-     *
-     * @param val
-     *            the value to push
-     */
-    public void push(short val) {
-        this.push(new BaseTypeWrapper(val));
-    }
-
-    /**
-     * Pop an object.
-     *
-     * @return the object
-     */
-    @Override
-    public Object pop() {
-        this.callStack.pop();
-        return super.pop();
-    }
-
-    /**
-     * Pop a boolean.
-     *
-     * @return the value
-     */
-    public boolean popBoolean() {
-        BaseTypeWrapper wrapper = (BaseTypeWrapper) this.pop();
-        Boolean value = (Boolean) wrapper.getValue();
-        return value.booleanValue();
-    }
-
-    /**
-     * Pop a char.
-     *
-     * @return the value
-     */
-    public char popChar() {
-        BaseTypeWrapper wrapper = (BaseTypeWrapper) this.pop();
-        Character value = (Character) wrapper.getValue();
-        return value.charValue();
-    }
-
-    /**
-     * Pop a double.
-     *
-     * @return the value
-     */
-    public double popDouble() {
-        BaseTypeWrapper wrapper = (BaseTypeWrapper) this.pop();
-        Double value = (Double) wrapper.getValue();
-        return value.doubleValue();
-    }
-
-    /**
-     * Pop a float.
-     *
-     * @return the value
-     */
-    public float popFloat() {
-        BaseTypeWrapper wrapper = (BaseTypeWrapper) this.pop();
-        Float value = (Float) wrapper.getValue();
-        return value.floatValue();
-    }
-
-    /**
-     * Pop a int.
-     *
-     * @return the value
-     */
-    public int popInt() {
-        BaseTypeWrapper wrapper = (BaseTypeWrapper) this.pop();
-        Integer value = (Integer) wrapper.getValue();
-        return value.intValue();
-    }
-
-    /**
-     * Pop a long.
-     *
-     * @return the value
-     */
-    public long popLong() {
-        BaseTypeWrapper wrapper = (BaseTypeWrapper) this.pop();
-        Long value = (Long) wrapper.getValue();
-        return value.longValue();
-    }
-
-    /**
-     * Pop a short.
-     *
-     * @return the value
-     */
-    public short popShort() {
-        BaseTypeWrapper wrapper = (BaseTypeWrapper) this.pop();
-        Short value = (Short) wrapper.getValue();
-        return value.shortValue();
-    }
-
-    /*
-     * Wrapper of base types.
-     */
-    class BaseTypeWrapper {
-
-        // the internal value
-        private Object value;
-
-        /*
-         * Constructs a wrapper object for the base type <code> boolean </code> .
-         */
-        public BaseTypeWrapper(boolean val) {
-            this.value = new Boolean(val);
-        }
-
-        /*
-         * Constructs a wrapper object for the base type <code> c </code> .
-         */
-        public BaseTypeWrapper(byte val) {
-            this.value = new Byte(val);
-        }
-
-        /*
-         * Constructs a wrapper object for the base type <code> char </code> .
-         */
-        public BaseTypeWrapper(char val) {
-            this.value = new Character(val);
-        }
-
-        /*
-         * Constructs a wrapper object for the base type <code> double </code> .
-         */
-        public BaseTypeWrapper(double val) {
-            this.value = new Double(val);
-        }
-
-        /*
-         * Constructs a wrapper object for the base type <code> float </code> .
-         */
-        public BaseTypeWrapper(float val) {
-            this.value = new Float(val);
-        }
-
-        /*
-         * Constructs a wrapper object for the base type <code> int </code> .
-         */
-        public BaseTypeWrapper(int val) {
-            this.value = new Integer(val);
-        }
-
-        /*
-         * Constructs a wrapper object for the base type <code> long </code> .
-         */
-        public BaseTypeWrapper(long val) {
-            this.value = new Long(val);
-        }
-
-        /*
-         * Constructs a wrapper object for the base type <code> short </code> .
-         */
-        public BaseTypeWrapper(short val) {
-            this.value = new Short(val);
-        }
-
-        /*
-         * Gets the internal value.
-         */
-        public Object getValue() {
-            return this.value;
-        }
-    }
-}
diff --git a/support/src/test/java/tests/util/ForEachRunner.java b/support/src/test/java/tests/util/ForEachRunner.java
deleted file mode 100644
index 2c222b2..0000000
--- a/support/src/test/java/tests/util/ForEachRunner.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2015 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package tests.util;
-
-/**
- * Runner which executes the provided code under test (via a callback) for each provided input
- * value.
- */
-public final class ForEachRunner {
-
-  /**
-   * Callback parameterized with a value.
-   */
-  public interface Callback<T> {
-    /**
-     * Invokes the callback for the provided value.
-     */
-    void run(T value) throws Exception;
-  }
-
-  private ForEachRunner() {}
-
-  /**
-   * Invokes the provided callback for each of the provided named values.
-   *
-   * @param namesAndValues named values represented as name-value pairs.
-   *
-   * @param <T> type of value.
-   */
-  public static <T> void runNamed(Callback<T> callback, Iterable<Pair<String, T>> namesAndValues)
-      throws Exception {
-    for (Pair<String, T> nameAndValue : namesAndValues) {
-      try {
-        callback.run(nameAndValue.getSecond());
-      } catch (Throwable e) {
-        throw new Exception("Failed for " + nameAndValue.getFirst() + ": " + e.getMessage(), e);
-      }
-    }
-  }
-}
diff --git a/support/src/test/java/tests/util/Pair.java b/support/src/test/java/tests/util/Pair.java
deleted file mode 100644
index 9b0906d..0000000
--- a/support/src/test/java/tests/util/Pair.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (C) 2010 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package tests.util;
-
-/**
- * Pair of typed values.
- *
- * <p>Pairs are obtained using {@link #of(Object, Object) of}.
- *
- * @param <F> type of the first value.
- * @param <S> type of the second value.
- */
-public class Pair<F, S> {
-  private final F mFirst;
-  private final S mSecond;
-
-  private Pair(F first, S second) {
-    mFirst = first;
-    mSecond = second;
-  }
-
-  /**
-   * Gets the pair consisting of the two provided values.
-   *
-   * @param first first value or {@code null}.
-   * @param second second value or {@code null}.
-   */
-  public static <F, S> Pair<F, S> of(F first, S second) {
-    return new Pair<F, S>(first, second);
-  }
-
-  /**
-   * Gets the first value from this pair.
-   *
-   * @return value or {@code null}.
-   */
-  public F getFirst() {
-    return mFirst;
-  }
-
-  /**
-   * Gets the second value from this pair.
-   *
-   * @return value or {@code null}.
-   */
-  public S getSecond() {
-    return mSecond;
-  }
-
-  @Override
-  public String toString() {
-    return "Pair[" + mFirst + ", " + mSecond + "]";
-  }
-
-  @Override
-  public int hashCode() {
-    final int prime = 31;
-    int result = 1;
-    result = prime * result + ((mFirst == null) ? 0 : mFirst.hashCode());
-    result = prime * result + ((mSecond == null) ? 0 : mSecond.hashCode());
-    return result;
-  }
-
-  @Override
-  public boolean equals(Object obj) {
-    if (this == obj) {
-      return true;
-    }
-    if (obj == null) {
-      return false;
-    }
-    if (getClass() != obj.getClass()) {
-      return false;
-    }
-    @SuppressWarnings("rawtypes")
-    Pair other = (Pair) obj;
-    if (mFirst == null) {
-      if (other.mFirst != null) {
-        return false;
-      }
-    } else if (!mFirst.equals(other.mFirst)) {
-      return false;
-    }
-    if (mSecond == null) {
-      if (other.mSecond != null) {
-        return false;
-      }
-    } else if (!mSecond.equals(other.mSecond)) {
-      return false;
-    }
-    return true;
-  }
-}