changeset 13221:6f63ed4babc7

Merge
author asaha
date Wed, 18 Apr 2018 22:38:11 +0000
parents 987519bc6c4b f1be70238ff6
children 9f786031deff
files .hgtags src/windows/native/java/net/NetworkInterface_winXP.c src/windows/native/sun/windows/awt_Component.cpp
diffstat 8 files changed, 42 insertions(+), 38 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Tue Apr 10 00:56:00 2018 -0700
+++ b/.hgtags	Wed Apr 18 22:38:11 2018 +0000
@@ -866,6 +866,7 @@
 b6195815c4bbbf275f1aefd337d805eb66f2b5b8 jdk8u171-b00
 f1792a59f1fa20e47fe5d4561754012440564bec jdk8u171-b01
 cac020298633fc736f5e21afddf00145665ef0a7 jdk8u171-b02
+e7e27f446209924f66a4bf86738f3e5f2fbbef5f jdk8u181-b00
 c260afc0c5a13407aad4f066f81fba814bb0cbae jdk8u171-b03
 ac700f67341a20ddae093c319da1c65e41edcacd jdk8u171-b04
 863ef3413aa42c15fbdc14fef6732f2741f97046 jdk8u171-b05
@@ -889,3 +890,6 @@
 f52ece1d8708024735f06e7e3bdc771efbc073d0 jdk8u172-b09
 9e9009034e5ce97a97f72c00cd37cf2a638fa1a4 jdk8u172-b10
 2a041b1f858dc6a372ac07b8cf5bf6fab879dcc8 jdk8u172-b11
+d902fae6241006af3c4cfc4ce82ebcb3efb9d725 jdk8u181-b01
+baac18e216fb47b4cfa04169b3c3de58d667de7c jdk8u181-b02
+d237c59d14e1c1fb1f750e9cdabcea6e711f4d34 jdk8u181-b03
--- a/src/share/classes/com/sun/tools/jdi/VirtualMachineImpl.java	Tue Apr 10 00:56:00 2018 -0700
+++ b/src/share/classes/com/sun/tools/jdi/VirtualMachineImpl.java	Wed Apr 18 22:38:11 2018 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -674,20 +674,18 @@
             versionInfo().jdwpMinor >= 6;
     }
     public boolean canGetInstanceInfo() {
-        if (versionInfo().jdwpMajor < 1 ||
-            versionInfo().jdwpMinor < 6) {
+        if (versionInfo().jdwpMajor > 1 ||
+            versionInfo().jdwpMinor >= 6) {
+            validateVM();
+            return hasNewCapabilities() &&
+                capabilitiesNew().canGetInstanceInfo;
+        } else {
             return false;
         }
-        validateVM();
-        return hasNewCapabilities() &&
-            capabilitiesNew().canGetInstanceInfo;
     }
     public boolean canUseSourceNameFilters() {
-        if (versionInfo().jdwpMajor < 1 ||
-            versionInfo().jdwpMinor < 6) {
-            return false;
-        }
-        return true;
+        return versionInfo().jdwpMajor > 1 ||
+            versionInfo().jdwpMinor >= 6;
     }
     public boolean canForceEarlyReturn() {
         validateVM();
@@ -703,12 +701,8 @@
             capabilitiesNew().canGetSourceDebugExtension;
     }
     public boolean canGetClassFileVersion() {
-        if ( versionInfo().jdwpMajor < 1 &&
-             versionInfo().jdwpMinor  < 6) {
-            return false;
-        } else {
-            return true;
-        }
+        return versionInfo().jdwpMajor > 1 ||
+            versionInfo().jdwpMinor >= 6;
     }
     public boolean canGetConstantPool() {
         validateVM();
--- a/src/windows/classes/sun/awt/windows/WToolkit.java	Tue Apr 10 00:56:00 2018 -0700
+++ b/src/windows/classes/sun/awt/windows/WToolkit.java	Wed Apr 18 22:38:11 2018 +0000
@@ -1123,6 +1123,7 @@
         }
 
         if ((e instanceof MouseEvent) && comp.isEnabled() &&
+            comp.isFocusable() &&
             (((comp instanceof TextComponent) &&
                     ((TextComponent)comp).isEditable()) ||
                 ((comp instanceof JTextComponent) &&
--- a/src/windows/native/sun/windows/awt_Toolkit.cpp	Tue Apr 10 00:56:00 2018 -0700
+++ b/src/windows/native/sun/windows/awt_Toolkit.cpp	Wed Apr 18 22:38:11 2018 +0000
@@ -490,8 +490,7 @@
 HWND AwtToolkit::GetTouchKeyboardWindow() {
     const TCHAR wndClassName[] = _T("IPTip_Main_Window");
     HWND hwnd = ::FindWindow(wndClassName, NULL);
-    if ((hwnd != NULL) && ::IsWindow(hwnd) && ::IsWindowEnabled(hwnd) &&
-        ::IsWindowVisible(hwnd)) {
+    if ((hwnd != NULL) && ::IsWindow(hwnd) && ::IsWindowEnabled(hwnd)) {
         return hwnd;
     }
     return NULL;
--- a/test/java/security/SignedObject/Chain.java	Tue Apr 10 00:56:00 2018 -0700
+++ b/test/java/security/SignedObject/Chain.java	Wed Apr 18 22:38:11 2018 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -142,8 +142,17 @@
             PrivateKey[] privKeys = new PrivateKey[N];
             PublicKey[] pubKeys = new PublicKey[N];
             PublicKey[] anotherPubKeys = new PublicKey[N];
-            KeyPairGenerator kpg = KeyPairGenerator.getInstance(
-                    test.keyAlg.name);
+            Signature signature;
+            KeyPairGenerator kpg;
+            if (test.provider != Provider.Default) {
+                signature = Signature.getInstance(test.sigAlg.name,
+                        test.provider.name);
+                kpg = KeyPairGenerator.getInstance(
+                    test.keyAlg.name, test.provider.name);
+            } else {
+                signature = Signature.getInstance(test.sigAlg.name);
+                kpg = KeyPairGenerator.getInstance(test.keyAlg.name);
+            }
             for (int j=0; j < N; j++) {
                 if (test.keySize != -1) {
                     kpg.initialize(test.keySize);
@@ -162,14 +171,6 @@
                 }
             }
 
-            Signature signature;
-            if (test.provider != Provider.Default) {
-                signature = Signature.getInstance(test.sigAlg.name,
-                        test.provider.name);
-            } else {
-                signature = Signature.getInstance(test.sigAlg.name);
-            }
-
             // Create a chain of signed objects
             SignedObject[] objects = new SignedObject[N];
             objects[0] = new SignedObject(str, privKeys[0], signature);
--- a/test/java/util/zip/InflateIn_DeflateOut.java	Tue Apr 10 00:56:00 2018 -0700
+++ b/test/java/util/zip/InflateIn_DeflateOut.java	Wed Apr 18 22:38:11 2018 +0000
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @bug 4206909 4813885 8189789
+ * @bug 4206909 4813885 8189789 8196854
  * @summary Test basic functionality of DeflaterOutputStream/InflaterInputStream and GZIPOutputStream/GZIPInputStream, including flush
  */
 
@@ -153,7 +153,6 @@
         OutputStream output = new FlushableGZIPOutputStream(byteOutStream);
 
         byte[] data = new byte[random.nextInt(1024 * 1024)];
-        byte[] buf = new byte[data.length];
         random.nextBytes(data);
 
         output.write(data);
@@ -175,7 +174,7 @@
         int numRead;
         byte[] b = new byte[4 * 1024];
         try {
-            while ((numRead = gzis.read(buf)) >= 0) {
+            while ((numRead = gzis.read(b)) >= 0) {
                 baos.write(b, 0, numRead);
             }
         } finally {
--- a/test/sun/security/pkcs11/ec/ReadCertificates.java	Tue Apr 10 00:56:00 2018 -0700
+++ b/test/sun/security/pkcs11/ec/ReadCertificates.java	Wed Apr 18 22:38:11 2018 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @bug 6405536 6414980
+ * @bug 6405536 6414980 8051972
  * @summary Make sure that we can parse certificates using various named curves
  *   and verify their signatures
  * @author Andreas Sterbenz
@@ -153,8 +153,14 @@
                 signer = getRandomCert(certList);
             } while (cert.getIssuerX500Principal().equals(signer.getSubjectX500Principal()));
             try {
-                cert.verify(signer.getPublicKey());
-                throw new Exception("Verified invalid signature");
+                PublicKey signerPublicKey = signer.getPublicKey();
+                cert.verify(signerPublicKey);
+                // Ignore false positives
+                if (cert.getPublicKey().equals(signerPublicKey)) {
+                    System.out.println("OK: self-signed certificate detected");
+                } else {
+                    throw new Exception("Verified invalid signature");
+                }
             } catch (SignatureException e) {
                 System.out.println("OK: " + e);
             } catch (InvalidKeyException e) {
--- a/test/sun/security/provider/DSA/SupportedDSAParamGen.java	Tue Apr 10 00:56:00 2018 -0700
+++ b/test/sun/security/provider/DSA/SupportedDSAParamGen.java	Wed Apr 18 22:38:11 2018 +0000
@@ -29,7 +29,7 @@
  * @run main/timeout=300 SupportedDSAParamGen 1024 160
  * @run main/timeout=300 SupportedDSAParamGen 2048 224
  * @run main/timeout=300 SupportedDSAParamGen 2048 256
- * @run main/timeout=450 SupportedDSAParamGen 3072 256
+ * @run main/timeout=700 SupportedDSAParamGen 3072 256
  */
 import java.security.*;
 import java.security.spec.*;