diff --git a/.hgtags b/.hgtags index dec3bcf07e919cf1ecd1e3de255704a892aaf4e5..8f2d37fe3edd4c1549108890fe05eafa7fc57d26 100644 --- a/.hgtags +++ b/.hgtags @@ -866,6 +866,7 @@ e03fff22900242d92a97839a9c095bb106bdc68f jdk8u162-b36 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 @@ a8746b41e23a1deda3d0f41ed2eca3d3a4cc74de jdk8u191-b00 f52ece1d8708024735f06e7e3bdc771efbc073d0 jdk8u172-b09 9e9009034e5ce97a97f72c00cd37cf2a638fa1a4 jdk8u172-b10 2a041b1f858dc6a372ac07b8cf5bf6fab879dcc8 jdk8u172-b11 +d902fae6241006af3c4cfc4ce82ebcb3efb9d725 jdk8u181-b01 +baac18e216fb47b4cfa04169b3c3de58d667de7c jdk8u181-b02 +d237c59d14e1c1fb1f750e9cdabcea6e711f4d34 jdk8u181-b03 diff --git a/src/share/classes/com/sun/tools/jdi/VirtualMachineImpl.java b/src/share/classes/com/sun/tools/jdi/VirtualMachineImpl.java index 83547e494556bb7dadc77278a2bef71b53e7a647..8ba62f242f173959a3f6e9327c2c93fe4ef5b321 100644 --- a/src/share/classes/com/sun/tools/jdi/VirtualMachineImpl.java +++ b/src/share/classes/com/sun/tools/jdi/VirtualMachineImpl.java @@ -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 @@ class VirtualMachineImpl extends MirrorImpl 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 @@ class VirtualMachineImpl extends MirrorImpl 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(); diff --git a/src/windows/classes/sun/awt/windows/WToolkit.java b/src/windows/classes/sun/awt/windows/WToolkit.java index 4792306da2d717845f064acef1c566c379cb8698..e639ff7ea99264f455601c10c5d59e9c0ed51d63 100644 --- a/src/windows/classes/sun/awt/windows/WToolkit.java +++ b/src/windows/classes/sun/awt/windows/WToolkit.java @@ -1123,6 +1123,7 @@ public final class WToolkit extends SunToolkit implements Runnable { } if ((e instanceof MouseEvent) && comp.isEnabled() && + comp.isFocusable() && (((comp instanceof TextComponent) && ((TextComponent)comp).isEditable()) || ((comp instanceof JTextComponent) && diff --git a/src/windows/native/sun/windows/awt_Toolkit.cpp b/src/windows/native/sun/windows/awt_Toolkit.cpp index 2027cab6f3523ee1e6ca0094dc5410c9a6b73cb8..f43b1d501f66fea1aff549a27b4199a7f0220dbb 100644 --- a/src/windows/native/sun/windows/awt_Toolkit.cpp +++ b/src/windows/native/sun/windows/awt_Toolkit.cpp @@ -490,8 +490,7 @@ void AwtToolkit::InitTouchKeyboardExeFilePath() { 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; diff --git a/test/java/security/SignedObject/Chain.java b/test/java/security/SignedObject/Chain.java index f5ad1b1e20089915d0f03495c8d4f404747c8840..3c9bad3dd18cb8d5b4ff7a27ccd740054058f182 100644 --- a/test/java/security/SignedObject/Chain.java +++ b/test/java/security/SignedObject/Chain.java @@ -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 @@ public class Chain { 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 @@ public class Chain { } } - 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); diff --git a/test/java/util/zip/InflateIn_DeflateOut.java b/test/java/util/zip/InflateIn_DeflateOut.java index 2c9adab06c97ff219c85f4eef84c369c6109b6b5..8cb73f7cfa27889207fef4180478a8de0cb529fb 100644 --- a/test/java/util/zip/InflateIn_DeflateOut.java +++ b/test/java/util/zip/InflateIn_DeflateOut.java @@ -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 @@ public class InflateIn_DeflateOut { 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 @@ public class InflateIn_DeflateOut { 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 { diff --git a/test/sun/security/pkcs11/ec/ReadCertificates.java b/test/sun/security/pkcs11/ec/ReadCertificates.java index 8311b8d1e2057f36b2a008c93b3315dea62f2f74..82b7f4abc2608ffba0b5adfae5c289cc07e287ff 100644 --- a/test/sun/security/pkcs11/ec/ReadCertificates.java +++ b/test/sun/security/pkcs11/ec/ReadCertificates.java @@ -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 @@ public class ReadCertificates extends PKCS11Test { 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) { diff --git a/test/sun/security/provider/DSA/SupportedDSAParamGen.java b/test/sun/security/provider/DSA/SupportedDSAParamGen.java index 04dd5befe5d9a254e6ae14042b8b29f6df3b796c..b420450ae6972525b661d9f37d9dfbff37ab573f 100644 --- a/test/sun/security/provider/DSA/SupportedDSAParamGen.java +++ b/test/sun/security/provider/DSA/SupportedDSAParamGen.java @@ -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.*;