view patches/boot/ecj-stringswitch.patch @ 2910:df0f259a2fcc icedtea-2.7.0pre10

Bump to icedtea-2.7.0pre10. Upstream changes: - Bump to icedtea-2.7.0pre10 - S6253144: Long narrowing conversion should describe the algorithm used and implied "risks" - S6328537: Improve javadocs for Socket class by adding references to SocketOptions - S6624200: Regression test fails: test/closed/javax/swing/JMenuItem/4654927/bug4654927.java - S6882559: new JEditorPane("text/plain","") fails for null context class loader - S6978886: javadoc shows stacktrace after print error resulting from disk full - S6995421: Eliminate the static dependency to sun.security.ec.ECKeyFactory - S6996372: synchronizing handshaking hash - S7027045: (doc) java/awt/Window.java has several typos in javadoc - S7054969: Null-check-in-finally pattern in java/security documentation - S7059542: JNDI name operations should be locale independent - S7072353: JNDI libraries do not build with javac -Xlint:all -Werror - S7075563: Broken link in "javax.swing.SwingWorker" - S7077672: jdk8_tl nightly fail in step-2 build on 8/10/11 - S7088502: Security libraries don't build with javac -Werror - S7090158: Networking Libraries don't build with javac -Werror - S7092447: Clarify the default locale used in each locale sensitive operation - S7093640: Enable client-side TLS 1.2 by default - S7103570: AtomicIntegerFieldUpdater does not work when SecurityManager is installed - S7117360: Warnings in java.util.concurrent.atomic package - S7117465: Warning cleanup for IMF classes - S7125055: ContentHandler.getContent API changed in error - S7145960: sun/security/mscapi/ShortRSAKey1024.sh failing on windows - S7172012: Make test-in-build an option (Queens) - S7187051: ShortRSAKeynnn.sh tests should do cleanup before start test - S7187144: JavaDoc for ScriptEngineFactory.getProgram() contains an error - S8000418: javadoc should used a standard "generated by javadoc" string - S8000626: Implement dead key detection for KeyEvent on Linux - S8000666: javadoc should write directly to Writer instead of composing strings - S8000673: remove dead code from HtmlWriter and subtypes - S8000897: VM crash in CompileBroker - S8000970: break out auxiliary classes that will prevent multi-core compilation of the JDK - S8001669: javadoc internal DocletAbortException should set cause when appropriate - S8003890: corelibs test scripts should pass TESTVMOPTS - S8005629: javac warnings compiling java.awt.EventDispatchThread and sun.awt.X11.XIconWindow - S8008949: javadoc stopped copying doc-files - S8010297: Missing isLoggable() checks in logging code - S8010782: clean up source files containing carriage return characters - S8011402: Move blacklisting certificate logic from hard code to data - S8011547: Update XML Signature implementation to Apache Santuario 1.5.4 - S8012288: XML DSig API allows wrong tag names and extra elements in SignedInfo - S8014431: cleanup warnings indicated by the -Wunused-value compiler option on linux - S8015265: revise the fix for 8007037 - S8016217: More javadoc warnings - S8016491: PPC64 (part 2): Clean up PPC defines. - S8016586: PPC64 (part 3): basic changes for PPC64 - S8016696: PPC64 (part 4): add relocation for trampoline stubs - S8016747: Replace deprecated PlatformLogger isLoggable(int) with isLoggable(Level) - S8017313: PPC64 (part 6): stack handling improvements - S8017317: PPC64 (part 7): cppInterpreter: implement support for biased locking - S8017325: Cleanup of the javadoc <code> tag in java.security.cert - S8017326: Cleanup of the javadoc <code> tag in java.security.spec - S8019517: PPC64 (part 102): cppInterpreter: implement G1 support - S8019518: PPC64 (part 103): cppInterpreter: implement support for compressed Oops - S8019519: PPC64 (part 105): C interpreter: implement support for jvmti early return. - S8019772: Fix doclint issues in javax.crypto and javax.security subpackages - S8019929: PPC64 (part 107): Extend ELF-decoder to support PPC64 function descriptor tables - S8019973: PPC64 (part 11): Fix IA64 preprocessor conditionals on AIX. - S8020121: PPC64: fix build in cppInterpreter after 8019519 - S8020190: Fatal: Bug in native code: jfieldID must match object - S8020557: javadoc cleanup in javax.security - S8020688: Broken links in documentation at http://docs.oracle.com/javase/6/docs/api/index. - S8020708: NLS mnemonics missing in SwingSet2/JInternalFrame demo - S8021108: Clean up doclint warnings and errors in java.text package - S8021417: Fix doclint issues in java.util.concurrent - S8021833: javadoc cleanup in java.net - S8022120: JCK test api/javax_xml/crypto/dsig/TransformService/index_ParamMethods fails - S8022175: Fix doclint warnings in javax.print - S8022406: Fix doclint issues in java.beans - S8022746: List of spelling errors in API doc - S8024344: PPC64 (part 112): C argument in register AND stack slot. - S8024468: PPC64 (part 201): cppInterpreter: implement bytecode profiling - S8024469: PPC64 (part 202): cppInterpreter: support for OSR. - S8024756: method grouping tabs are not selectable - S8024779: [macosx] SwingNode crashes on exit - S8024854: PPC64: Basic changes and files to build the class library on AIX - S8024900: PPC64: Enable new build on AIX (jdk part) - S8025085: [javadoc] some errors in javax/swing - S8025218: [javadoc] some errors in java/awt classes - S8025249: [javadoc] fix some javadoc errors in javax/swing/ - S8025409: Fix javadoc comments errors and warning reported by doclint report - S8026021: more fix of javadoc errors and warnings reported by doclint, see the description - S8026119: Regression test DHEKeySizing.java failing intermittently - S8026741: jdk8 l10n resource file translation update 5 - S8029957: PPC64 (part 213): cppInterpreter: memory ordering for object initialization - S8033168: PPC64: gcc 4.8 warning in output_c.cpp - S8034797: AIX: Fix os::naked_short_sleep() in os_aix.cpp after 8028280 - S8035396: Introduce accessor for tmp_oop in frame. - S8035647: PPC64: Support for elf v2 abi. - S8036767: PPC64: Support for little endian execution model - S8036976: PPC64: implement the template interpreter - S8037099: [macosx] Remove all references to GC from native OBJ-C code - S8037915: PPC64/AIX: Several smaller fixes - S8038184: XMLSignature throws StringIndexOutOfBoundsException if ID attribute value is empty String - S8038349: Signing XML with DSA throws Exception when key is larger than 1024 bits - S8042309: Some bugfixes for the ppc64 port - S8048147: Privilege tests with JAAS Subject.doAs - S8048357: PKCS basic tests - S8049171: Additional tests for jarsigner's warnings - S8049244: XML Signature performance issue caused by unbuffered signature data - S8049432: New tests for TLS property jdk.tls.client.protocols - S8050893: (smartcardio) Invert reset argument in tests in sun/security/smartcardio - S8050942: PPC64: implement template interpreter for ppc64le - S8050972: Concurrency problem in PcDesc cache - S8056122: Upgrade JDK to use LittleCMS 2.6 - S8057934: Upgrade to LittleCMS 2.6 breaks AIX build - S8059177: jdk8u40 l10n resource file translation update 1 - S8059212: Modify sun/security/smartcardio manual regression tests so that they do not just fail if no cardreader found - S8067364: Printing to Postscript doesn't support dieresis - S8068279: (typo in the spec) javax.script.ScriptEngineFactory.getLanguageName - S8068491: Update the protocol for references of docs.oracle.com to HTTPS. - S8069038: javax/net/ssl/TLS/TLSClientPropertyTest.java needs to be updated for JDK-8061210 - S8069590: AIX port of "8050807: Better performing performance data handling" - S8075118: JVM stuck in infinite loop during verification - S8075584: test for 8067364 depends on hardwired text advance - S8076369: Introduce the jdk.tls.client.protocols system property for JDK 7u - S8076486: [TESTBUG] javax/security/auth/Subject/doAs/NestedActions.java fails if extra VM options are given - S8077953: [TEST_BUG] com/sun/management/OperatingSystemMXBean/TestTotalSwap.java Compilation failed after JDK-8077387 - S8078482: ppc: pass thread to throw_AbstractMethodError - S8078823, PR2809: javax/net/ssl/ciphersuites/DisabledAlgorithms.java fails intermittently - S8080190: PPC64: Fix wrong rotate instructions in the .ad file - S8080628: No mnemonics on Open and Save buttons in JFileChooser - S8083601: jdk8u60 l10n resource file translation update 2 - S8138725: Add options for Javadoc generation - S8139258: PPC64LE: argument passing problem when passing 15 floats in native call - S8139421: PPC64LE: MacroAssembler::bxx64_patchable kill register R12 - S8139565: Restrict certificates with DSA keys less than 1024 bits - S8140353: Improve signature checking - S8140422: Add mechanism to allow non default root CAs to be not subject to algorithm restrictions - S8140530: Creating a VolatileImage with size 0,0 results in no longer working g2d.drawString - S8140587: Atomic*FieldUpdaters should use Class.isInstance instead of direct class check - S8142926: OutputAnalyzer's shouldXXX() calls return this - S8143134: L10n resource file translation update - S8143959: Certificates requiring blacklisting - S8145984: [macosx] sun.lwawt.macosx.CAccessible leaks - S8147077: IllegalArgumentException thrown by api/java_awt/Component/FlipBufferStrategy/indexTGF_General - S8148127: IllegalArgumentException thrown by JCK test api/java_awt/Component/FlipBufferStrategy/indexTGF_General in opengl pipeline - S8148487: PPC64: Better byte behavior - S8148516: Improve the default strength of EC in JDK - S8148516, PR2809: Improve the default strength of EC in JDK [test/javax/net/ssl/ciphersuites/DisabledAlgorithms.java update] - S8149029: Secure validation of XML based digital signature always enabled when checking wrapping attacks - S8150611: Security problem on sun.misc.resources.Messages* - S8151893: Add security property to configure XML Signature secure validation mode - S8151921: Improved page resolution - S8151934: Resolve class resolution - S8155760: Implement Serialization Filtering - S8155968: Update command line options - S8155973: Tighten jar checks - S8156802: Better constraint checking - S8157176: Improved classfile parsing - S8157653: [Parfait] Uninitialised variable in awt_Font.cpp - S8157739: Classloader Consistency Checking - S8157749: Improve handling of DNS error replies - S8157753: Audio replay enhancement - S8157759: LCMS Transform Sampling Enhancement - S8157764: Better handling of interpolation plugins - S8158260: PPC64: unaligned Unsafe.getInt can lead to the generation of illegal instructions - S8158302: Handle contextual glyph substitutions - S8158406: Limited Parameter Processing - S8158734: JEditorPane.createEditorKitForContentType throws NPE after 6882559 - S8158993: Service Menu services - S8158997: JNDI Protocols Switch - S8159495: Fix index offsets - S8159503: Amend Annotation Actions - S8159507: RuntimeVisibleAnnotation validation - S8159511: Stack map validation - S8159515: Improve indy validation - S8159519: Reformat JDWP messages - S8159684: (tz) Support tzdata2016f - S8160090: Better signature handling in pack200 - S8160094: Improve pack200 layout - S8160098: Clean up color profiles - S8160591: Improve internal array handling - S8160838: Better HTTP service - S8160934: isnan() is not available on older MSVC compilers - S8161218: Better bytecode loading - S8161228: URL objects with custom protocol handlers have port changed after deserializing - S8161571: Verifying ECDSA signatures permits trailing bytes - S8161743: Provide proper login context - S8162411: Service Menu services 2 - S8162419: closed/com/oracle/jfr/runtime/TestVMInfoEvent.sh failing after JDK-8155968 - S8162511: 8u111 L10n resource file updates - S8162577: Standardize logging levels - S8162792: Remove constraint DSA keySize < 1024 from jdk.jar.disabledAlgorithms in jdk8 - S8162973: Better component components - S8163304: jarsigner -verbose -verify should print the algorithms used to sign the jar - S8164143: Improve components for menu items - S8164147: Improve streaming socket output - S8164452: 8u111 L10n resource file update - msgdrop 20 - S8164908: ReflectionFactory support for IIOP and custom serialization - S8165071: Expand TLS support - S8165230: RMIConnection addNotificationListeners failing with specific inputs - S8165344: Update concurrency support - S8165807: PPC64: Backport PPC64 port to OpenJDK 7 - S8165816: jarsigner -verify shows jar unsigned if it was signed with a weak algorithm - S8166381: Back out changes to the java.security file to not disable MD5 - S8166393: disabledAlgorithms property should not be strictly parsed - S8166591: [macos 10.12] Trackpad scrolling of text on OS X 10.12 Sierra is very fast (Trackpad, Retina only) - S8166739: Improve extensibility of ObjectInputFilter information passed to the filter - S8166875: (tz) Support tzdata2016g - S8166878: Connection reset during TLS handshake - S8166988: Improve image processing performance - S8167104: Additional class construction refinements - S8167144: Fix aix after 8022507: SIGSEGV at ParMarkBitMap::verify_clear() - S8167198: Changes to make AIX compile after the merge - S8167223: URL handling improvements - S8167335: Fix build on Linux with 64kb default page size - S8167356: Follow up fix for jdk8 backport of 8164143. Changes for CMenuComponent.m were missed - S8167459: Add debug output for indicating if a chosen ciphersuite was legacy - S8167472: Chrome interop regression with JDK-8148516 - S8167591: Add MD5 to signed JAR restrictions - S8168705: Better ObjectIdentifier validation - S8168714: Tighten ECDSA validation - S8168724: ECDSA signing improvments - S8168728: DSA signing improvments - S8168861: AnchorCertificates uses hardcoded password for cacerts keystore - S8168993: JDK8u121 L10n resource file update - S8169191: (tz) Support tzdata2016i - S8169688: Backout (remove) MD5 from jdk.jar.disabledAlgorithms for January CPU - S8169911: Enhanced tests for jarsigner -verbose -verify after JDK-8163304 - S8170131: Certificates not being blocked by jdk.tls.disabledAlgorithms property - S8170268: 8u121 L10n resource file update - msgdrop 20 - S8173622: Backport of 7180907 is incomplete - S8173849: Fix use of java.util.Base64 in test cases - S8173854: [TEST] Update DHEKeySizing test case following 8076328 & 8081760 ChangeLog: 2017-04-07 Andrew John Hughes <gnu_andrew@member.fsf.org> Bump to icedtea-2.7.0pre10. * Makefile.am: (JDK_UPDATE_VERSION): Bump to 131. (BUILD_VERSION): Reset to b00. (CORBA_CHANGESET): Update to icedtea-2.7.0pre10. (JAXP_CHANGESET): Likewise. (JAXWS_CHANGESET): Likewise. (JDK_CHANGESET): Likewise. (LANGTOOLS_CHANGESET): Likewise. (OPENJDK_CHANGESET): Likewise. (CORBA_SHA256SUM): Likewise. (JAXP_SHA256SUM): Likewise. (JAXWS_SHA256SUM): Likewise. (JDK_SHA256SUM): Likewise. (LANGTOOLS_SHA256SUM): Likewise. (OPENJDK_SHA256SUM): Likewise. (install-data-local): Install blacklisted.certs. * NEWS: Updated. * configure.ac: Bump to 2.7.0pre10. * hotspot.map.in: Update to icedtea-2.7.0pre10. * patches/boot/ecj-diamond.patch, Regenerated. Add new cases in com.sun.jndi.cosnaming.CNCtx, com.sun.jndi.cosnaming.CNNameParser, com.sun.jndi.cosnaming.IiopUrl, com.sun.jndi.dns.DnsContextFactory, com.sun.jndi.dns.DnsName, com.sun.jndi.dns.NameNode, com.sun.jndi.dns.ResourceRecords, com.sun.jndi.ldap.EventSupport, com.sun.jndi.ldap.LdapClient, com.sun.jndi.ldap.LdapCtxFactory, com.sun.jndi.ldap.LdapCtx, com.sun.jndi.ldap.LdapName, com.sun.jndi.ldap.LdapResult, com.sun.jndi.ldap.LdapSchemaParser, com.sun.jndi.ldap.NamingEventNotifier, com.sun.jndi.ldap.Obj, com.sun.jndi.ldap.pool.Connections, com.sun.jndi.ldap.pool.Pool, com.sun.jndi.ldap.sasl.LdapSasl, com.sun.jndi.toolkit.ctx.Continuation, com.sun.jndi.toolkit.dir.HierMemDirCtx, com.sun.jndi.toolkit.dir.SearchFilter, com.sun.jndi.toolkit.url.GenericURLContext, com.sun.naming.internal.FactoryEnumeration, com.sun.naming.internal.ResourceManager, com.sun.naming.internal.VersionHelper, java.net.SocketPermission, java.net.URLConnection, java.net.URL, java.util.logging.LogRecord, javax.naming.directory.BasicAttribute, javax.naming.directory.BasicAttributes, javax.naming.ldap.InitialLdapContext, javax.naming.ldap.LdapName, javax.naming.ldap.Rdn, javax.naming.ldap.Rdn, javax.naming.ldap.Rfc2253Parser, javax.naming.NamingImpl, javax.naming.Reference, javax.naming.spi.DirectoryManager, javax.naming.spi.NamingManager, org.jcp.xml.dsig.internal.dom.Policy, sun.awt.im.ExecutableInputMethodManager, sun.awt.im.InputContext, sun.misc.ObjectInputFilter, sun.net.TransferProtocolClient, sun.net.www.protocol.http.AuthenticationHeader, sun.net.www.protocol.http.HttpURLConnection. sun.security.ssl.ExtensionType, sun.security.ssl.SupportedEllipticCurvesExtension, sun.security.ssl.SupportedEllipticPointFormatsExtension, sun.security.tools.jarsigner.Main, sun.security.util.UntrustedCertificates, sun.security.util.AnchorCertificates, sun.security.util.DisabledAlgorithmConstraints and sun.security.x509.X509CertImpl. * patches/boot/ecj-multicatch.patch: Regenerated. Add new cases in com.sun.naming.internal.ResourceManager, sun.net.www.protocol.http.HttpURLConnection, sun.reflect.ReflectionFactory, sun.security.x509.X509CertImpl, com.sun.net.httpserver.spi.HttpServerProvider, sun.net.ftp.FtpClientProvider, com.sun.jndi.ldap.AbstractLdapNamingEnumeration, com.sun.jndi.ldap.Connection and com.sun.jndi.ldap.LdapCtx. Drop case in sun.security.util.UntrustedCertificates. * patches/boot/ecj-stringswitch.patch: Regenerated. Add new cases in com.sun.jndi.ldap.LdapCtx and org.jcp.xml.dsig.internal.dom.Policy. * patches/boot/ecj-trywithresources.patch: Regenerated. Updated case in sun.security.util.UntrustedCertificates. Add new cases in com.sun.jndi.ldap.Obj, sun.security.util.AnchorCertificates and sun.security.tools.jarsigner.Main. * patches/boot/ecj-underscored_literals.patch: Move case from sun.security.ssl.ServerHandshaker to sun.security.util.Parsing. * patches/pr2124.patch, Extend following changes made in 8148516. * patches/rh1022017.patch: Adapt to changes made in 8148516.
author Andrew John Hughes <gnu_andrew@member.fsf.org>
date Fri, 14 Apr 2017 07:14:20 +0100
parents 11416bb1b308
children e9659e584b7c
line wrap: on
line source

diff -Nru openjdk-boot.orig/jdk/src/share/classes/com/sun/java/util/jar/pack/ClassReader.java openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/ClassReader.java
--- openjdk-boot.orig/jdk/src/share/classes/com/sun/java/util/jar/pack/ClassReader.java	2016-09-19 11:44:50.000000000 +0100
+++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/ClassReader.java	2017-04-04 13:15:36.557971350 +0100
@@ -350,19 +350,16 @@
             if (attrCommands != null) {
                 Attribute.Layout lkey = Attribute.keyForLookup(ctype, name);
                 String cmd = attrCommands.get(lkey);
-                if (cmd != null) {
-                    switch (cmd) {
-                        case "pass":
-                            String message1 = "passing attribute bitwise in " + h;
-                            throw new Attribute.FormatException(message1, ctype, name, cmd);
-                        case "error":
-                            String message2 = "attribute not allowed in " + h;
-                            throw new Attribute.FormatException(message2, ctype, name, cmd);
-                        case "strip":
-                            skip(length, name + " attribute in " + h);
-                            continue;
-                    }
-                }
+                if ("pass".equals(cmd)) {
+                    String message1 = "passing attribute bitwise in " + h;
+                    throw new Attribute.FormatException(message1, ctype, name, cmd);
+                } else if ("error".equals(cmd)) {
+                    String message2 = "attribute not allowed in " + h;
+                    throw new Attribute.FormatException(message2, ctype, name, cmd);
+                } else if ("strip".equals(cmd)) {
+                    skip(length, name + " attribute in " + h);
+                    continue;
+                 }
             }
             // Find canonical instance of the requested attribute.
             Attribute a = Attribute.lookup(Package.attrDefs, ctype, name);
diff -Nru openjdk-boot.orig/jdk/src/share/classes/com/sun/java/util/jar/pack/Driver.java openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/Driver.java
--- openjdk-boot.orig/jdk/src/share/classes/com/sun/java/util/jar/pack/Driver.java	2016-09-19 11:44:50.000000000 +0100
+++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/Driver.java	2017-04-04 13:15:36.557971350 +0100
@@ -73,16 +73,14 @@
         {
             // Non-standard, undocumented "--unpack" switch enables unpack mode.
             String arg0 = av.isEmpty() ? "" : av.get(0);
-            switch (arg0) {
-                case "--pack":
+            if ("--pack".equals(arg0))
                 av.remove(0);
-                    break;
-                case "--unpack":
-                av.remove(0);
-                doPack = false;
-                doUnpack = true;
-                    break;
-            }
+            else if ("--unpack".equals(arg0))
+                {
+                    av.remove(0);
+                    doPack = false;
+                    doUnpack = true;
+                }
         }
 
         // Collect engine properties here:
@@ -182,21 +180,16 @@
         // Deal with remaining non-engine properties:
         for (String opt : avProps.keySet()) {
             String val = avProps.get(opt);
-            switch (opt) {
-                case "--repack":
-                    doRepack = true;
-                    break;
-                case "--no-gzip":
-                    doZip = (val == null);
-                    break;
-                case "--log-file=":
-                    logFile = val;
-                    break;
-                default:
-                    throw new InternalError(MessageFormat.format(
-                            RESOURCE.getString(DriverResource.BAD_OPTION),
-                            opt, avProps.get(opt)));
-            }
+            if ("--repack".equals(opt))
+                doRepack = true;
+            else if ("--no-gzip".equals(opt))
+                doZip = (val == null);
+            else if ("--log-file=".equals(opt))
+                logFile = val;
+            else
+                throw new InternalError(MessageFormat.format(
+                                                             RESOURCE.getString(DriverResource.BAD_OPTION),
+                                                             opt, avProps.get(opt)));
         }
 
         if (logFile != null && !logFile.equals("")) {
diff -Nru openjdk-boot.orig/jdk/src/share/classes/com/sun/java/util/jar/pack/Package.java openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/Package.java
--- openjdk-boot.orig/jdk/src/share/classes/com/sun/java/util/jar/pack/Package.java	2016-09-19 11:44:50.000000000 +0100
+++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/Package.java	2017-04-04 13:15:36.557971350 +0100
@@ -1107,30 +1107,25 @@
         // what is one of { Debug, Compile, Constant, Exceptions, InnerClasses }
         if (verbose > 0)
             Utils.log.info("Stripping "+what.toLowerCase()+" data and attributes...");
-        switch (what) {
-            case "Debug":
-                strip("SourceFile");
-                strip("LineNumberTable");
-                strip("LocalVariableTable");
-                strip("LocalVariableTypeTable");
-                break;
-            case "Compile":
-                // Keep the inner classes normally.
-                // Although they have no effect on execution,
-                // the Reflection API exposes them, and JCK checks them.
-                // NO: // strip("InnerClasses");
-                strip("Deprecated");
-                strip("Synthetic");
-                break;
-            case "Exceptions":
-                // Keep the exceptions normally.
-                // Although they have no effect on execution,
-                // the Reflection API exposes them, and JCK checks them.
-                strip("Exceptions");
-                break;
-            case "Constant":
-                stripConstantFields();
-                break;
+        if ("Debug".equals(what)) {
+            strip("SourceFile");
+            strip("LineNumberTable");
+            strip("LocalVariableTable");
+            strip("LocalVariableTypeTable");
+        } else if ("Compile".equals(what)) {
+            // Keep the inner classes normally.
+            // Although they have no effect on execution,
+            // the Reflection API exposes them, and JCK checks them.
+            // NO: // strip("InnerClasses");
+            strip("Deprecated");
+            strip("Synthetic");
+        } else if ("Exceptions".equals(what)) {
+            // Keep the exceptions normally.
+            // Although they have no effect on execution,
+            // the Reflection API exposes them, and JCK checks them.
+            strip("Exceptions");
+        } else if ("Constant".equals(what)) {
+            stripConstantFields();
         }
     }
 
diff -Nru openjdk-boot.orig/jdk/src/share/classes/com/sun/security/ntlm/NTLM.java openjdk-boot/jdk/src/share/classes/com/sun/security/ntlm/NTLM.java
--- openjdk-boot.orig/jdk/src/share/classes/com/sun/security/ntlm/NTLM.java	2016-09-19 11:44:50.000000000 +0100
+++ openjdk-boot/jdk/src/share/classes/com/sun/security/ntlm/NTLM.java	2017-04-04 13:15:36.557971350 +0100
@@ -65,17 +65,23 @@
 
     protected NTLM(String version) throws NTLMException {
         if (version == null) version = "LMv2/NTLMv2";
-        switch (version) {
-            case "LM": v = NTLM; writeLM = true; writeNTLM = false; break;
-            case "NTLM": v = NTLM; writeLM = false; writeNTLM = true; break;
-            case "LM/NTLM": v = NTLM; writeLM = writeNTLM = true; break;
-            case "NTLM2": v = NTLM2; writeLM = writeNTLM = true; break;
-            case "LMv2": v = NTLMv2; writeLM = true; writeNTLM = false; break;
-            case "NTLMv2": v = NTLMv2; writeLM = false; writeNTLM = true; break;
-            case "LMv2/NTLMv2": v = NTLMv2; writeLM = writeNTLM = true; break;
-            default: throw new NTLMException(NTLMException.BAD_VERSION,
-                    "Unknown version " + version);
-        }
+        if (version.equals("LM"))
+          { v = NTLM; writeLM = true; writeNTLM = false; }
+        else if (version.equals("NTLM"))
+          { v = NTLM; writeLM = false; writeNTLM = true; }
+        else if (version.equals("LM/NTLM"))
+          { v = NTLM; writeLM = writeNTLM = true; }
+        else if (version.equals("NTLM2"))
+          { v = NTLM2; writeLM = writeNTLM = true; }
+        else if (version.equals("LMv2"))
+          { v = NTLMv2; writeLM = true; writeNTLM = false; }
+        else if (version.equals("NTLMv2"))
+          { v = NTLMv2; writeLM = false; writeNTLM = true; }
+        else if (version.equals("LMv2/NTLMv2"))
+          { v = NTLMv2; writeLM = writeNTLM = true; }
+        else
+          throw new NTLMException(NTLMException.BAD_VERSION,
+                                  "Unknown version " + version);
         try {
             fac = SecretKeyFactory.getInstance ("DES");
             cipher = Cipher.getInstance ("DES/ECB/NoPadding");
diff -Nru openjdk-boot.orig/jdk/src/share/classes/com/sun/security/sasl/digest/DigestMD5Base.java openjdk-boot/jdk/src/share/classes/com/sun/security/sasl/digest/DigestMD5Base.java
--- openjdk-boot.orig/jdk/src/share/classes/com/sun/security/sasl/digest/DigestMD5Base.java	2016-09-19 11:44:50.000000000 +0100
+++ openjdk-boot/jdk/src/share/classes/com/sun/security/sasl/digest/DigestMD5Base.java	2017-04-04 13:15:36.557971350 +0100
@@ -1579,45 +1579,42 @@
         KeySpec spec = null;
         SecretKeyFactory desFactory =
             SecretKeyFactory.getInstance(desStrength);
-        switch (desStrength) {
-            case "des":
-                spec = new DESKeySpec(subkey1, 0);
-                if (logger.isLoggable(Level.FINEST)) {
-                    traceOutput(DP_CLASS_NAME, "makeDesKeys",
-                        "DIGEST42:DES key input: ", input);
-                    traceOutput(DP_CLASS_NAME, "makeDesKeys",
-                        "DIGEST43:DES key parity-adjusted: ", subkey1);
-                    traceOutput(DP_CLASS_NAME, "makeDesKeys",
-                        "DIGEST44:DES key material: ", ((DESKeySpec)spec).getKey());
-                    logger.log(Level.FINEST, "DIGEST45: is parity-adjusted? {0}",
-                        Boolean.valueOf(DESKeySpec.isParityAdjusted(subkey1, 0)));
-                }
-                break;
-            case "desede":
-                // Generate second subkey using second 7 bytes
-                byte[] subkey2 = addDesParity(input, 7, 7);
-                // Construct 24-byte encryption-decryption-encryption sequence
-                byte[] ede = new byte[subkey1.length*2+subkey2.length];
-                System.arraycopy(subkey1, 0, ede, 0, subkey1.length);
-                System.arraycopy(subkey2, 0, ede, subkey1.length, subkey2.length);
-                System.arraycopy(subkey1, 0, ede, subkey1.length+subkey2.length,
-                    subkey1.length);
-                spec = new DESedeKeySpec(ede, 0);
-                if (logger.isLoggable(Level.FINEST)) {
-                    traceOutput(DP_CLASS_NAME, "makeDesKeys",
-                        "DIGEST46:3DES key input: ", input);
-                    traceOutput(DP_CLASS_NAME, "makeDesKeys",
-                        "DIGEST47:3DES key ede: ", ede);
-                    traceOutput(DP_CLASS_NAME, "makeDesKeys",
-                        "DIGEST48:3DES key material: ",
-                        ((DESedeKeySpec)spec).getKey());
-                    logger.log(Level.FINEST, "DIGEST49: is parity-adjusted? ",
-                        Boolean.valueOf(DESedeKeySpec.isParityAdjusted(ede, 0)));
-                }
-                break;
-            default:
-                throw new IllegalArgumentException("Invalid DES strength:" +
-                    desStrength);
+        if ("des".equals(desStrength)) {
+            spec = new DESKeySpec(subkey1, 0);
+            if (logger.isLoggable(Level.FINEST)) {
+                traceOutput(DP_CLASS_NAME, "makeDesKeys",
+                            "DIGEST42:DES key input: ", input);
+                traceOutput(DP_CLASS_NAME, "makeDesKeys",
+                            "DIGEST43:DES key parity-adjusted: ", subkey1);
+                traceOutput(DP_CLASS_NAME, "makeDesKeys",
+                            "DIGEST44:DES key material: ", ((DESKeySpec)spec).getKey());
+                logger.log(Level.FINEST, "DIGEST45: is parity-adjusted? {0}",
+                           Boolean.valueOf(DESKeySpec.isParityAdjusted(subkey1, 0)));
+            }
+        } else if ("desede".equals(desStrength)) {
+            // Generate second subkey using second 7 bytes
+            byte[] subkey2 = addDesParity(input, 7, 7);
+            // Construct 24-byte encryption-decryption-encryption sequence
+            byte[] ede = new byte[subkey1.length*2+subkey2.length];
+            System.arraycopy(subkey1, 0, ede, 0, subkey1.length);
+            System.arraycopy(subkey2, 0, ede, subkey1.length, subkey2.length);
+            System.arraycopy(subkey1, 0, ede, subkey1.length+subkey2.length,
+                             subkey1.length);
+            spec = new DESedeKeySpec(ede, 0);
+            if (logger.isLoggable(Level.FINEST)) {
+                traceOutput(DP_CLASS_NAME, "makeDesKeys",
+                            "DIGEST46:3DES key input: ", input);
+                traceOutput(DP_CLASS_NAME, "makeDesKeys",
+                            "DIGEST47:3DES key ede: ", ede);
+                traceOutput(DP_CLASS_NAME, "makeDesKeys",
+                            "DIGEST48:3DES key material: ",
+                            ((DESedeKeySpec)spec).getKey());
+                logger.log(Level.FINEST, "DIGEST49: is parity-adjusted? ",
+                           Boolean.valueOf(DESedeKeySpec.isParityAdjusted(ede, 0)));
+            }
+        } else {
+            throw new IllegalArgumentException("Invalid DES strength:" +
+                                               desStrength);
         }
         return desFactory.generateSecret(spec);
     }
diff -Nru openjdk-boot.orig/jdk/src/share/classes/com/sun/security/sasl/digest/DigestMD5Server.java openjdk-boot/jdk/src/share/classes/com/sun/security/sasl/digest/DigestMD5Server.java
--- openjdk-boot.orig/jdk/src/share/classes/com/sun/security/sasl/digest/DigestMD5Server.java	2016-09-19 11:44:50.000000000 +0100
+++ openjdk-boot/jdk/src/share/classes/com/sun/security/sasl/digest/DigestMD5Server.java	2017-04-04 13:15:36.557971350 +0100
@@ -461,23 +461,19 @@
 
         // Check that QOP is one sent by server
         byte cQop;
-        switch (negotiatedQop) {
-            case "auth":
-                cQop = NO_PROTECTION;
-                break;
-            case "auth-int":
-                cQop = INTEGRITY_ONLY_PROTECTION;
-                integrity = true;
-                rawSendSize = sendMaxBufSize - 16;
-                break;
-            case "auth-conf":
-                cQop = PRIVACY_PROTECTION;
-                integrity = privacy = true;
-                rawSendSize = sendMaxBufSize - 26;
-                break;
-            default:
-                throw new SaslException("DIGEST-MD5: digest response format " +
-                    "violation. Invalid QOP: " + negotiatedQop);
+        if ("auth".equals(negotiatedQop)) {
+            cQop = NO_PROTECTION;
+        } else if ("auth-int".equals(negotiatedQop)) {
+            cQop = INTEGRITY_ONLY_PROTECTION;
+            integrity = true;
+            rawSendSize = sendMaxBufSize - 16;
+        } else if ("auth-conf".equals(negotiatedQop)) {
+            cQop = PRIVACY_PROTECTION;
+            integrity = privacy = true;
+            rawSendSize = sendMaxBufSize - 26;
+        } else {
+            throw new SaslException("DIGEST-MD5: digest response format " +
+                                    "violation. Invalid QOP: " + negotiatedQop);
         }
         if ((cQop&allQop) == 0) {
             throw new SaslException("DIGEST-MD5: server does not support " +
diff -Nru openjdk-boot.orig/jdk/src/share/classes/com/sun/security/sasl/ntlm/NTLMClient.java openjdk-boot/jdk/src/share/classes/com/sun/security/sasl/ntlm/NTLMClient.java
--- openjdk-boot.orig/jdk/src/share/classes/com/sun/security/sasl/ntlm/NTLMClient.java	2016-09-19 11:44:50.000000000 +0100
+++ openjdk-boot/jdk/src/share/classes/com/sun/security/sasl/ntlm/NTLMClient.java	2017-04-04 13:15:36.557971350 +0100
@@ -205,13 +205,12 @@
         if (!isComplete()) {
             throw new IllegalStateException("authentication not complete");
         }
-        switch (propName) {
-            case Sasl.QOP:
-                return "auth";
-            case NTLM_DOMAIN:
-                return client.getDomain();
-            default:
-                return null;
+        if (Sasl.QOP.equals(propName)) {
+            return "auth";
+        } else if (NTLM_DOMAIN.equals(propName)) {
+            return client.getDomain();
+        } else {
+            return null;
         }
     }
 
diff -Nru openjdk-boot.orig/jdk/src/share/classes/com/sun/security/sasl/ntlm/NTLMServer.java openjdk-boot/jdk/src/share/classes/com/sun/security/sasl/ntlm/NTLMServer.java
--- openjdk-boot.orig/jdk/src/share/classes/com/sun/security/sasl/ntlm/NTLMServer.java	2016-09-19 11:44:50.000000000 +0100
+++ openjdk-boot/jdk/src/share/classes/com/sun/security/sasl/ntlm/NTLMServer.java	2017-04-04 13:15:36.557971350 +0100
@@ -219,13 +219,12 @@
         if (!isComplete()) {
             throw new IllegalStateException("authentication not complete");
         }
-        switch (propName) {
-            case Sasl.QOP:
-                return "auth";
-            case NTLM_HOSTNAME:
-                return hostname;
-            default:
-                return null;
+        if (Sasl.QOP.equals(propName)) {
+            return "auth";
+        } else if (NTLM_HOSTNAME.equals(propName)) {
+            return hostname;
+        } else {
+            return null;
         }
     }
 
diff -Nru openjdk-boot.orig/jdk/src/share/classes/com/sun/security/sasl/util/AbstractSaslImpl.java openjdk-boot/jdk/src/share/classes/com/sun/security/sasl/util/AbstractSaslImpl.java
--- openjdk-boot.orig/jdk/src/share/classes/com/sun/security/sasl/util/AbstractSaslImpl.java	2016-09-19 11:44:50.000000000 +0100
+++ openjdk-boot/jdk/src/share/classes/com/sun/security/sasl/util/AbstractSaslImpl.java	2017-04-04 13:15:36.561971285 +0100
@@ -155,23 +155,22 @@
         if (!completed) {
             throw new IllegalStateException("SASL authentication not completed");
         }
-        switch (propName) {
-            case Sasl.QOP:
-                if (privacy) {
-                    return "auth-conf";
-                } else if (integrity) {
-                    return "auth-int";
-                } else {
-                    return "auth";
-                }
-            case Sasl.MAX_BUFFER:
-                return Integer.toString(recvMaxBufSize);
-            case Sasl.RAW_SEND_SIZE:
-                return Integer.toString(rawSendSize);
-            case MAX_SEND_BUF:
-                return Integer.toString(sendMaxBufSize);
-            default:
-                return null;
+        if (Sasl.QOP.equals(propName)) {
+            if (privacy) {
+                return "auth-conf";
+            } else if (integrity) {
+                return "auth-int";
+            } else {
+                return "auth";
+            }
+        } else if (Sasl.MAX_BUFFER.equals(propName)) {
+            return Integer.toString(recvMaxBufSize);
+        } else if (Sasl.RAW_SEND_SIZE.equals(propName)) {
+            return Integer.toString(rawSendSize);
+        } else if (MAX_SEND_BUF.equals(propName)) {
+            return Integer.toString(sendMaxBufSize);
+        } else {
+            return null;
         }
     }
 
diff -Nru openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/MethodHandleNatives.java openjdk-boot/jdk/src/share/classes/java/lang/invoke/MethodHandleNatives.java
--- openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/MethodHandleNatives.java	2016-09-19 11:44:50.000000000 +0100
+++ openjdk-boot/jdk/src/share/classes/java/lang/invoke/MethodHandleNatives.java	2017-04-04 13:15:36.557971350 +0100
@@ -328,12 +328,11 @@
                                      Object[] appendixResult) {
         try {
             if (defc == MethodHandle.class && refKind == REF_invokeVirtual) {
-                switch (name) {
-                case "invoke":
-                    return Invokers.genericInvokerMethod(fixMethodType(callerClass, type), appendixResult);
-                case "invokeExact":
-                    return Invokers.exactInvokerMethod(fixMethodType(callerClass, type), appendixResult);
-                }
+	      if ("invoke".equals(name)) {
+		return Invokers.genericInvokerMethod(fixMethodType(callerClass, type), appendixResult);
+	      } else if ("invokeExact".equals(name)) {
+		return Invokers.exactInvokerMethod(fixMethodType(callerClass, type), appendixResult);
+	      }
             }
         } catch (Throwable ex) {
             if (ex instanceof LinkageError)
@@ -403,124 +402,120 @@
     // this method is also called by test/sun/reflect/CallerSensitiveFinder
     // to validate the hand-maintained list
     private static boolean isCallerSensitiveMethod(Class<?> defc, String method) {
-        switch (method) {
-        case "doPrivileged":
-        case "doPrivilegedWithCombiner":
+	if ("doPrivileged".equals(method) ||
+	    "doPrivilegedWithCombiner".equals(method)) {
             return defc == java.security.AccessController.class;
-        case "checkMemberAccess":
-            return defc == java.lang.SecurityManager.class;
-        case "getUnsafe":
-            return defc == sun.misc.Unsafe.class;
-        case "lookup":
-            return defc == java.lang.invoke.MethodHandles.class;
-        case "invoke":
-            return defc == java.lang.reflect.Method.class;
-        case "get":
-        case "getBoolean":
-        case "getByte":
-        case "getChar":
-        case "getShort":
-        case "getInt":
-        case "getLong":
-        case "getFloat":
-        case "getDouble":
-        case "set":
-        case "setBoolean":
-        case "setByte":
-        case "setChar":
-        case "setShort":
-        case "setInt":
-        case "setLong":
-        case "setFloat":
-        case "setDouble":
-            return defc == java.lang.reflect.Field.class;
-        case "newInstance":
-            if (defc == java.lang.reflect.Constructor.class)  return true;
-            if (defc == java.lang.Class.class)  return true;
-            break;
-        case "getFields":
-            return defc == java.lang.Class.class ||
-                   defc == javax.sql.rowset.serial.SerialJavaObject.class;
-        case "forName":
-        case "getClassLoader":
-        case "getClasses":
-        case "getMethods":
-        case "getConstructors":
-        case "getDeclaredClasses":
-        case "getDeclaredFields":
-        case "getDeclaredMethods":
-        case "getDeclaredConstructors":
-        case "getField":
-        case "getMethod":
-        case "getConstructor":
-        case "getDeclaredField":
-        case "getDeclaredMethod":
-        case "getDeclaredConstructor":
-        case "getDeclaringClass":
-        case "getEnclosingClass":
-        case "getEnclosingMethod":
-        case "getEnclosingConstructor":
-            return defc == java.lang.Class.class;
-        case "getConnection":
-        case "getDriver":
-        case "getDrivers":
-        case "deregisterDriver":
-            return defc == java.sql.DriverManager.class;
-        case "newUpdater":
-            if (defc == java.util.concurrent.atomic.AtomicIntegerFieldUpdater.class)  return true;
-            if (defc == java.util.concurrent.atomic.AtomicLongFieldUpdater.class)  return true;
-            if (defc == java.util.concurrent.atomic.AtomicReferenceFieldUpdater.class)  return true;
-            break;
-        case "getContextClassLoader":
-            return defc == java.lang.Thread.class;
-        case "getPackage":
-        case "getPackages":
-            return defc == java.lang.Package.class;
-        case "getParent":
-        case "getSystemClassLoader":
-            return defc == java.lang.ClassLoader.class;
-        case "load":
-        case "loadLibrary":
-            if (defc == java.lang.Runtime.class)  return true;
-            if (defc == java.lang.System.class)  return true;
-            break;
-        case "getCallerClass":
-            if (defc == sun.reflect.Reflection.class)  return true;
-            if (defc == java.lang.System.class)  return true;
-            break;
-        case "getCallerClassLoader":
-            return defc == java.lang.ClassLoader.class;
-        case "registerAsParallelCapable":
-            return defc == java.lang.ClassLoader.class;
-        case "getInvocationHandler":
-        case "getProxyClass":
-        case "newProxyInstance":
-            return defc == java.lang.reflect.Proxy.class;
-        case "asInterfaceInstance":
-            return defc == java.lang.invoke.MethodHandleProxies.class;
-        case "getBundle":
-        case "clearCache":
-            return defc == java.util.ResourceBundle.class;
-        case "getType":
-            return defc == java.io.ObjectStreamField.class;
-        case "forClass":
-            return defc == java.io.ObjectStreamClass.class;
-        case "getLogger":
-            return defc == java.util.logging.Logger.class;
-        case "getAnonymousLogger":
-            return defc == java.util.logging.Logger.class;
-        }
-        return false;
+	} else if ("checkMemberAccess".equals(method)) {
+             return defc == java.lang.SecurityManager.class;
+        } else if ("getUnsafe".equals(method)) {
+             return defc == sun.misc.Unsafe.class;
+	} else if ("lookup".equals(method)) {
+             return defc == java.lang.invoke.MethodHandles.class;
+	} else if ("invoke".equals(method)) {
+             return defc == java.lang.reflect.Method.class;
+	} else if ("get".equals(method) ||
+		   "getBoolean".equals(method) ||
+		   "getByte".equals(method) ||
+		   "getChar".equals(method) ||
+		   "getShort".equals(method) ||
+		   "getInt".equals(method) ||
+		   "getLong".equals(method) ||
+		   "getFloat".equals(method) ||
+		   "getDouble".equals(method) ||
+		   "set".equals(method) ||
+		   "setBoolean".equals(method) ||
+		   "setByte".equals(method) ||
+		   "setChar".equals(method) ||
+		   "setShort".equals(method) ||
+		   "setInt".equals(method) ||
+		   "setLong".equals(method) ||
+		   "setFloat".equals(method) ||
+		   "setDouble".equals(method)) {
+             return defc == java.lang.reflect.Field.class;
+	} else if ("newInstance".equals(method)) {
+             if (defc == java.lang.reflect.Constructor.class)  return true;
+             if (defc == java.lang.Class.class)  return true;
+	} else if ("getFields".equals(method)) {
+             return defc == java.lang.Class.class ||
+                    defc == javax.sql.rowset.serial.SerialJavaObject.class;
+	} else if ("forName".equals(method) ||
+		   "getClassLoader".equals(method) ||
+		   "getClasses".equals(method) ||
+		   "getFields".equals(method) ||
+		   "getMethods".equals(method) ||
+		   "getConstructors".equals(method) ||
+		   "getDeclaredClasses".equals(method) ||
+		   "getDeclaredFields".equals(method) ||
+		   "getDeclaredMethods".equals(method) ||
+		   "getDeclaredConstructors".equals(method) ||
+		   "getField".equals(method) ||
+		   "getMethod".equals(method) ||
+		   "getConstructor".equals(method) ||
+		   "getDeclaredField".equals(method) ||
+		   "getDeclaredMethod".equals(method) ||
+		   "getDeclaredConstructor".equals(method) ||
+		   "getDeclaringClass".equals(method) ||
+		   "getEnclosingClass".equals(method) ||
+		   "getEnclosingMethod".equals(method) ||
+		   "getEnclosingConstructor".equals(method)) {
+             return defc == java.lang.Class.class;
+	} else if ("getConnection".equals(method) ||
+		   "getDriver".equals(method) ||
+		   "getDrivers".equals(method) ||
+		   "deregisterDriver".equals(method)) {
+             return defc == java.sql.DriverManager.class;
+        } else if ("newUpdater".equals(method)) {
+             if (defc == java.util.concurrent.atomic.AtomicIntegerFieldUpdater.class)  return true;
+             if (defc == java.util.concurrent.atomic.AtomicLongFieldUpdater.class)  return true;
+             if (defc == java.util.concurrent.atomic.AtomicReferenceFieldUpdater.class)  return true;
+        } else if ("getContextClassLoader".equals(method)) {
+             return defc == java.lang.Thread.class;
+        } else if ("getPackage".equals(method) ||
+		   "getPackages".equals(method)) {
+             return defc == java.lang.Package.class;
+        } else if ("getParent".equals(method) ||
+		   "getSystemClassLoader".equals(method)) {
+             return defc == java.lang.ClassLoader.class;
+        } else if ("load".equals(method) ||
+		   "loadLibrary".equals(method)) {
+             if (defc == java.lang.Runtime.class)  return true;
+             if (defc == java.lang.System.class)  return true;
+        } else if ("getCallerClass".equals(method)) {
+             if (defc == sun.reflect.Reflection.class)  return true;
+             if (defc == java.lang.System.class)  return true;
+	} else if ("getCallerClassLoader".equals(method)) {
+             return defc == java.lang.ClassLoader.class;
+        } else if ("registerAsParallelCapable".equals(method)) {
+             return defc == java.lang.ClassLoader.class;
+        } else if ("getProxyClass".equals(method) ||
+                   "getInvocationHandler".equals(method) ||
+		   "newProxyInstance".equals(method)) {
+             return defc == java.lang.reflect.Proxy.class;
+        } else if ("asInterfaceInstance".equals(method)) {
+             return defc == java.lang.invoke.MethodHandleProxies.class;
+        } else if ("getBundle".equals(method) ||
+		   "clearCache".equals(method)) {
+             return defc == java.util.ResourceBundle.class;
+        } else if ("getType".equals(method)) {
+             return defc == java.io.ObjectStreamField.class;
+        } else if ("forClass".equals(method)) {
+             return defc == java.io.ObjectStreamClass.class;
+        } else if ("getLogger".equals(method)) {
+             return defc == java.util.logging.Logger.class;
+        } else if ("getAnonymousLogger".equals(method)) {
+             return defc == java.util.logging.Logger.class;
+         }
+         return false;
     }
 
 
     private static boolean canBeCalledVirtual(MemberName mem) {
         assert(mem.isInvocable());
         Class<?> defc = mem.getDeclaringClass();
-        switch (mem.getName()) {
-        case "checkMemberAccess":
+	String memName = mem.getName();
+	if ("checkMemberAccess".equals(memName)) {
             return canBeCalledVirtual(mem, java.lang.SecurityManager.class);
-        case "getContextClassLoader":
+        } else if ("getContextClassLoader".equals(memName)) {
             return canBeCalledVirtual(mem, java.lang.Thread.class);
         }
         return false;
diff -Nru openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/MethodHandleProxies.java openjdk-boot/jdk/src/share/classes/java/lang/invoke/MethodHandleProxies.java
--- openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/MethodHandleProxies.java	2016-09-19 11:44:50.000000000 +0100
+++ openjdk-boot/jdk/src/share/classes/java/lang/invoke/MethodHandleProxies.java	2017-04-04 13:15:36.557971350 +0100
@@ -269,14 +269,16 @@
 
     private static
     boolean isObjectMethod(Method m) {
-        switch (m.getName()) {
-        case "toString":
+        String name = m.getName();
+        if ("toString".equals(name)) {
             return (m.getReturnType() == String.class
                     && m.getParameterTypes().length == 0);
-        case "hashCode":
+        }
+        if ("hashCode".equals(name)) {
             return (m.getReturnType() == int.class
                     && m.getParameterTypes().length == 0);
-        case "equals":
+        }
+        if ("equals".equals(name)) {
             return (m.getReturnType() == boolean.class
                     && m.getParameterTypes().length == 1
                     && m.getParameterTypes()[0] == Object.class);
@@ -287,12 +289,14 @@
     private static
     Object callObjectMethod(Object self, Method m, Object[] args) {
         assert(isObjectMethod(m)) : m;
-        switch (m.getName()) {
-        case "toString":
+        String name = m.getName();
+        if ("toString".equals(name)) {
             return self.getClass().getName() + "@" + Integer.toHexString(self.hashCode());
-        case "hashCode":
+        }
+        if ("hashCode".equals(name)) {
             return System.identityHashCode(self);
-        case "equals":
+        }
+        if ("equals".equals(name)) {
             return (self == args[0]);
         }
         return null;
diff -Nru openjdk-boot.orig/jdk/src/share/classes/sun/launcher/LauncherHelper.java openjdk-boot/jdk/src/share/classes/sun/launcher/LauncherHelper.java
--- openjdk-boot.orig/jdk/src/share/classes/sun/launcher/LauncherHelper.java	2016-09-19 11:44:50.000000000 +0100
+++ openjdk-boot/jdk/src/share/classes/sun/launcher/LauncherHelper.java	2017-04-04 13:15:36.557971350 +0100
@@ -119,24 +119,20 @@
         String optStr = (opts.length > 1 && opts[1] != null)
                 ? opts[1].trim()
                 : "all";
-        switch (optStr) {
-            case "vm":
+        if ("vm".equals(optStr))
+            printVmSettings(ostream, initialHeapSize, maxHeapSize,
+                            stackSize, isServer);
+        else if ("properties".equals(optStr))
+            printProperties(ostream);
+        else if ("locale".equals(optStr))
+            printLocale(ostream);
+        else
+            {
                 printVmSettings(ostream, initialHeapSize, maxHeapSize,
-                        stackSize, isServer);
-                break;
-            case "properties":
+                                stackSize, isServer);
                 printProperties(ostream);
-                break;
-            case "locale":
                 printLocale(ostream);
-                break;
-            default:
-                printVmSettings(ostream, initialHeapSize, maxHeapSize,
-                        stackSize, isServer);
-                printProperties(ostream);
-                printLocale(ostream);
-                break;
-        }
+            }
     }
 
     /*
diff -Nru openjdk-boot.orig/jdk/src/share/classes/sun/reflect/annotation/AnnotationInvocationHandler.java openjdk-boot/jdk/src/share/classes/sun/reflect/annotation/AnnotationInvocationHandler.java
--- openjdk-boot.orig/jdk/src/share/classes/sun/reflect/annotation/AnnotationInvocationHandler.java	2016-09-19 11:44:50.000000000 +0100
+++ openjdk-boot/jdk/src/share/classes/sun/reflect/annotation/AnnotationInvocationHandler.java	2017-04-04 13:15:36.557971350 +0100
@@ -65,14 +65,12 @@
         if (paramTypes.length != 0)
             throw new AssertionError("Too many parameters for an annotation method");
 
-        switch(member) {
-        case "toString":
+	if ("toString".equals(member))
             return toStringImpl();
-        case "hashCode":
+	if ("hashCode".equals(member))
             return hashCodeImpl();
-        case "annotationType":
+	if ("annotationType".equals(member))
             return type;
-        }
 
         // Handle annotation member accessors
         Object result = memberValues.get(member);
diff -Nru openjdk-boot.orig/jdk/src/share/classes/sun/security/krb5/Config.java openjdk-boot/jdk/src/share/classes/sun/security/krb5/Config.java
--- openjdk-boot.orig/jdk/src/share/classes/sun/security/krb5/Config.java	2016-09-19 11:44:50.000000000 +0100
+++ openjdk-boot/jdk/src/share/classes/sun/security/krb5/Config.java	2017-04-04 13:15:36.557971350 +0100
@@ -428,14 +428,13 @@
         if (s == null) {
             return null;
         }
-        switch (s.toLowerCase(Locale.US)) {
-            case "yes": case "true":
+        String lCase = s.toLowerCase(Locale.US);
+        if ("yes".equals(lCase) || "true".equals(lCase)) {
                 return Boolean.TRUE;
-            case "no": case "false":
+        } else if ("no".equals(lCase) || "false".equals(lCase)) {
                 return Boolean.FALSE;
-            default:
-                return null;
         }
+        return null;
     }
 
     /**
diff -Nru openjdk-boot.orig/jdk/src/share/classes/sun/security/pkcs11/Config.java openjdk-boot/jdk/src/share/classes/sun/security/pkcs11/Config.java
--- openjdk-boot.orig/jdk/src/share/classes/sun/security/pkcs11/Config.java	2016-09-19 11:44:50.000000000 +0100
+++ openjdk-boot/jdk/src/share/classes/sun/security/pkcs11/Config.java	2017-04-04 13:15:36.557971350 +0100
@@ -574,13 +574,12 @@
 
     private boolean parseBoolean() throws IOException {
         String val = parseWord();
-        switch (val) {
-            case "true":
-                return true;
-            case "false":
-                return false;
-            default:
-                throw excToken("Expected boolean value, read:");
+        if ("true".equals(val)) {
+            return true;
+        } else if ("false".equals(val)) {
+            return false;
+        } else {
+            throw excToken("Expected boolean value, read:");
         }
     }
 
@@ -917,15 +916,14 @@
 
     private String parseOperation() throws IOException {
         String op = parseWord();
-        switch (op) {
-            case "*":
-                return TemplateManager.O_ANY;
-            case "generate":
-                return TemplateManager.O_GENERATE;
-            case "import":
-                return TemplateManager.O_IMPORT;
-            default:
-                throw excLine("Unknown operation " + op);
+        if ("*".equals(op)) {
+            return TemplateManager.O_ANY;
+        } else if ("generate".equals(op)) {
+            return TemplateManager.O_GENERATE;
+        } else if ("import".equals(op)) {
+            return TemplateManager.O_IMPORT;
+        } else {
+            throw excLine("Unknown operation " + op);
         }
     }
 
diff -Nru openjdk-boot.orig/jdk/src/share/classes/sun/security/pkcs11/P11Key.java openjdk-boot/jdk/src/share/classes/sun/security/pkcs11/P11Key.java
--- openjdk-boot.orig/jdk/src/share/classes/sun/security/pkcs11/P11Key.java	2016-09-19 11:44:50.000000000 +0100
+++ openjdk-boot/jdk/src/share/classes/sun/security/pkcs11/P11Key.java	2017-04-04 13:15:36.557971350 +0100
@@ -304,22 +304,21 @@
     // we assume that all components of public keys are always accessible
     static PublicKey publicKey(Session session, long keyID, String algorithm,
             int keyLength, CK_ATTRIBUTE[] attributes) {
-        switch (algorithm) {
-            case "RSA":
-                return new P11RSAPublicKey
-                    (session, keyID, algorithm, keyLength, attributes);
-            case "DSA":
-                return new P11DSAPublicKey
-                    (session, keyID, algorithm, keyLength, attributes);
-            case "DH":
-                return new P11DHPublicKey
-                    (session, keyID, algorithm, keyLength, attributes);
-            case "EC":
-                return new P11ECPublicKey
-                    (session, keyID, algorithm, keyLength, attributes);
-            default:
-                throw new ProviderException
-                    ("Unknown public key algorithm " + algorithm);
+        if ("RSA".equals(algorithm)) {
+            return new P11RSAPublicKey
+                (session, keyID, algorithm, keyLength, attributes);
+        } else if ("DSA".equals(algorithm)) {
+            return new P11DSAPublicKey
+                (session, keyID, algorithm, keyLength, attributes);
+        } else if ("DH".equals(algorithm)) {
+            return new P11DHPublicKey
+                (session, keyID, algorithm, keyLength, attributes);
+        } else if ("EC".equals(algorithm)) {
+            return new P11ECPublicKey
+                (session, keyID, algorithm, keyLength, attributes);
+        } else {
+            throw new ProviderException
+                ("Unknown public key algorithm " + algorithm);
         }
     }
 
@@ -334,43 +333,42 @@
             return new P11PrivateKey
                 (session, keyID, algorithm, keyLength, attributes);
         } else {
-            switch (algorithm) {
-                case "RSA":
-                    // XXX better test for RSA CRT keys (single getAttributes() call)
-                    // we need to determine whether this is a CRT key
-                    // see if we can obtain the public exponent
-                    // this should also be readable for sensitive/extractable keys
-                    CK_ATTRIBUTE[] attrs2 = new CK_ATTRIBUTE[] {
-                        new CK_ATTRIBUTE(CKA_PUBLIC_EXPONENT),
-                    };
-                    boolean crtKey;
-                    try {
-                        session.token.p11.C_GetAttributeValue
-                            (session.id(), keyID, attrs2);
-                        crtKey = (attrs2[0].pValue instanceof byte[]);
-                    } catch (PKCS11Exception e) {
-                        // ignore, assume not available
-                        crtKey = false;
-                    }
-                    if (crtKey) {
-                        return new P11RSAPrivateKey
-                                (session, keyID, algorithm, keyLength, attributes);
-                    } else {
-                        return new P11RSAPrivateNonCRTKey
-                                (session, keyID, algorithm, keyLength, attributes);
-                    }
-                case "DSA":
-                    return new P11DSAPrivateKey
-                            (session, keyID, algorithm, keyLength, attributes);
-                case "DH":
-                    return new P11DHPrivateKey
-                            (session, keyID, algorithm, keyLength, attributes);
-                case "EC":
-                    return new P11ECPrivateKey
-                            (session, keyID, algorithm, keyLength, attributes);
-                default:
-                    throw new ProviderException
-                            ("Unknown private key algorithm " + algorithm);
+            if ("RSA".equals(algorithm)) {
+                // XXX better test for RSA CRT keys (single getAttributes() call)
+                // we need to determine whether this is a CRT key
+                // see if we can obtain the public exponent
+                // this should also be readable for sensitive/extractable keys
+                CK_ATTRIBUTE[] attrs2 = new CK_ATTRIBUTE[] {
+                    new CK_ATTRIBUTE(CKA_PUBLIC_EXPONENT),
+                };
+                boolean crtKey;
+                try {
+                    session.token.p11.C_GetAttributeValue
+                        (session.id(), keyID, attrs2);
+                    crtKey = (attrs2[0].pValue instanceof byte[]);
+                } catch (PKCS11Exception e) {
+                    // ignore, assume not available
+                    crtKey = false;
+                }
+                if (crtKey) {
+                    return new P11RSAPrivateKey
+                        (session, keyID, algorithm, keyLength, attributes);
+                } else {
+                    return new P11RSAPrivateNonCRTKey
+                        (session, keyID, algorithm, keyLength, attributes);
+                }
+            } else if ("DSA".equals(algorithm)) {
+                return new P11DSAPrivateKey
+                    (session, keyID, algorithm, keyLength, attributes);
+            } else if ("DH".equals(algorithm)) {
+                return new P11DHPrivateKey
+                    (session, keyID, algorithm, keyLength, attributes);
+            } else if ("EC".equals(algorithm)) {
+                return new P11ECPrivateKey
+                    (session, keyID, algorithm, keyLength, attributes);
+            } else {
+                throw new ProviderException
+                    ("Unknown private key algorithm " + algorithm);
             }
         }
     }
diff -Nru openjdk-boot.orig/jdk/src/share/classes/sun/security/provider/certpath/X509CertPath.java openjdk-boot/jdk/src/share/classes/sun/security/provider/certpath/X509CertPath.java
--- openjdk-boot.orig/jdk/src/share/classes/sun/security/provider/certpath/X509CertPath.java	2016-09-19 11:44:50.000000000 +0100
+++ openjdk-boot/jdk/src/share/classes/sun/security/provider/certpath/X509CertPath.java	2017-04-04 13:15:36.557971350 +0100
@@ -153,15 +153,12 @@
             throws CertificateException {
         super("X.509");
 
-        switch (encoding) {
-            case PKIPATH_ENCODING:
-                certs = parsePKIPATH(is);
-                break;
-            case PKCS7_ENCODING:
-                certs = parsePKCS7(is);
-                break;
-            default:
-                throw new CertificateException("unsupported encoding");
+        if (PKIPATH_ENCODING.equals(encoding)) {
+	    certs = parsePKIPATH(is);
+	} else if (PKCS7_ENCODING.equals(encoding)) {
+	    certs = parsePKCS7(is);
+	} else {
+	    throw new CertificateException("unsupported encoding");
         }
     }
 
@@ -344,13 +341,12 @@
      */
     public byte[] getEncoded(String encoding)
             throws CertificateEncodingException {
-        switch (encoding) {
-            case PKIPATH_ENCODING:
-                return encodePKIPATH();
-            case PKCS7_ENCODING:
-                return encodePKCS7();
-            default:
-                throw new CertificateEncodingException("unsupported encoding");
+        if (PKIPATH_ENCODING.equals(encoding)) {
+	    return encodePKIPATH();
+	} else if (PKCS7_ENCODING.equals(encoding)) {
+	    return encodePKCS7();
+	} else {
+	    throw new CertificateEncodingException("unsupported encoding");
         }
     }
 
diff -Nru openjdk-boot.orig/jdk/src/share/classes/sun/security/ssl/HandshakeMessage.java openjdk-boot/jdk/src/share/classes/sun/security/ssl/HandshakeMessage.java
--- openjdk-boot.orig/jdk/src/share/classes/sun/security/ssl/HandshakeMessage.java	2016-09-19 11:44:50.000000000 +0100
+++ openjdk-boot/jdk/src/share/classes/sun/security/ssl/HandshakeMessage.java	2017-04-04 13:15:36.557971350 +0100
@@ -818,16 +818,13 @@
             sig = JsseJce.getSignature(
                         preferableSignatureAlgorithm.getAlgorithmName());
         } else {
-                switch (algorithm) {
-                    case "DSA":
-                        sig = JsseJce.getSignature(JsseJce.SIGNATURE_DSA);
-                        break;
-                    case "RSA":
-                        sig = RSASignature.getInstance();
-                        break;
-                    default:
-                        throw new SSLKeyException("neither an RSA or a DSA key");
-                }
+            if ("DSA".equals(algorithm)) {
+                sig = JsseJce.getSignature(JsseJce.SIGNATURE_DSA);
+            } else if ("RSA".equals(algorithm)) {
+                sig = RSASignature.getInstance();
+            } else {
+                throw new SSLKeyException("neither an RSA or a DSA key");
+            }
         }
 
         sig.initVerify(publicKey);
@@ -1107,14 +1104,13 @@
 
     private static Signature getSignature(String keyAlgorithm)
             throws NoSuchAlgorithmException {
-            switch (keyAlgorithm) {
-                case "EC":
-                    return JsseJce.getSignature(JsseJce.SIGNATURE_ECDSA);
-                case "RSA":
-                    return RSASignature.getInstance();
-                default:
-                    throw new NoSuchAlgorithmException("neither an RSA or a EC key");
-            }
+        if ("EC".equals(keyAlgorithm)) {
+            return JsseJce.getSignature(JsseJce.SIGNATURE_ECDSA);
+        } else if ("RSA".equals(keyAlgorithm)) {
+            return RSASignature.getInstance();
+        } else {
+            throw new NoSuchAlgorithmException("neither an RSA or a EC key");
+        }
     }
 
     private void updateSignature(Signature sig, byte clntNonce[],
@@ -1622,17 +1618,16 @@
      */
     private static Signature getSignature(ProtocolVersion protocolVersion,
             String algorithm) throws GeneralSecurityException {
-            switch (algorithm) {
-                case "RSA":
-                    return RSASignature.getInternalInstance();
-                case "DSA":
-                    return JsseJce.getSignature(JsseJce.SIGNATURE_RAWDSA);
-                case "EC":
-                    return JsseJce.getSignature(JsseJce.SIGNATURE_RAWECDSA);
-                default:
-                    throw new SignatureException("Unrecognized algorithm: "
-                        + algorithm);
-            }
+        if ("RSA".equals(algorithm)) {
+            return RSASignature.getInternalInstance();
+        } else if ("DSA".equals(algorithm)) {
+            return JsseJce.getSignature(JsseJce.SIGNATURE_RAWDSA);
+        } else if ("EC".equals(algorithm)) {
+            return JsseJce.getSignature(JsseJce.SIGNATURE_RAWECDSA);
+        } else {
+            throw new SignatureException("Unrecognized algorithm: "
+                                         + algorithm);
+        }
     }
 
     /*
diff -Nru openjdk-boot.orig/jdk/src/share/classes/sun/security/ssl/X509KeyManagerImpl.java openjdk-boot/jdk/src/share/classes/sun/security/ssl/X509KeyManagerImpl.java
--- openjdk-boot.orig/jdk/src/share/classes/sun/security/ssl/X509KeyManagerImpl.java	2016-09-19 11:44:50.000000000 +0100
+++ openjdk-boot/jdk/src/share/classes/sun/security/ssl/X509KeyManagerImpl.java	2017-04-04 13:15:36.557971350 +0100
@@ -525,43 +525,38 @@
                 if (ku != null) {
                     String algorithm = cert.getPublicKey().getAlgorithm();
                     boolean kuSignature = getBit(ku, 0);
-                    switch (algorithm) {
-                        case "RSA":
-                            // require either signature bit
-                            // or if server also allow key encipherment bit
-                            if (kuSignature == false) {
-                                if ((this == CLIENT) || (getBit(ku, 2) == false)) {
-                                    return CheckResult.EXTENSION_MISMATCH;
-                                }
-                            }
-                            break;
-                        case "DSA":
-                            // require signature bit
-                            if (kuSignature == false) {
-                                return CheckResult.EXTENSION_MISMATCH;
-                            }
-                            break;
-                        case "DH":
-                            // require keyagreement bit
-                            if (getBit(ku, 4) == false) {
-                                return CheckResult.EXTENSION_MISMATCH;
-                            }
-                            break;
-                        case "EC":
-                            // require signature bit
-                            if (kuSignature == false) {
-                                return CheckResult.EXTENSION_MISMATCH;
-                            }
-                            // For servers, also require key agreement.
-                            // This is not totally accurate as the keyAgreement bit
-                            // is only necessary for static ECDH key exchange and
-                            // not ephemeral ECDH. We leave it in for now until
-                            // there are signs that this check causes problems
-                            // for real world EC certificates.
-                            if ((this == SERVER) && (getBit(ku, 4) == false)) {
+                    if ("RSA".equals(algorithm)) {
+                        // require either signature bit
+                        // or if server also allow key encipherment bit
+                        if (kuSignature == false) {
+                            if ((this == CLIENT) || (getBit(ku, 2) == false)) {
                                 return CheckResult.EXTENSION_MISMATCH;
                             }
-                            break;
+                        }
+                    } else if ("DSA".equals(algorithm)) {
+                        // require signature bit
+                        if (kuSignature == false) {
+                            return CheckResult.EXTENSION_MISMATCH;
+                        }
+                    } else if ("DH".equals(algorithm)) {
+                        // require keyagreement bit
+                        if (getBit(ku, 4) == false) {
+                            return CheckResult.EXTENSION_MISMATCH;
+                        }
+                    } else if ("EC".equals(algorithm)) {
+                        // require signature bit
+                        if (kuSignature == false) {
+                            return CheckResult.EXTENSION_MISMATCH;
+                        }
+                        // For servers, also require key agreement.
+                        // This is not totally accurate as the keyAgreement bit
+                        // is only necessary for static ECDH key exchange and
+                        // not ephemeral ECDH. We leave it in for now until
+                        // there are signs that this check causes problems
+                        // for real world EC certificates.
+                        if ((this == SERVER) && (getBit(ku, 4) == false)) {
+                            return CheckResult.EXTENSION_MISMATCH;
+                        }
                     }
                 }
             } catch (CertificateException e) {
diff -Nru openjdk-boot.orig/jdk/src/share/classes/sun/security/util/DisabledAlgorithmConstraints.java openjdk-boot/jdk/src/share/classes/sun/security/util/DisabledAlgorithmConstraints.java
--- openjdk-boot.orig/jdk/src/share/classes/sun/security/util/DisabledAlgorithmConstraints.java	2016-09-19 11:44:50.000000000 +0100
+++ openjdk-boot/jdk/src/share/classes/sun/security/util/DisabledAlgorithmConstraints.java	2017-04-04 13:16:32.753067002 +0100
@@ -387,19 +387,23 @@
             GE;         // ">="
 
             static Operator of(String s) {
-                switch (s) {
-                    case "==":
-                        return EQ;
-                    case "!=":
-                        return NE;
-                    case "<":
-                        return LT;
-                    case "<=":
-                        return LE;
-                    case ">":
-                        return GT;
-                    case ">=":
-                        return GE;
+                if ("==".equals(s)) {
+                    return EQ;
+                }
+                if ("!=".equals(s)) {
+                    return NE;
+                }
+                if ("<".equals(s)) {
+                    return LT;
+                }
+                if ("<=".equals(s)) {
+                    return LE;
+                }
+                if (">".equals(s)) {
+                    return GT;
+                }
+                if (">=".equals(s)) {
+                    return GE;
                 }
 
                 throw new IllegalArgumentException("Error in security " +
diff -Nru openjdk-boot.orig/jdk/src/solaris/classes/sun/security/smartcardio/PlatformPCSC.java openjdk-boot/jdk/src/solaris/classes/sun/security/smartcardio/PlatformPCSC.java
--- openjdk-boot.orig/jdk/src/solaris/classes/sun/security/smartcardio/PlatformPCSC.java	2016-09-19 11:44:50.000000000 +0100
+++ openjdk-boot/jdk/src/solaris/classes/sun/security/smartcardio/PlatformPCSC.java	2017-04-04 13:15:36.557971350 +0100
@@ -101,19 +101,17 @@
         k = lib.indexOf("$ARCH");
         if (k != -1) {
             String arch = System.getProperty("os.arch");
-            switch (arch) {
-            case "amd64":
+	    if ("amd64".equals(arch)) {
                 arch = "x86_64";
-                break;
-            case "ppc":
+	    }
+	    if ("ppc".equals(arch)) {
                 arch = "powerpc";
-                break;
-            case "ppc64":
+	    }
+	    if ("ppc64".equals(arch)) {
                 arch = "powerpc64";
-                break;
-            case "ppc64le":
+	    }
+            if ("ppc64le".equals(arch)) {
                 arch = "powerpc64le";
-                break;
             }
             lib = replace(k, lib, "$ARCH", arch);
         }
diff -Nru openjdk-boot.orig/jdk/src/share/classes/com/sun/jndi/ldap/LdapCtx.java openjdk-boot/jdk/src/share/classes/com/sun/jndi/ldap/LdapCtx.java
--- openjdk-boot.orig/jdk/src/share/classes/com/sun/jndi/ldap/LdapCtx.java	2017-04-07 15:22:02.796779767 +0100
+++ openjdk-boot/jdk/src/share/classes/com/sun/jndi/ldap/LdapCtx.java	2017-04-07 15:36:19.702877596 +0100
@@ -2163,66 +2163,50 @@
         if (envprops == null || envprops.get(propName) == null) {
             return null;
         }
-        switch (propName) {
-            case REF_SEPARATOR:
-                addrEncodingSeparator = DEFAULT_REF_SEPARATOR;
-                break;
-            case TYPES_ONLY:
+        if (REF_SEPARATOR.equals(propName)) {
+            addrEncodingSeparator = DEFAULT_REF_SEPARATOR;
+        } else if (TYPES_ONLY.equals(propName)) {
                 typesOnly = DEFAULT_TYPES_ONLY;
-                break;
-            case DELETE_RDN:
+        } else if (DELETE_RDN.equals(propName)) {
                 deleteRDN = DEFAULT_DELETE_RDN;
-                break;
-            case DEREF_ALIASES:
-                derefAliases = DEFAULT_DEREF_ALIASES;
-                break;
-            case Context.BATCHSIZE:
-                batchSize = DEFAULT_BATCH_SIZE;
-                break;
-            case REFERRAL_LIMIT:
-                referralHopLimit = DEFAULT_REFERRAL_LIMIT;
-                break;
-            case Context.REFERRAL:
-                setReferralMode(null, true);
-                break;
-            case BINARY_ATTRIBUTES:
-                setBinaryAttributes(null);
-                break;
-            case CONNECT_TIMEOUT:
-                connectTimeout = -1;
-                break;
-            case READ_TIMEOUT:
-                readTimeout = -1;
-                break;
-            case WAIT_FOR_REPLY:
-                waitForReply = true;
-                break;
-            case REPLY_QUEUE_SIZE:
-                replyQueueSize = -1;
-                break;
+        } else if (DEREF_ALIASES.equals(propName)) {
+            derefAliases = DEFAULT_DEREF_ALIASES;
+        } else if (Context.BATCHSIZE.equals(propName)) {
+            batchSize = DEFAULT_BATCH_SIZE;
+        } else if (REFERRAL_LIMIT.equals(propName)) {
+            referralHopLimit = DEFAULT_REFERRAL_LIMIT;
+        } else if (Context.REFERRAL.equals(propName)) {
+            setReferralMode(null, true);
+        } else if (BINARY_ATTRIBUTES.equals(propName)) {
+            setBinaryAttributes(null);
+        } else if (CONNECT_TIMEOUT.equals(propName)) {
+            connectTimeout = -1;
+        } else if (READ_TIMEOUT.equals(propName)) {
+            readTimeout = -1;
+        } else if (WAIT_FOR_REPLY.equals(propName)) {
+            waitForReply = true;
+        } else if (REPLY_QUEUE_SIZE.equals(propName)) {
+            replyQueueSize = -1;
 
             // The following properties affect the connection
 
-            case Context.SECURITY_PROTOCOL:
-                closeConnection(SOFT_CLOSE);
-                // De-activate SSL and reset the context's url and port number
-                if (useSsl && !hasLdapsScheme) {
-                    useSsl = false;
-                    url = null;
-                    if (useDefaultPortNumber) {
-                        port_number = DEFAULT_PORT;
-                    }
+        } else if (Context.SECURITY_PROTOCOL.equals(propName)) {
+            closeConnection(SOFT_CLOSE);
+            // De-activate SSL and reset the context's url and port number
+            if (useSsl && !hasLdapsScheme) {
+                useSsl = false;
+                url = null;
+                if (useDefaultPortNumber) {
+                    port_number = DEFAULT_PORT;
                 }
-                break;
-            case VERSION:
-            case SOCKET_FACTORY:
-                closeConnection(SOFT_CLOSE);
-                break;
-            case Context.SECURITY_AUTHENTICATION:
-            case Context.SECURITY_PRINCIPAL:
-            case Context.SECURITY_CREDENTIALS:
-                sharable = false;
-                break;
+            }
+        } else if (VERSION.equals(propName) ||
+                   SOCKET_FACTORY.equals(propName)) {
+            closeConnection(SOFT_CLOSE);
+        } else if (Context.SECURITY_AUTHENTICATION.equals(propName) ||
+                   Context.SECURITY_PRINCIPAL.equals(propName) ||
+                   Context.SECURITY_CREDENTIALS.equals(propName)) {
+            sharable = false;
         }
 
         // Update environment; reconnection will use new props
@@ -2238,66 +2222,50 @@
             if (propVal == null) {
                 return removeFromEnvironment(propName);
             }
-            switch (propName) {
-                case REF_SEPARATOR:
-                    setRefSeparator((String)propVal);
-                    break;
-                case TYPES_ONLY:
-                    setTypesOnly((String)propVal);
-                    break;
-                case DELETE_RDN:
-                    setDeleteRDN((String)propVal);
-                    break;
-                case DEREF_ALIASES:
-                    setDerefAliases((String)propVal);
-                    break;
-                case Context.BATCHSIZE:
-                    setBatchSize((String)propVal);
-                    break;
-                case REFERRAL_LIMIT:
-                    setReferralLimit((String)propVal);
-                    break;
-                case Context.REFERRAL:
+            if (REF_SEPARATOR.equals(propName)) {
+                setRefSeparator((String)propVal);
+            } else if (TYPES_ONLY.equals(propName)) {
+                setTypesOnly((String)propVal);
+            } else if (DELETE_RDN.equals(propName)) {
+                setDeleteRDN((String)propVal);
+            } else if (DEREF_ALIASES.equals(propName)) {
+                setDerefAliases((String)propVal);
+            } else if (Context.BATCHSIZE.equals(propName)) {
+                setBatchSize((String)propVal);
+            } else if (REFERRAL_LIMIT.equals(propName)) {
+                setReferralLimit((String)propVal);
+            } else if (Context.REFERRAL.equals(propName)) {
                     setReferralMode((String)propVal, true);
-                    break;
-                case BINARY_ATTRIBUTES:
-                    setBinaryAttributes((String)propVal);
-                    break;
-                case CONNECT_TIMEOUT:
-                    setConnectTimeout((String)propVal);
-                    break;
-                case READ_TIMEOUT:
-                    setReadTimeout((String)propVal);
-                    break;
-                case WAIT_FOR_REPLY:
-                    setWaitForReply((String)propVal);
-                    break;
-                case REPLY_QUEUE_SIZE:
-                    setReplyQueueSize((String)propVal);
-                    break;
+            } else if (BINARY_ATTRIBUTES.equals(propName)) {
+                setBinaryAttributes((String)propVal);
+            } else if (CONNECT_TIMEOUT.equals(propName)) {
+                setConnectTimeout((String)propVal);
+            } else if (READ_TIMEOUT.equals(propName)) {
+                setReadTimeout((String)propVal);
+            } else if (WAIT_FOR_REPLY.equals(propName)) {
+                setWaitForReply((String)propVal);
+            } else if (REPLY_QUEUE_SIZE.equals(propName)) {
+                setReplyQueueSize((String)propVal);
 
             // The following properties affect the connection
 
-                case Context.SECURITY_PROTOCOL:
-                    closeConnection(SOFT_CLOSE);
-                    // Activate SSL and reset the context's url and port number
-                    if ("ssl".equals(propVal)) {
-                        useSsl = true;
-                        url = null;
-                        if (useDefaultPortNumber) {
-                            port_number = DEFAULT_SSL_PORT;
-                        }
+            } else if (Context.SECURITY_PROTOCOL.equals(propName)) {
+                closeConnection(SOFT_CLOSE);
+                // Activate SSL and reset the context's url and port number
+                if ("ssl".equals(propVal)) {
+                    useSsl = true;
+                    url = null;
+                    if (useDefaultPortNumber) {
+                        port_number = DEFAULT_SSL_PORT;
                     }
-                    break;
-                case VERSION:
-                case SOCKET_FACTORY:
-                    closeConnection(SOFT_CLOSE);
-                    break;
-                case Context.SECURITY_AUTHENTICATION:
-                case Context.SECURITY_PRINCIPAL:
-                case Context.SECURITY_CREDENTIALS:
-                    sharable = false;
-                    break;
+                }
+            } else if (VERSION.equals(propName) ||
+                       SOCKET_FACTORY.equals(propName)) {
+                closeConnection(SOFT_CLOSE);
+            } else if (Context.SECURITY_AUTHENTICATION.equals(propName) ||
+                       Context.SECURITY_PRINCIPAL.equals(propName) ||
+                       Context.SECURITY_CREDENTIALS.equals(propName)) {
+                sharable = false;
             }
 
             // Update environment; reconnection will use new props
@@ -2414,19 +2382,15 @@
     private void setReferralMode(String ref, boolean update) {
         // First determine the referral mode
         if (ref != null) {
-            switch (ref) {
-                case "follow":
+	    if ("follow".equals(ref)) {
                     handleReferrals = LdapClient.LDAP_REF_FOLLOW;
-                    break;
-                case "throw":
-                    handleReferrals = LdapClient.LDAP_REF_THROW;
-                    break;
-                case "ignore":
-                    handleReferrals = LdapClient.LDAP_REF_IGNORE;
-                    break;
-                default:
-                    throw new IllegalArgumentException(
-                        "Illegal value for " + Context.REFERRAL + " property.");
+	    } else if ("throw".equals(ref)) {
+		handleReferrals = LdapClient.LDAP_REF_THROW;
+	    } else if ( "ignore".equals(ref)) {
+		handleReferrals = LdapClient.LDAP_REF_IGNORE;
+	    } else {
+		throw new IllegalArgumentException(
+                    "Illegal value for " + Context.REFERRAL + " property.");
             }
         } else {
             handleReferrals = DEFAULT_REFERRAL_MODE;
@@ -2449,22 +2413,17 @@
      */
     private void setDerefAliases(String deref) {
         if (deref != null) {
-            switch (deref) {
-                case "never":
-                    derefAliases = 0; // never de-reference aliases
-                    break;
-                case "searching":
-                    derefAliases = 1; // de-reference aliases during searching
-                    break;
-                case "finding":
-                    derefAliases = 2; // de-reference during name resolution
-                    break;
-                case "always":
-                    derefAliases = 3; // always de-reference aliases
-                    break;
-                default:
-                    throw new IllegalArgumentException("Illegal value for " +
-                        DEREF_ALIASES + " property.");
+	    if ("never".equals(deref)) {
+		derefAliases = 0; // never de-reference aliases
+	    } else if ("searching".equals(deref)) {
+		derefAliases = 1; // de-reference aliases during searching
+	    } else if ("finding".equals(deref)) {
+		derefAliases = 2; // de-reference during name resolution
+	    } else if ("always".equals(deref)) {
+		derefAliases = 3; // always de-reference aliases
+	    } else {
+		throw new IllegalArgumentException("Illegal value for " +
+                    DEREF_ALIASES + " property.");
             }
         } else {
             derefAliases = DEFAULT_DEREF_ALIASES;
diff -Nru openjdk-boot.orig/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/Policy.java openjdk-boot/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/Policy.java
--- openjdk-boot.orig/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/Policy.java	2017-04-07 16:43:10.660296981 +0100
+++ openjdk-boot/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/Policy.java	2017-04-07 16:45:55.481614942 +0100
@@ -81,56 +81,48 @@
         for (String entry : entries) {
             String[] tokens = entry.split("\\s");
             String type = tokens[0];
-            switch(type) {
-                case "disallowAlg":
-                    if (tokens.length != 2) {
-                        error(entry);
-                    }
-                    disallowedAlgs.add(URI.create(tokens[1]));
-                    break;
-                case "maxTransforms":
-                    if (tokens.length != 2) {
-                        error(entry);
-                    }
-                    maxTrans = Parsing.parseUnsignedInt(tokens[1]);
-                    break;
-                case "maxReferences":
-                    if (tokens.length != 2) {
-                        error(entry);
-                    }
-                    maxRefs = Parsing.parseUnsignedInt(tokens[1]);
-                    break;
-                case "disallowReferenceUriSchemes":
-                    if (tokens.length == 1) {
-                        error(entry);
-                    }
-                    for (int i = 1; i < tokens.length; i++) {
-                        String scheme = tokens[i];
-                        disallowedRefUriSchemes.add(
-                            scheme.toLowerCase(Locale.ROOT));
-                    }
-                    break;
-                case "minKeySize":
-                    if (tokens.length != 3) {
-                        error(entry);
-                    }
-                    minKeyMap.put(tokens[1],
-                                  Parsing.parseUnsignedInt(tokens[2]));
-                    break;
-                case "noDuplicateIds":
-                    if (tokens.length != 1) {
-                        error(entry);
-                    }
-                    noDuplicateIds = true;
-                    break;
-                case "noRetrievalMethodLoops":
-                    if (tokens.length != 1) {
-                        error(entry);
-                    }
-                    noRMLoops = true;
-                    break;
-                default:
+            if ("disallowAlg".equals(type)) {
+                if (tokens.length != 2) {
                     error(entry);
+                }
+                disallowedAlgs.add(URI.create(tokens[1]));
+            } else if ("maxTransforms".equals(type)) {
+                if (tokens.length != 2) {
+                    error(entry);
+                }
+                maxTrans = Parsing.parseUnsignedInt(tokens[1]);
+            } else if ("maxReferences".equals(type)) {
+                if (tokens.length != 2) {
+                    error(entry);
+                }
+                maxRefs = Parsing.parseUnsignedInt(tokens[1]);
+            } else if ("disallowReferenceUriSchemes".equals(type)) {
+                if (tokens.length == 1) {
+                    error(entry);
+                }
+                for (int i = 1; i < tokens.length; i++) {
+                    String scheme = tokens[i];
+                    disallowedRefUriSchemes.add(
+                        scheme.toLowerCase(Locale.ROOT));
+                }
+            } else if ("minKeySize".equals(type)) {
+                if (tokens.length != 3) {
+                    error(entry);
+                }
+                minKeyMap.put(tokens[1],
+                              Parsing.parseUnsignedInt(tokens[2]));
+            } else if ("noDuplicateIds".equals(type)) {
+                if (tokens.length != 1) {
+                    error(entry);
+                }
+                noDuplicateIds = true;
+            } else if ("noRetrievalMethodLoops".equals(type)) {
+                if (tokens.length != 1) {
+                    error(entry);
+                }
+                noRMLoops = true;
+            } else {
+                error(entry);
             }
         }
     }