aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ. Duke <duke@openjdk.org>2017-07-05 20:31:01 +0200
committerJ. Duke <duke@openjdk.org>2017-07-05 20:31:01 +0200
commit549e22fc90eb6721b7e315f4ea88361d2ba23ec1 (patch)
treedcae9fb768ebcbafe100697eb5f7c632baebda16
parent6bed31f1c5ee733a87a3e6795a313eb145733174 (diff)
parentee04c5414af8a618af1ecd881e197e1ec3599a31 (diff)
downloadlibcore-549e22fc90eb6721b7e315f4ea88361d2ba23ec1.tar.gz
Merge
-rw-r--r--.hgtags-top-repo1
-rw-r--r--common/autoconf/basics.m446
-rw-r--r--common/autoconf/basics_windows.m42
-rw-r--r--common/autoconf/generated-configure.sh2190
-rw-r--r--common/autoconf/toolchain.m49
-rw-r--r--common/autoconf/toolchain_windows.m4203
-rw-r--r--corba/.hgtags1
-rw-r--r--hotspot/.hgtags1
-rw-r--r--hotspot/make/windows/makefiles/compile.make3
-rw-r--r--hotspot/src/cpu/aarch64/vm/aarch64.ad8
-rw-r--r--hotspot/src/cpu/aarch64/vm/frame_aarch64.inline.hpp12
-rw-r--r--hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp14
-rw-r--r--hotspot/test/compiler/floatingpoint/ModNaN.java2
-rw-r--r--jaxp/.hgtags1
-rw-r--r--jaxws/.hgtags1
-rw-r--r--jdk/.hgtags1
-rw-r--r--jdk/src/java.base/share/classes/com/sun/crypto/provider/JceKeyStore.java2
-rw-r--r--jdk/src/java.base/share/classes/com/sun/crypto/provider/PBEKeyFactory.java2
-rw-r--r--jdk/src/java.base/share/classes/com/sun/crypto/provider/SunJCE.java2
-rw-r--r--jdk/src/java.base/share/classes/com/sun/net/ssl/KeyManagerFactory.java2
-rw-r--r--jdk/src/java.base/share/classes/com/sun/net/ssl/TrustManagerFactory.java2
-rw-r--r--jdk/src/java.base/share/classes/java/lang/Runtime.java252
-rw-r--r--jdk/src/java.base/share/classes/java/lang/invoke/LambdaForm.java6
-rw-r--r--jdk/src/java.base/share/classes/java/nio/file/AtomicMoveNotSupportedException.java2
-rw-r--r--jdk/src/java.base/share/classes/java/security/AccessControlContext.java2
-rw-r--r--jdk/src/java.base/share/classes/java/security/AccessController.java2
-rw-r--r--jdk/src/java.base/share/classes/java/security/AllPermission.java2
-rw-r--r--jdk/src/java.base/share/classes/java/security/BasicPermission.java4
-rw-r--r--jdk/src/java.base/share/classes/java/security/CodeSource.java2
-rw-r--r--jdk/src/java.base/share/classes/java/security/Identity.java4
-rw-r--r--jdk/src/java.base/share/classes/java/security/IdentityScope.java2
-rw-r--r--jdk/src/java.base/share/classes/java/security/KeyStore.java2
-rw-r--r--jdk/src/java.base/share/classes/java/security/Permissions.java8
-rw-r--r--jdk/src/java.base/share/classes/java/security/Policy.java6
-rw-r--r--jdk/src/java.base/share/classes/java/security/ProtectionDomain.java2
-rw-r--r--jdk/src/java.base/share/classes/java/security/Provider.java20
-rw-r--r--jdk/src/java.base/share/classes/java/security/SecureRandom.java2
-rw-r--r--jdk/src/java.base/share/classes/java/security/Security.java4
-rw-r--r--jdk/src/java.base/share/classes/java/security/Signature.java2
-rw-r--r--jdk/src/java.base/share/classes/java/security/Signer.java2
-rw-r--r--jdk/src/java.base/share/classes/java/security/UnresolvedPermission.java2
-rw-r--r--jdk/src/java.base/share/classes/java/security/UnresolvedPermissionCollection.java6
-rw-r--r--jdk/src/java.base/share/classes/java/security/cert/CertPathBuilder.java2
-rw-r--r--jdk/src/java.base/share/classes/java/security/cert/CertPathValidator.java2
-rw-r--r--jdk/src/java.base/share/classes/java/security/cert/CertStore.java2
-rw-r--r--jdk/src/java.base/share/classes/java/security/cert/CertificateRevokedException.java2
-rw-r--r--jdk/src/java.base/share/classes/java/security/cert/PKIXParameters.java31
-rw-r--r--jdk/src/java.base/share/classes/java/security/cert/PKIXRevocationChecker.java4
-rw-r--r--jdk/src/java.base/share/classes/java/security/cert/X509CRLSelector.java16
-rw-r--r--jdk/src/java.base/share/classes/java/security/cert/X509CertSelector.java28
-rw-r--r--jdk/src/java.base/share/classes/java/util/JapaneseImperialCalendar.java76
-rw-r--r--jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java2
-rw-r--r--jdk/src/java.base/share/classes/java/util/spi/LocaleServiceProvider.java19
-rw-r--r--jdk/src/java.base/share/classes/javax/crypto/JceSecurity.java4
-rw-r--r--jdk/src/java.base/share/classes/javax/crypto/JceSecurityManager.java2
-rw-r--r--jdk/src/java.base/share/classes/javax/net/ssl/KeyManagerFactory.java2
-rw-r--r--jdk/src/java.base/share/classes/javax/net/ssl/SSLSocketFactory.java2
-rw-r--r--jdk/src/java.base/share/classes/javax/net/ssl/TrustManagerFactory.java2
-rw-r--r--jdk/src/java.base/share/classes/javax/security/auth/Subject.java32
-rw-r--r--jdk/src/java.base/share/classes/javax/security/auth/login/Configuration.java6
-rw-r--r--jdk/src/java.base/share/classes/javax/security/cert/X509Certificate.java2
-rw-r--r--jdk/src/java.base/share/classes/jdk/net/NetworkPermission.java2
-rw-r--r--jdk/src/java.base/share/classes/sun/security/pkcs/PKCS7.java4
-rw-r--r--jdk/src/java.base/share/classes/sun/security/pkcs/PKCS9Attributes.java3
-rw-r--r--jdk/src/java.base/share/classes/sun/security/pkcs/SignerInfo.java2
-rw-r--r--jdk/src/java.base/share/classes/sun/security/provider/SeedGenerator.java6
-rw-r--r--jdk/src/java.base/share/classes/sun/security/ssl/SunJSSE.java2
-rw-r--r--jdk/src/java.base/share/classes/sun/security/util/DerInputStream.java2
-rw-r--r--jdk/src/java.base/share/classes/sun/security/util/ManifestDigester.java2
-rw-r--r--jdk/src/java.base/share/classes/sun/security/util/ManifestEntryVerifier.java6
-rw-r--r--jdk/src/java.base/share/classes/sun/security/util/SignatureFileVerifier.java4
-rw-r--r--jdk/src/java.base/share/classes/sun/security/x509/AVA.java2
-rw-r--r--jdk/src/java.base/share/classes/sun/security/x509/AlgorithmId.java6
-rw-r--r--jdk/src/java.base/share/classes/sun/security/x509/CertificatePolicySet.java2
-rw-r--r--jdk/src/java.base/share/classes/sun/security/x509/GeneralSubtrees.java4
-rw-r--r--jdk/src/java.base/share/classes/sun/security/x509/RDN.java6
-rw-r--r--jdk/src/java.base/share/classes/sun/security/x509/X500Name.java4
-rw-r--r--jdk/src/java.base/share/classes/sun/util/locale/provider/AuxLocaleProviderAdapter.java6
-rw-r--r--jdk/src/java.base/share/classes/sun/util/locale/provider/JRELocaleProviderAdapter.java102
-rw-r--r--jdk/src/java.base/unix/classes/sun/security/provider/NativePRNG.java4
-rw-r--r--jdk/src/java.management/share/classes/com/sun/management/DiagnosticCommandMBean.java4
-rw-r--r--jdk/src/java.management/share/classes/com/sun/management/GarbageCollectionNotificationInfo.java6
-rw-r--r--jdk/src/java.management/share/classes/com/sun/management/GcInfo.java39
-rw-r--r--jdk/src/java.management/share/classes/com/sun/management/VMOption.java48
-rw-r--r--jdk/src/java.prefs/share/classes/java/util/prefs/AbstractPreferences.java54
-rw-r--r--jdk/src/java.prefs/share/classes/java/util/prefs/Preferences.java30
-rw-r--r--jdk/src/java.prefs/unix/classes/java/util/prefs/FileSystemPreferences.java14
-rw-r--r--jdk/src/java.prefs/windows/classes/java/util/prefs/WindowsPreferences.java58
-rw-r--r--jdk/src/java.smartcardio/share/classes/javax/smartcardio/package.html13
-rw-r--r--jdk/src/jdk.attach/share/classes/com/sun/tools/attach/AgentInitializationException.java26
-rw-r--r--jdk/src/jdk.attach/share/classes/com/sun/tools/attach/spi/AttachProvider.java81
-rw-r--r--jdk/src/jdk.httpserver/share/classes/com/sun/net/httpserver/Filter.java13
-rw-r--r--jdk/src/jdk.httpserver/share/classes/com/sun/net/httpserver/Headers.java13
-rw-r--r--jdk/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpExchange.java24
-rw-r--r--jdk/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpServer.java8
-rw-r--r--jdk/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpsConfigurator.java8
-rw-r--r--jdk/src/jdk.httpserver/share/classes/com/sun/net/httpserver/package-info.java8
-rw-r--r--jdk/src/jdk.jdi/share/classes/com/sun/jdi/Bootstrap.java7
-rw-r--r--jdk/src/jdk.jdi/share/classes/com/sun/jdi/Field.java26
-rw-r--r--jdk/src/jdk.jdi/share/classes/com/sun/jdi/JDIPermission.java16
-rw-r--r--jdk/src/jdk.jdi/share/classes/com/sun/jdi/Method.java61
-rw-r--r--jdk/src/jdk.jdi/share/classes/com/sun/jdi/Value.java46
-rw-r--r--jdk/src/jdk.jdi/share/classes/com/sun/jdi/VirtualMachineManager.java16
-rw-r--r--jdk/src/jdk.jdi/share/classes/com/sun/jdi/connect/spi/Connection.java38
-rw-r--r--jdk/src/jdk.jdi/share/classes/com/sun/jdi/doc-files/signature.html6
-rw-r--r--jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/EventSet.java1
-rw-r--r--jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorContendedEnterEvent.java6
-rw-r--r--jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorContendedEnteredEvent.java2
-rw-r--r--jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorWaitEvent.java4
-rw-r--r--jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorWaitedEvent.java4
-rw-r--r--jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/EventRequest.java28
-rw-r--r--jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/EventRequestManager.java18
-rw-r--r--jdk/src/jdk.jdi/share/classes/jdi-overview.html1
-rw-r--r--jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTDomainPrincipal.java50
-rw-r--r--jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTNumericCredential.java38
-rw-r--r--jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSid.java52
-rw-r--r--jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSidDomainPrincipal.java38
-rw-r--r--jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSidGroupPrincipal.java38
-rw-r--r--jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSidPrimaryGroupPrincipal.java38
-rw-r--r--jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSidUserPrincipal.java38
-rw-r--r--jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTUserPrincipal.java50
-rw-r--r--jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/PolicyFile.java133
-rw-r--r--jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/PrincipalComparator.java30
-rw-r--r--jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/SolarisNumericGroupPrincipal.java66
-rw-r--r--jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/SolarisNumericUserPrincipal.java63
-rw-r--r--jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/SolarisPrincipal.java46
-rw-r--r--jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/UnixNumericGroupPrincipal.java66
-rw-r--r--jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/UnixNumericUserPrincipal.java60
-rw-r--r--jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/UnixPrincipal.java46
-rw-r--r--jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/X500Principal.java46
-rw-r--r--jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/JndiLoginModule.java88
-rw-r--r--jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/KeyStoreLoginModule.java80
-rw-r--r--jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/Krb5LoginModule.java377
-rw-r--r--jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/LdapLoginModule.java113
-rw-r--r--jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/NTLoginModule.java62
-rw-r--r--jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/NTSystem.java20
-rw-r--r--jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/SolarisLoginModule.java52
-rw-r--r--jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/SolarisSystem.java12
-rw-r--r--jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/UnixLoginModule.java50
-rw-r--r--jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/UnixSystem.java13
-rw-r--r--jdk/test/TEST.ROOT11
-rw-r--r--jdk/test/com/oracle/security/ucrypto/CipherSignNotSupported.java1
-rw-r--r--jdk/test/com/oracle/security/ucrypto/TestAES.java1
-rw-r--r--jdk/test/com/oracle/security/ucrypto/TestCICOWithGCM.java1
-rw-r--r--jdk/test/com/oracle/security/ucrypto/TestCICOWithGCMAndAAD.java1
-rw-r--r--jdk/test/com/oracle/security/ucrypto/TestDigest.java1
-rw-r--r--jdk/test/com/oracle/security/ucrypto/TestGCMKeyWrap.java1
-rw-r--r--jdk/test/com/sun/crypto/provider/Cipher/AES/CICO.java1
-rw-r--r--jdk/test/com/sun/crypto/provider/Cipher/AES/CTR.java1
-rw-r--r--jdk/test/com/sun/crypto/provider/Cipher/AES/Padding.java1
-rw-r--r--jdk/test/com/sun/crypto/provider/Cipher/AES/Test4513830.java1
-rw-r--r--jdk/test/com/sun/crypto/provider/Cipher/AES/Test4517355.java1
-rw-r--r--jdk/test/com/sun/crypto/provider/Cipher/AES/TestAESCipher.java1
-rw-r--r--jdk/test/com/sun/crypto/provider/Cipher/AES/TestCICOWithGCM.java1
-rw-r--r--jdk/test/com/sun/crypto/provider/Cipher/AES/TestCICOWithGCMAndAAD.java1
-rw-r--r--jdk/test/com/sun/crypto/provider/Cipher/AES/TestISO10126Padding.java1
-rw-r--r--jdk/test/com/sun/crypto/provider/Cipher/AES/TestNonexpanding.java1
-rw-r--r--jdk/test/com/sun/crypto/provider/Cipher/AES/TestSameBuffer.java1
-rw-r--r--jdk/test/com/sun/crypto/provider/Cipher/DES/FlushBug.java1
-rw-r--r--jdk/test/com/sun/crypto/provider/Cipher/PBE/PBESealedObject.java1
-rw-r--r--jdk/test/com/sun/crypto/provider/Cipher/PBE/PBKDF2Translate.java1
-rw-r--r--jdk/test/com/sun/crypto/provider/Cipher/PBE/PKCS12Cipher.java1
-rw-r--r--jdk/test/com/sun/crypto/provider/Cipher/PBE/TestCipherKeyWrapperPBEKey.java1
-rw-r--r--jdk/test/com/sun/crypto/provider/Cipher/RSA/TestOAEP.java1
-rw-r--r--jdk/test/com/sun/crypto/provider/Cipher/RSA/TestRSA.java1
-rw-r--r--jdk/test/com/sun/crypto/provider/Mac/HmacSaltLengths.java1
-rw-r--r--jdk/test/com/sun/crypto/provider/Mac/MacSameTest.java1
-rw-r--r--jdk/test/com/sun/management/ThreadMXBean/ThreadCpuTimeArray.java1
-rw-r--r--jdk/test/java/io/DataInputStream/ReadUTF.java1
-rw-r--r--jdk/test/java/io/File/GetXSpace.java1
-rw-r--r--jdk/test/java/io/InputStream/TransferTo.java1
-rw-r--r--jdk/test/java/io/PrintStream/OversynchronizedTest.java1
-rw-r--r--jdk/test/java/io/Serializable/corruptedUTFConsumption/CorruptedUTFConsumption.java1
-rw-r--r--jdk/test/java/io/Serializable/longString/LongString.java1
-rw-r--r--jdk/test/java/io/Serializable/proxy/Basic.java1
-rw-r--r--jdk/test/java/io/Serializable/sanityCheck/SanityCheck.java1
-rw-r--r--jdk/test/java/lang/Boolean/MakeBooleanComparable.java1
-rw-r--r--jdk/test/java/lang/ClassLoader/Assert.java1
-rw-r--r--jdk/test/java/lang/Compare.java1
-rw-r--r--jdk/test/java/lang/Double/ParseHexFloatingPoint.java15
-rw-r--r--jdk/test/java/lang/Enum/ValueOf.java1
-rw-r--r--jdk/test/java/lang/HashCode.java1
-rw-r--r--jdk/test/java/lang/Integer/BitTwiddle.java12
-rw-r--r--jdk/test/java/lang/Long/BitTwiddle.java12
-rw-r--r--jdk/test/java/lang/Math/CubeRootTests.java12
-rw-r--r--jdk/test/java/lang/Math/HypotTests.java12
-rw-r--r--jdk/test/java/lang/Math/IeeeRecommendedTests.java12
-rw-r--r--jdk/test/java/lang/Math/Log1pTests.java12
-rw-r--r--jdk/test/java/lang/Runtime/exec/LotsOfOutput.java7
-rw-r--r--jdk/test/java/lang/Runtime/exec/WinCommand.java1
-rw-r--r--jdk/test/java/lang/String/ContentEquals.java1
-rw-r--r--jdk/test/java/lang/String/ICCBasher.java1
-rw-r--r--jdk/test/java/lang/String/SBConstructor.java2
-rw-r--r--jdk/test/java/lang/String/Split.java1
-rw-r--r--jdk/test/java/lang/StringBuffer/AppendCharSequence.java1
-rw-r--r--jdk/test/java/lang/StringBuffer/AppendSB.java1
-rw-r--r--jdk/test/java/lang/StringBuffer/AppendStringBuilder.java1
-rw-r--r--jdk/test/java/lang/StringBuffer/Capacity.java1
-rw-r--r--jdk/test/java/lang/StringBuffer/IndexOf.java1
-rw-r--r--jdk/test/java/lang/StringBuffer/SBBasher.java2
-rw-r--r--jdk/test/java/lang/StringBuffer/Trim.java1
-rw-r--r--jdk/test/java/lang/StringBuilder/AppendStringBuffer.java1
-rw-r--r--jdk/test/java/lang/ToString.java1
-rw-r--r--jdk/test/java/lang/instrument/SingleTransformerTest.java1
-rw-r--r--jdk/test/java/lang/instrument/TransformMethodTest.java1
-rw-r--r--jdk/test/java/lang/invoke/MethodHandles/CatchExceptionTest.java2
-rw-r--r--jdk/test/java/lang/management/BufferPoolMXBean/Basic.java1
-rw-r--r--jdk/test/java/math/BigDecimal/StringConstructor.java21
-rw-r--r--jdk/test/java/math/BigInteger/BigIntegerTest.java96
-rw-r--r--jdk/test/java/math/BigInteger/ModPow65537.java13
-rw-r--r--jdk/test/java/math/BigInteger/PrimeTest.java12
-rw-r--r--jdk/test/java/math/BigInteger/SymmetricRangeTests.java14
-rw-r--r--jdk/test/java/math/RandomSeed.java81
-rw-r--r--jdk/test/java/net/InetAddress/HashSpread.java1
-rw-r--r--jdk/test/java/nio/Buffer/Chars.java1
-rw-r--r--jdk/test/java/nio/MappedByteBuffer/Force.java1
-rw-r--r--jdk/test/java/nio/MappedByteBuffer/ZeroMap.java1
-rw-r--r--jdk/test/java/nio/channels/AsynchronousChannelGroup/Basic.java1
-rw-r--r--jdk/test/java/nio/channels/AsynchronousChannelGroup/Identity.java1
-rw-r--r--jdk/test/java/nio/channels/AsynchronousChannelGroup/Restart.java1
-rw-r--r--jdk/test/java/nio/channels/AsynchronousFileChannel/Basic.java1
-rw-r--r--jdk/test/java/nio/channels/AsynchronousFileChannel/Lock.java1
-rw-r--r--jdk/test/java/nio/channels/AsynchronousFileChannel/LotsOfWrites.java1
-rw-r--r--jdk/test/java/nio/channels/AsynchronousSocketChannel/Basic.java1
-rw-r--r--jdk/test/java/nio/channels/AsynchronousSocketChannel/StressLoopback.java1
-rw-r--r--jdk/test/java/nio/channels/Channels/Basic2.java1
-rw-r--r--jdk/test/java/nio/channels/Channels/ShortWrite.java1
-rw-r--r--jdk/test/java/nio/channels/DatagramChannel/AdaptDatagramSocket.java1
-rw-r--r--jdk/test/java/nio/channels/DatagramChannel/MulticastSendReceiveTests.java1
-rw-r--r--jdk/test/java/nio/channels/DatagramChannel/Promiscuous.java1
-rw-r--r--jdk/test/java/nio/channels/FileChannel/AtomicAppend.java1
-rw-r--r--jdk/test/java/nio/channels/FileChannel/ClosedByInterrupt.java1
-rw-r--r--jdk/test/java/nio/channels/FileChannel/MapTest.java1
-rw-r--r--jdk/test/java/nio/channels/FileChannel/Position.java1
-rw-r--r--jdk/test/java/nio/channels/FileChannel/Pread.java1
-rw-r--r--jdk/test/java/nio/channels/FileChannel/Pwrite.java1
-rw-r--r--jdk/test/java/nio/channels/FileChannel/Size.java1
-rw-r--r--jdk/test/java/nio/channels/FileChannel/Transfer.java1
-rw-r--r--jdk/test/java/nio/channels/FileChannel/Truncate.java1
-rw-r--r--jdk/test/java/nio/channels/Pipe/PipeChannel.java3
-rw-r--r--jdk/test/java/nio/channels/Pipe/ScatteringRead.java3
-rw-r--r--jdk/test/java/nio/channels/Pipe/SelectPipe.java1
-rw-r--r--jdk/test/java/nio/channels/Selector/SelectorTest.java1
-rw-r--r--jdk/test/java/nio/channels/ServerSocketChannel/NonBlockingAccept.java1
-rw-r--r--jdk/test/java/nio/channels/SocketChannel/CloseDuringWrite.java1
-rw-r--r--jdk/test/java/nio/channels/SocketChannel/OutOfBand.java1
-rw-r--r--jdk/test/java/nio/channels/SocketChannel/ShortWrite.java1
-rw-r--r--jdk/test/java/nio/channels/SocketChannel/VectorIO.java1
-rw-r--r--jdk/test/java/nio/channels/etc/AdaptorCloseAndInterrupt.java1
-rw-r--r--jdk/test/java/nio/charset/coders/BashCache.java1
-rw-r--r--jdk/test/java/nio/charset/coders/BashStreams.java1
-rw-r--r--jdk/test/java/nio/file/Files/BytesAndLines.java1
-rw-r--r--jdk/test/java/nio/file/Files/CopyAndMove.java1
-rw-r--r--jdk/test/java/nio/file/Files/walkFileTree/SkipSiblings.java1
-rw-r--r--jdk/test/java/nio/file/Files/walkFileTree/SkipSubtree.java1
-rw-r--r--jdk/test/java/nio/file/Files/walkFileTree/TerminateWalk.java1
-rw-r--r--jdk/test/java/nio/file/WatchService/LotsOfEvents.java1
-rw-r--r--jdk/test/java/nio/file/WatchService/MayFlies.java1
-rw-r--r--jdk/test/java/nio/file/WatchService/SensitivityModifier.java1
-rw-r--r--jdk/test/java/nio/file/attribute/AclFileAttributeView/Basic.java1
-rw-r--r--jdk/test/java/nio/file/attribute/FileTime/Basic.java1
-rw-r--r--jdk/test/java/nio/file/attribute/UserDefinedFileAttributeView/Basic.java1
-rw-r--r--jdk/test/java/security/MessageDigest/ByteBuffers.java1
-rw-r--r--jdk/test/java/security/MessageDigest/TestDigestIOStream.java1
-rw-r--r--jdk/test/java/security/MessageDigest/TestSameLength.java1
-rw-r--r--jdk/test/java/security/MessageDigest/TestSameValue.java1
-rw-r--r--jdk/test/java/security/Signature/ByteBuffers.java1
-rw-r--r--jdk/test/java/security/Signature/NONEwithRSA.java1
-rw-r--r--jdk/test/java/security/spec/EllipticCurveMatch.java1
-rw-r--r--jdk/test/java/sql/JavatimeTest.java1
-rw-r--r--jdk/test/java/text/Format/MessageFormat/Bug7003643.java1
-rw-r--r--jdk/test/java/time/tck/java/time/TCKLocalDateTime.java7
-rw-r--r--jdk/test/java/time/tck/java/time/TCKOffsetDateTime.java9
-rw-r--r--jdk/test/java/time/tck/java/time/TCKOffsetTime.java13
-rw-r--r--jdk/test/java/util/Arrays/ArrayObjectMethods.java1
-rw-r--r--jdk/test/java/util/Arrays/CopyMethods.java1
-rw-r--r--jdk/test/java/util/Arrays/Correct.java1
-rw-r--r--jdk/test/java/util/Base64/TestBase64.java1
-rw-r--r--jdk/test/java/util/BitSet/BSMethods.java1
-rw-r--r--jdk/test/java/util/BitSet/ImportExport.java1
-rw-r--r--jdk/test/java/util/BitSet/PreviousBits.java1
-rw-r--r--jdk/test/java/util/Calendar/JavatimeTest.java1
-rw-r--r--jdk/test/java/util/Collection/MOAT.java1
-rw-r--r--jdk/test/java/util/Collections/AddAll.java1
-rw-r--r--jdk/test/java/util/Collections/CheckedListBash.java1
-rw-r--r--jdk/test/java/util/Collections/CheckedMapBash.java1
-rw-r--r--jdk/test/java/util/Collections/CheckedSetBash.java1
-rw-r--r--jdk/test/java/util/Collections/Disjoint.java1
-rw-r--r--jdk/test/java/util/Collections/Rotate.java1
-rw-r--r--jdk/test/java/util/EnumSet/EnumSetBash.java1
-rw-r--r--jdk/test/java/util/HashSet/Serialization.java1
-rw-r--r--jdk/test/java/util/IdentityHashMap/Capacity.java1
-rw-r--r--jdk/test/java/util/List/LockStep.java1
-rw-r--r--jdk/test/java/util/Map/LockStep.java1
-rw-r--r--jdk/test/java/util/NavigableMap/LockStep.java1
-rw-r--r--jdk/test/java/util/PluggableLocale/ExecTest.sh12
-rw-r--r--jdk/test/java/util/PluggableLocale/PermissionTest.java46
-rw-r--r--jdk/test/java/util/PluggableLocale/PermissionTest.sh31
-rw-r--r--jdk/test/java/util/PluggableLocale/localeServiceProvider.policy3
-rw-r--r--jdk/test/java/util/Properties/ConcurrentLoadAndStoreXML.java1
-rw-r--r--jdk/test/java/util/Random/DistinctSeeds.java1
-rw-r--r--jdk/test/java/util/Random/RandomStreamTest.java1
-rw-r--r--jdk/test/java/util/Random/RandomTest.java1
-rw-r--r--jdk/test/java/util/ResourceBundle/Control/StressTest.java1
-rw-r--r--jdk/test/java/util/SplittableRandom/SplittableRandomTest.java1
-rw-r--r--jdk/test/java/util/Timer/DelayOverflow.java1
-rw-r--r--jdk/test/java/util/Timer/Purge.java1
-rw-r--r--jdk/test/java/util/UUID/Serial.java1
-rw-r--r--jdk/test/java/util/UUID/UUIDTest.java1
-rw-r--r--jdk/test/java/util/WeakHashMap/GCDuringIteration.java1
-rw-r--r--jdk/test/java/util/concurrent/forkjoin/SubmissionTest.java49
-rw-r--r--jdk/test/java/util/logging/CheckZombieLockTest.java1
-rw-r--r--jdk/test/java/util/logging/DrainFindDeadlockTest.java1
-rw-r--r--jdk/test/java/util/logging/FileHandlerLongLimit.java1
-rw-r--r--jdk/test/java/util/logging/FileHandlerPath.java1
-rw-r--r--jdk/test/java/util/logging/FileHandlerPatternExceptions.java1
-rw-r--r--jdk/test/java/util/logging/LogManager/Configuration/ParentLoggerWithHandlerGC.java1
-rw-r--r--jdk/test/java/util/logging/LoggingDeadlock.java4
-rw-r--r--jdk/test/java/util/logging/LoggingDeadlock2.java4
-rw-r--r--jdk/test/java/util/logging/TestLogConfigurationDeadLockWithConf.java1
-rw-r--r--jdk/test/java/util/prefs/CodePointZeroPrefsTest.java49
-rw-r--r--jdk/test/java/util/regex/RegExTest.java1
-rw-r--r--jdk/test/java/util/zip/3GBZipFiles.sh1
-rw-r--r--jdk/test/java/util/zip/DeInflate.java1
-rw-r--r--jdk/test/java/util/zip/DeflateIn_InflateOut.java1
-rw-r--r--jdk/test/java/util/zip/FlaterTest.java1
-rw-r--r--jdk/test/java/util/zip/GZIP/Accordion.java1
-rw-r--r--jdk/test/java/util/zip/GZIP/GZIPInputStreamRead.java1
-rw-r--r--jdk/test/java/util/zip/InflateIn_DeflateOut.java1
-rw-r--r--jdk/test/java/util/zip/InflaterBufferSize.java1
-rw-r--r--jdk/test/java/util/zip/TimeChecksum.java1
-rw-r--r--jdk/test/java/util/zip/TotalInOut.java1
-rw-r--r--jdk/test/java/util/zip/ZipFile/Assortment.java1
-rw-r--r--jdk/test/java/util/zip/ZipFile/ClearStaleZipFileInputStreams.java1
-rw-r--r--jdk/test/java/util/zip/ZipFile/FinalizeZipFile.java1
-rw-r--r--jdk/test/java/util/zip/ZipFile/MultiThreadedReadTest.java1
-rw-r--r--jdk/test/java/util/zip/ZipFile/ReadZip.java1
-rw-r--r--jdk/test/javax/crypto/Cipher/ByteBuffers.java1
-rw-r--r--jdk/test/javax/crypto/CipherSpi/DirectBBRemaining.java1
-rw-r--r--jdk/test/javax/crypto/CryptoPermission/AllPermCheck.java1
-rw-r--r--jdk/test/javax/crypto/CryptoPermission/RC2PermCheck.java1
-rw-r--r--jdk/test/javax/crypto/JceSecurity/SunJCE_BC_LoadOrdering.java1
-rw-r--r--jdk/test/javax/crypto/KeyGenerator/TestKGParity.java1
-rw-r--r--jdk/test/javax/crypto/Mac/ByteBuffers.java1
-rw-r--r--jdk/test/javax/crypto/NullCipher/TestNPE.java1
-rw-r--r--jdk/test/javax/management/monitor/MultiMonitorTest.java1
-rw-r--r--jdk/test/javax/management/mxbean/ThreadMXBeanTest.java1
-rw-r--r--jdk/test/javax/management/remote/mandatory/loading/MissingClassTest.java1
-rw-r--r--jdk/test/javax/management/timer/MissingNotificationTest.java1
-rw-r--r--jdk/test/javax/net/ssl/SSLEngine/LargeBufs.java1
-rw-r--r--jdk/test/javax/smartcardio/TestCommandAPDU.java1
-rw-r--r--jdk/test/lib/testlibrary/jdk/testlibrary/RandomFactory.java101
-rw-r--r--jdk/test/sun/management/jmxremote/startstop/JMXStartStopTest.java1
-rw-r--r--jdk/test/sun/misc/CopyMemory.java1
-rw-r--r--jdk/test/sun/misc/FloatingDecimal/TestFloatingDecimal.java1
-rw-r--r--jdk/test/sun/net/www/ParseUtil_4922813.java1
-rw-r--r--jdk/test/sun/nio/cs/FindDecoderBugs.java1
-rw-r--r--jdk/test/sun/nio/cs/FindEncoderBugs.java1
-rw-r--r--jdk/test/sun/nio/cs/TestStringCoding.java1
-rw-r--r--jdk/test/sun/nio/cs/TestStringCodingUTF8.java1
-rw-r--r--jdk/test/sun/security/krb5/auto/KDC.java21
-rw-r--r--jdk/test/sun/security/krb5/auto/UnboundSSL.java134
-rw-r--r--jdk/test/sun/security/krb5/auto/UnboundSSLMultipleKeys.java111
-rw-r--r--jdk/test/sun/security/krb5/auto/UnboundSSLPrincipalProperty.java119
-rw-r--r--jdk/test/sun/security/krb5/auto/UnboundSSLUtils.java353
-rw-r--r--jdk/test/sun/security/krb5/auto/unbound.ssl.jaas.conf40
-rw-r--r--jdk/test/sun/security/krb5/auto/unbound.ssl.policy26
-rw-r--r--jdk/test/sun/security/mscapi/PrngSlow.java1
-rw-r--r--jdk/test/sun/security/mscapi/SignUsingSHA2withRSA.sh1
-rw-r--r--jdk/test/sun/security/pkcs11/Cipher/ReinitCipher.java1
-rw-r--r--jdk/test/sun/security/pkcs11/Cipher/TestRSACipher.java1
-rw-r--r--jdk/test/sun/security/pkcs11/Cipher/TestRawRSACipher.java1
-rw-r--r--jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphers.java3
-rw-r--r--jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphersNoPad.java1
-rw-r--r--jdk/test/sun/security/pkcs11/KeyGenerator/DESParity.java1
-rw-r--r--jdk/test/sun/security/pkcs11/Mac/MacSameTest.java1
-rw-r--r--jdk/test/sun/security/pkcs11/Mac/ReinitMac.java1
-rw-r--r--jdk/test/sun/security/pkcs11/MessageDigest/ByteBuffers.java1
-rw-r--r--jdk/test/sun/security/pkcs11/MessageDigest/ReinitDigest.java1
-rw-r--r--jdk/test/sun/security/pkcs11/MessageDigest/TestCloning.java1
-rw-r--r--jdk/test/sun/security/pkcs11/Secmod/AddPrivateKey.java1
-rw-r--r--jdk/test/sun/security/pkcs11/Secmod/Crypto.java1
-rw-r--r--jdk/test/sun/security/pkcs11/Secmod/GetPrivateKey.java1
-rw-r--r--jdk/test/sun/security/pkcs11/SecureRandom/Basic.java1
-rw-r--r--jdk/test/sun/security/pkcs11/Signature/ByteBuffers.java1
-rw-r--r--jdk/test/sun/security/pkcs11/Signature/ReinitSignature.java1
-rw-r--r--jdk/test/sun/security/pkcs11/Signature/TestDSA.java1
-rw-r--r--jdk/test/sun/security/pkcs11/Signature/TestDSAKeyLength.java1
-rw-r--r--jdk/test/sun/security/pkcs11/ec/ReadPKCS12.java1
-rw-r--r--jdk/test/sun/security/pkcs11/ec/TestCurves.java1
-rw-r--r--jdk/test/sun/security/pkcs11/ec/TestECDSA.java1
-rw-r--r--jdk/test/sun/security/pkcs11/rsa/KeyWrap.java1
-rw-r--r--jdk/test/sun/security/pkcs11/rsa/TestKeyPairGenerator.java7
-rw-r--r--jdk/test/sun/security/pkcs11/rsa/TestSignatures.java1
-rw-r--r--jdk/test/sun/security/provider/DSA/TestDSA.java1
-rw-r--r--jdk/test/sun/security/provider/DSA/TestDSA2.java1
-rw-r--r--jdk/test/sun/security/provider/SeedGenerator/Priority_Inversion.java1
-rw-r--r--jdk/test/sun/security/rsa/TestKeyPairGenerator.java1
-rw-r--r--jdk/test/sun/security/rsa/TestSignatures.java1
-rw-r--r--jdk/test/sun/security/ssl/ClientHandshaker/LengthCheckTest.java1
-rw-r--r--jdk/test/sun/security/ssl/GenSSLConfigs/main.java1
-rw-r--r--jdk/test/tools/launcher/ExecutionEnvironment.java20
-rw-r--r--nashorn/.hgtags1
-rw-r--r--nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CodeGenerator.java2
-rw-r--r--nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CompilationPhase.java14
-rw-r--r--nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CompileUnit.java34
-rw-r--r--nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/Compiler.java31
-rw-r--r--nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/TypeEvaluator.java3
-rw-r--r--nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/Context.java47
-rw-r--r--nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/FunctionInitializer.java13
-rw-r--r--nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/RecompilableScriptFunctionData.java67
-rw-r--r--nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/StoredScript.java84
-rw-r--r--nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/regexp/RegExpFactory.java24
-rw-r--r--nashorn/test/script/basic/JDK-8053905.js38
-rw-r--r--nashorn/test/script/basic/JDK-8053905.js.EXPECTED2
-rw-r--r--nashorn/test/script/basic/JDK-8066407.js48
-rw-r--r--nashorn/test/script/basic/compile-octane-splitter.js5
417 files changed, 5397 insertions, 2488 deletions
diff --git a/.hgtags-top-repo b/.hgtags-top-repo
index b5bc828524d..ecdc65b6c89 100644
--- a/.hgtags-top-repo
+++ b/.hgtags-top-repo
@@ -304,3 +304,4 @@ f25ee9f62427a9ba27418e5531a89754791a305b jdk9-b57
39e8a131289e8386aa4c3e4b184faa812a7c0421 jdk9-b59
9fa2185bee17462d1014538bff60af6e6f0b01e7 jdk9-b60
ea38728b4f4bdd8fd0d7a89b18069f521cf05013 jdk9-b61
+105d045a69174d870b69bfe471b3f2d05a9f8ecc jdk9-b62
diff --git a/common/autoconf/basics.m4 b/common/autoconf/basics.m4
index 5eb945ef53b..f78c2d88279 100644
--- a/common/autoconf/basics.m4
+++ b/common/autoconf/basics.m4
@@ -478,6 +478,15 @@ AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
AUTOCONF_DIR=$TOPDIR/common/autoconf
])
+# Evaluates platform specific overrides for devkit variables.
+# $1: Name of variable
+AC_DEFUN([BASIC_EVAL_DEVKIT_VARIABLE],
+[
+ if test "x[$]$1" = x; then
+ eval $1="\${$1_${OPENJDK_TARGET_CPU}}"
+ fi
+])
+
AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
[
AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
@@ -487,12 +496,27 @@ AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
DEVKIT_ROOT="$with_devkit"
# Check for a meta data info file in the root of the devkit
if test -f "$DEVKIT_ROOT/devkit.info"; then
- # This potentially sets the following:
- # DEVKIT_NAME: A descriptive name of the devkit
- # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
- # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
- # DEVKIT_SYSROOT: Corresponds to --with-sysroot
. $DEVKIT_ROOT/devkit.info
+ # This potentially sets the following:
+ # A descriptive name of the devkit
+ BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_NAME])
+ # Corresponds to --with-extra-path
+ BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_EXTRA_PATH])
+ # Corresponds to --with-toolchain-path
+ BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_TOOLCHAIN_PATH])
+ # Corresponds to --with-sysroot
+ BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_SYSROOT])
+
+ # Identifies the Visual Studio version in the devkit
+ BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_VERSION])
+ # The Visual Studio include environment variable
+ BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_INCLUDE])
+ # The Visual Studio lib environment variable
+ BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_LIB])
+ # Corresponds to --with-msvcr-dll
+ BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCR_DLL])
+ # Corresponds to --with-msvcp-dll
+ BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCP_DLL])
fi
AC_MSG_CHECKING([for devkit])
@@ -502,9 +526,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
AC_MSG_RESULT([$DEVKIT_ROOT])
fi
- if test "x$DEVKIT_EXTRA_PATH" != x; then
- BASIC_PREPEND_TO_PATH([EXTRA_PATH],$DEVKIT_EXTRA_PATH)
- fi
+ BASIC_PREPEND_TO_PATH([EXTRA_PATH],$DEVKIT_EXTRA_PATH)
# Fallback default of just /bin if DEVKIT_PATH is not defined
if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
@@ -681,8 +703,12 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
files_present=`$LS $OUTPUT_ROOT`
# Configure has already touched config.log and confdefs.h in the current dir when this check
# is performed.
- filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
- | $TR -d '\n'`
+ filtered_files=`$ECHO "$files_present" \
+ | $SED -e 's/config.log//g' \
+ -e 's/confdefs.h//g' \
+ -e 's/fixpath.exe//g' \
+ -e 's/ //g' \
+ | $TR -d '\n'`
if test "x$filtered_files" != x; then
AC_MSG_NOTICE([Current directory is $CURDIR.])
AC_MSG_NOTICE([Since this is not the source root, configure will output the configuration here])
diff --git a/common/autoconf/basics_windows.m4 b/common/autoconf/basics_windows.m4
index 7ce14a82d8b..210cc455047 100644
--- a/common/autoconf/basics_windows.m4
+++ b/common/autoconf/basics_windows.m4
@@ -66,7 +66,7 @@ AC_DEFUN([BASIC_MAKE_WINDOWS_SPACE_SAFE_CYGWIN],
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh
index 5d5e9fbee85..bc5063b9662 100644
--- a/common/autoconf/generated-configure.sh
+++ b/common/autoconf/generated-configure.sh
@@ -3464,6 +3464,10 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# Setup basic configuration paths, and platform-specific stuff related to PATHs.
+# Evaluates platform specific overrides for devkit variables.
+# $1: Name of variable
+
+
@@ -4363,7 +4367,7 @@ VS_SDK_PLATFORM_NAME_2013=
#CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1429271657
+DATE_WHEN_GENERATED=1430331133
###############################################################################
#
@@ -14182,7 +14186,7 @@ $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid."
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -14308,7 +14312,7 @@ $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid."
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -14878,7 +14882,7 @@ $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is inval
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -14965,12 +14969,63 @@ $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is inval
DEVKIT_ROOT="$with_devkit"
# Check for a meta data info file in the root of the devkit
if test -f "$DEVKIT_ROOT/devkit.info"; then
- # This potentially sets the following:
- # DEVKIT_NAME: A descriptive name of the devkit
- # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
- # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
- # DEVKIT_SYSROOT: Corresponds to --with-sysroot
. $DEVKIT_ROOT/devkit.info
+ # This potentially sets the following:
+ # A descriptive name of the devkit
+
+ if test "x$DEVKIT_NAME" = x; then
+ eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
+ fi
+
+ # Corresponds to --with-extra-path
+
+ if test "x$DEVKIT_EXTRA_PATH" = x; then
+ eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
+ fi
+
+ # Corresponds to --with-toolchain-path
+
+ if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
+ eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
+ fi
+
+ # Corresponds to --with-sysroot
+
+ if test "x$DEVKIT_SYSROOT" = x; then
+ eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
+ fi
+
+
+ # Identifies the Visual Studio version in the devkit
+
+ if test "x$DEVKIT_VS_VERSION" = x; then
+ eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
+ fi
+
+ # The Visual Studio include environment variable
+
+ if test "x$DEVKIT_VS_INCLUDE" = x; then
+ eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
+ fi
+
+ # The Visual Studio lib environment variable
+
+ if test "x$DEVKIT_VS_LIB" = x; then
+ eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
+ fi
+
+ # Corresponds to --with-msvcr-dll
+
+ if test "x$DEVKIT_MSVCR_DLL" = x; then
+ eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
+ fi
+
+ # Corresponds to --with-msvcp-dll
+
+ if test "x$DEVKIT_MSVCP_DLL" = x; then
+ eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
+ fi
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
@@ -14983,7 +15038,6 @@ $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
$as_echo "$DEVKIT_ROOT" >&6; }
fi
- if test "x$DEVKIT_EXTRA_PATH" != x; then
if test "x$DEVKIT_EXTRA_PATH" != x; then
if test "x$EXTRA_PATH" = x; then
@@ -14993,7 +15047,6 @@ $as_echo "$DEVKIT_ROOT" >&6; }
fi
fi
- fi
# Fallback default of just /bin if DEVKIT_PATH is not defined
if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
@@ -15288,8 +15341,12 @@ $as_echo "in current directory" >&6; }
files_present=`$LS $OUTPUT_ROOT`
# Configure has already touched config.log and confdefs.h in the current dir when this check
# is performed.
- filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
- | $TR -d '\n'`
+ filtered_files=`$ECHO "$files_present" \
+ | $SED -e 's/config.log//g' \
+ -e 's/confdefs.h//g' \
+ -e 's/fixpath.exe//g' \
+ -e 's/ //g' \
+ | $TR -d '\n'`
if test "x$filtered_files" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
$as_echo "$as_me: Current directory is $CURDIR." >&6;}
@@ -15356,7 +15413,7 @@ $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is inval
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -15671,7 +15728,7 @@ $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found"
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -16058,7 +16115,7 @@ $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found"
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -16442,7 +16499,7 @@ $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found"
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -16831,7 +16888,7 @@ $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found"
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -17214,7 +17271,7 @@ $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found"
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -20279,7 +20336,7 @@ $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid.
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -20608,7 +20665,7 @@ $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid.
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -20799,7 +20856,7 @@ $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid.
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -20983,7 +21040,7 @@ $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid.
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -21166,7 +21223,7 @@ $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid.
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -21349,7 +21406,7 @@ $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid.
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -21523,7 +21580,7 @@ $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid.
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -21672,7 +21729,7 @@ $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\",
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -21842,7 +21899,7 @@ $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid.
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -22167,7 +22224,7 @@ $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid.
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -22379,7 +22436,7 @@ $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid.
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -22556,7 +22613,7 @@ $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid.
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -22761,7 +22818,7 @@ $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid.
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -22938,7 +22995,7 @@ $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid.
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -23143,7 +23200,7 @@ $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid.
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -23320,7 +23377,7 @@ $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid.
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -23525,7 +23582,7 @@ $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid.
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -23702,7 +23759,7 @@ $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid.
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -23894,7 +23951,7 @@ $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid.
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -24069,7 +24126,7 @@ $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid.
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -24262,7 +24319,7 @@ $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid.
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -24437,7 +24494,7 @@ $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid.
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -24629,7 +24686,7 @@ $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid.
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -24804,7 +24861,7 @@ $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid.
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -24997,7 +25054,7 @@ $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid.
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -25172,7 +25229,7 @@ $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid.
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -25346,7 +25403,7 @@ $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid.
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -26726,11 +26783,15 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
ORG_CFLAGS="$CFLAGS"
ORG_CXXFLAGS="$CXXFLAGS"
+ # autoconf magic only relies on PATH, so update it if tools dir is specified
+ OLD_PATH="$PATH"
+
# On Windows, we need to detect the visual studio installation first.
# This will change the PATH, but we need to keep that new PATH even
# after toolchain detection is done, since the compiler (on x86) uses
# it for DLL resolution in runtime.
- if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
+ if test "x$OPENJDK_BUILD_OS" = "xwindows" \
+ && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
# Store path to cygwin link.exe to help excluding it when searching for
# VS linker. This must be done before changing the PATH when looking for VS.
@@ -26808,6 +26869,56 @@ $as_echo "$as_me: The following toolchain versions are valid on this platform:"
done
exit 0
+ elif test "x$DEVKIT_VS_VERSION" != x; then
+ VS_VERSION=$DEVKIT_VS_VERSION
+ TOOLCHAIN_VERSION=$VS_VERSION
+ eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
+ eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
+ eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
+ eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
+ eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
+ VS_PATH="$TOOLCHAIN_PATH:$PATH"
+
+ # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
+ # can still be exported as INCLUDE for compiler invocations without
+ # SYSROOT_CFLAGS
+ OLDIFS="$IFS"
+ IFS=";"
+ for i in $DEVKIT_VS_INCLUDE; do
+ ipath=$i
+
+ unix_path="$ipath"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ windows_path=`$CYGPATH -m "$unix_path"`
+ ipath="$windows_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ windows_path=`cmd //c echo $unix_path`
+ ipath="$windows_path"
+ fi
+
+ VS_INCLUDE="$VS_INCLUDE;$ipath"
+ done
+ # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
+ # as LIB for compiler invocations without SYSROOT_LDFLAGS
+ for i in $DEVKIT_VS_LIB; do
+ libpath=$i
+
+ unix_path="$libpath"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ windows_path=`$CYGPATH -m "$unix_path"`
+ libpath="$windows_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ windows_path=`cmd //c echo $unix_path`
+ libpath="$windows_path"
+ fi
+
+ VS_LIB="$VS_LIB;$libpath"
+ done
+ IFS="$OLDIFS"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
+$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
+
elif test "x$with_toolchain_version" != x; then
# User override; check that it is valid
if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
@@ -27380,8 +27491,10 @@ $as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
done
- if test "x$VS_ENV_CMD" != x; then
- # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
+ # If we have a devkit, skip all of the below.
+ if test "x$DEVKIT_VS_VERSION" = x; then
+ if test "x$VS_ENV_CMD" != x; then
+ # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
# Only process if variable expands to non-empty
@@ -27481,7 +27594,7 @@ $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found"
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -27669,17 +27782,17 @@ $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
fi
- # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
- { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
+ # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
- # We need to create a couple of temporary files.
- VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
- $MKDIR -p $VS_ENV_TMP_DIR
+ # We need to create a couple of temporary files.
+ VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
+ $MKDIR -p $VS_ENV_TMP_DIR
- # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
- # Instead create a shell script which will set the relevant variables when run.
- WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
+ # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
+ # Instead create a shell script which will set the relevant variables when run.
+ WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
unix_path="$WINPATH_VS_ENV_CMD"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -27690,7 +27803,7 @@ $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
WINPATH_VS_ENV_CMD="$windows_path"
fi
- WINPATH_BASH="$BASH"
+ WINPATH_BASH="$BASH"
unix_path="$WINPATH_BASH"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -27702,59 +27815,67 @@ $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
fi
- # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
- # script (executable by bash) that will setup the important variables.
- EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
- $ECHO "@echo off" > $EXTRACT_VC_ENV_BAT_FILE
- # This will end up something like:
- # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
- $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
- # These will end up something like:
- # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
- # The trailing space for everyone except PATH is no typo, but is needed due
- # to trailing \ in the Windows paths. These will be stripped later.
- $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
- $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
- $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
- $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
- $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
- $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
-
- # Now execute the newly created bat file.
- # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
- # Change directory so we don't need to mess with Windows paths in redirects.
- cd $VS_ENV_TMP_DIR
- cmd /c extract-vs-env.bat | $CAT
- cd $CURDIR
-
- if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
+ # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
+ # script (executable by bash) that will setup the important variables.
+ EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
+ $ECHO "@echo off" > $EXTRACT_VC_ENV_BAT_FILE
+ # This will end up something like:
+ # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
+ $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
+ # These will end up something like:
+ # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
+ # The trailing space for everyone except PATH is no typo, but is needed due
+ # to trailing \ in the Windows paths. These will be stripped later.
+ $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
+ >> $EXTRACT_VC_ENV_BAT_FILE
+ $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
+ >> $EXTRACT_VC_ENV_BAT_FILE
+ $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
+ >> $EXTRACT_VC_ENV_BAT_FILE
+ $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
+ >> $EXTRACT_VC_ENV_BAT_FILE
+ $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
+ >> $EXTRACT_VC_ENV_BAT_FILE
+ $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
+ >> $EXTRACT_VC_ENV_BAT_FILE
+
+ # Now execute the newly created bat file.
+ # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
+ # Change directory so we don't need to mess with Windows paths in redirects.
+ cd $VS_ENV_TMP_DIR
+ cmd /c extract-vs-env.bat | $CAT
+ cd $CURDIR
+
+ if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
- as_fn_error $? "Cannot continue" "$LINENO" 5
- fi
+ as_fn_error $? "Cannot continue" "$LINENO" 5
+ fi
- # Now set all paths and other env variables. This will allow the rest of
- # the configure script to find and run the compiler in the proper way.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
+ # Now set all paths and other env variables. This will allow the rest of
+ # the configure script to find and run the compiler in the proper way.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
$as_echo "$as_me: Setting extracted environment variables" >&6;}
- . $VS_ENV_TMP_DIR/set-vs-env.sh
- # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
- # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
- else
- # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
+ . $VS_ENV_TMP_DIR/set-vs-env.sh
+ # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
+ # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
+ else
+ # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
+ fi
fi
# At this point, we should have correct variables in the environment, or we can't continue.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
$as_echo_n "checking for Visual Studio variables... " >&6; }
- if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
+ if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
+ || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
$as_echo "present but broken" >&6; }
@@ -27839,7 +27960,7 @@ $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -27989,7 +28110,7 @@ $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid."
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -28108,9 +28229,6 @@ $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run c
export LIB="$VS_LIB"
fi
- # autoconf magic only relies on PATH, so update it if tools dir is specified
- OLD_PATH="$PATH"
-
# For solaris we really need solaris tools, and not the GNU equivalent.
# The build tools on Solaris reside in /usr/ccs (C Compilation System),
# so add that to path before starting to probe.
@@ -28449,7 +28567,7 @@ $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found"
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -28910,7 +29028,7 @@ $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found"
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -30197,7 +30315,7 @@ $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found"
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -30658,7 +30776,7 @@ $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found"
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -31524,7 +31642,7 @@ $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found"
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -31943,7 +32061,7 @@ $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found"
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -32291,7 +32409,7 @@ $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found"
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -32790,7 +32908,7 @@ $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found"
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -33422,7 +33540,7 @@ $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found"
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -33897,7 +34015,7 @@ $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found"
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -34240,7 +34358,7 @@ $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found"
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -34581,7 +34699,7 @@ $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found"
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -34904,7 +35022,7 @@ $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found"
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -35423,7 +35541,7 @@ $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found"
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -35895,7 +36013,7 @@ $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found"
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -36367,7 +36485,7 @@ $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found"
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -36840,7 +36958,7 @@ $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found"
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -37424,7 +37542,7 @@ $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found"
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -38006,7 +38124,7 @@ $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found"
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -38597,7 +38715,7 @@ $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found"
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -39185,7 +39303,7 @@ $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found"
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -39681,7 +39799,7 @@ $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found"
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -40153,7 +40271,7 @@ $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found"
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -40625,7 +40743,7 @@ $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found"
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -41176,7 +41294,7 @@ $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid."
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -44730,7 +44848,7 @@ $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -44856,7 +44974,7 @@ $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -45091,7 +45209,7 @@ $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -45217,7 +45335,7 @@ $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -45713,7 +45831,7 @@ $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -45839,7 +45957,7 @@ $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -46049,7 +46167,7 @@ $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -46175,7 +46293,7 @@ $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -46376,7 +46494,7 @@ $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -46502,7 +46620,7 @@ $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -46703,7 +46821,7 @@ $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -46829,7 +46947,7 @@ $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -47031,7 +47149,7 @@ $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -47157,7 +47275,7 @@ $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -47360,7 +47478,7 @@ $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -47486,7 +47604,7 @@ $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -47685,7 +47803,7 @@ $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -47811,7 +47929,7 @@ $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -48010,7 +48128,7 @@ $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -48136,7 +48254,7 @@ $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -48318,7 +48436,7 @@ $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\"
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -48452,7 +48570,7 @@ $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -49967,7 +50085,7 @@ fi
if test "x$with_msvcr_dll" != x; then
# If given explicitely by user, do not probe. If not present, fail directly.
- DLL_NAME="$DLL_NAME"
+ DLL_NAME="$MSVCR_NAME"
POSSIBLE_MSVC_DLL="$with_msvcr_dll"
METHOD="--with-msvcr-dll"
if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
@@ -49997,6 +50115,132 @@ $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }
MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+ # Only process if variable expands to non-empty
+
+ if test "x$MSVC_DLL" != x; then
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$MSVC_DLL"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-style (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$MSVC_DLL"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a unix platform. Hooray! :)
+ path="$MSVC_DLL"
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+
+ # Use eval to expand a potential ~
+ eval path="$path"
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+ fi
+ fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
$as_echo_n "checking for $DLL_NAME... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
@@ -50012,9 +50256,183 @@ $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE"
if test "x$MSVC_DLL" = x; then
as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
fi
+ MSVCR_DLL="$MSVC_DLL"
+ elif test "x$DEVKIT_MSVCR_DLL" != x; then
+
+ DLL_NAME="$MSVCR_NAME"
+ POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
+ METHOD="devkit"
+ if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
+$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
+
+ # Need to check if the found msvcr is correct architecture
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
+$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
+ MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+ # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ CORRECT_MSVCR_ARCH="PE32 executable"
+ else
+ CORRECT_MSVCR_ARCH="PE32+ executable"
+ fi
+ else
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ CORRECT_MSVCR_ARCH=386
+ else
+ CORRECT_MSVCR_ARCH=x86-64
+ fi
+ fi
+ if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+ MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+ # Only process if variable expands to non-empty
+
+ if test "x$MSVC_DLL" != x; then
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$MSVC_DLL"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-style (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$MSVC_DLL"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a unix platform. Hooray! :)
+ path="$MSVC_DLL"
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+
+ # Use eval to expand a potential ~
+ eval path="$path"
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+ fi
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
+$as_echo_n "checking for $DLL_NAME... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
+$as_echo "$MSVC_DLL" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
+$as_echo "incorrect, ignoring" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
+$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
+ fi
+ fi
+
+ if test "x$MSVC_DLL" = x; then
+ as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
+ fi
+ MSVCR_DLL="$MSVC_DLL"
else
- VAR_NAME="MSVCR_DLL"
DLL_NAME="${MSVCR_NAME}"
MSVC_DLL=
@@ -50069,6 +50487,132 @@ $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }
MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+ # Only process if variable expands to non-empty
+
+ if test "x$MSVC_DLL" != x; then
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$MSVC_DLL"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-style (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$MSVC_DLL"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a unix platform. Hooray! :)
+ path="$MSVC_DLL"
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+
+ # Use eval to expand a potential ~
+ eval path="$path"
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+ fi
+ fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
$as_echo_n "checking for $DLL_NAME... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
@@ -50118,6 +50662,132 @@ $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }
MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+ # Only process if variable expands to non-empty
+
+ if test "x$MSVC_DLL" != x; then
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$MSVC_DLL"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-style (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$MSVC_DLL"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a unix platform. Hooray! :)
+ path="$MSVC_DLL"
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+
+ # Use eval to expand a potential ~
+ eval path="$path"
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+ fi
+ fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
$as_echo_n "checking for $DLL_NAME... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
@@ -50177,6 +50847,132 @@ $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }
MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+ # Only process if variable expands to non-empty
+
+ if test "x$MSVC_DLL" != x; then
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$MSVC_DLL"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-style (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$MSVC_DLL"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a unix platform. Hooray! :)
+ path="$MSVC_DLL"
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+
+ # Use eval to expand a potential ~
+ eval path="$path"
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+ fi
+ fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
$as_echo_n "checking for $DLL_NAME... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
@@ -50243,6 +51039,132 @@ $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }
MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+ # Only process if variable expands to non-empty
+
+ if test "x$MSVC_DLL" != x; then
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$MSVC_DLL"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-style (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$MSVC_DLL"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a unix platform. Hooray! :)
+ path="$MSVC_DLL"
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+
+ # Use eval to expand a potential ~
+ eval path="$path"
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+ fi
+ fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
$as_echo_n "checking for $DLL_NAME... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
@@ -50306,6 +51228,132 @@ $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }
MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+ # Only process if variable expands to non-empty
+
+ if test "x$MSVC_DLL" != x; then
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$MSVC_DLL"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-style (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$MSVC_DLL"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a unix platform. Hooray! :)
+ path="$MSVC_DLL"
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+
+ # Use eval to expand a potential ~
+ eval path="$path"
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+ fi
+ fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
$as_echo_n "checking for $DLL_NAME... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
@@ -50329,16 +51377,60 @@ $as_echo "no" >&6; }
as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
fi
- MSVCR_DLL=$MSVC_DLL
+ MSVCR_DLL="$MSVC_DLL"
+ fi
+
+
+
+# Check whether --with-msvcp-dll was given.
+if test "${with_msvcp_dll+set}" = set; then :
+ withval=$with_msvcp_dll;
+fi
+
+
+ if test "x$MSVCP_NAME" != "x"; then
+ if test "x$with_msvcp_dll" != x; then
+ # If given explicitely by user, do not probe. If not present, fail directly.
+
+ DLL_NAME="$MSVCP_NAME"
+ POSSIBLE_MSVC_DLL="$with_msvcp_dll"
+ METHOD="--with-msvcp-dll"
+ if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
+$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
+
+ # Need to check if the found msvcr is correct architecture
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
+$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
+ MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
+ # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ CORRECT_MSVCR_ARCH="PE32 executable"
+ else
+ CORRECT_MSVCR_ARCH="PE32+ executable"
+ fi
+ else
+ if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
+ CORRECT_MSVCR_ARCH=386
+ else
+ CORRECT_MSVCR_ARCH=x86-64
+ fi
+ fi
+ if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+ MSVC_DLL="$POSSIBLE_MSVC_DLL"
# Only process if variable expands to non-empty
- if test "x$MSVCR_DLL" != x; then
+ if test "x$MSVC_DLL" != x; then
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
# Input might be given as Windows format, start by converting to
# unix format.
- path="$MSVCR_DLL"
+ path="$MSVC_DLL"
new_path=`$CYGPATH -u "$path"`
# Cygwin tries to hide some aspects of the Windows file system, such that binaries are
@@ -50350,9 +51442,9 @@ $as_echo "no" >&6; }
# It is also a way to make sure we got the proper file name for the real test later on.
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
if test "x$test_shortpath" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
fi
# Call helper function which possibly converts this using DOS-style short mode.
@@ -50372,7 +51464,7 @@ $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -50390,14 +51482,14 @@ $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid
if test "x$path" != "x$new_path"; then
- MSVCR_DLL="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
fi
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- path="$MSVCR_DLL"
+ path="$MSVC_DLL"
has_colon=`$ECHO $path | $GREP ^.:`
new_path="$path"
if test "x$has_colon" = x; then
@@ -50428,9 +51520,9 @@ $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
fi
if test "x$path" != "x$new_path"; then
- MSVCR_DLL="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
fi
# Save the first 10 bytes of this path to the storage, so fixpath can work.
@@ -50438,43 +51530,45 @@ $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
else
# We're on a unix platform. Hooray! :)
- path="$MSVCR_DLL"
+ path="$MSVC_DLL"
has_space=`$ECHO "$path" | $GREP " "`
if test "x$has_space" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
fi
# Use eval to expand a potential ~
eval path="$path"
if test ! -f "$path" && test ! -d "$path"; then
- as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+ as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
fi
- MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
+ MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
fi
fi
- MSVCR_DLL=$MSVCR_DLL
-
-
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
+$as_echo_n "checking for $DLL_NAME... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
+$as_echo "$MSVC_DLL" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
+$as_echo "incorrect, ignoring" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
+$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
+ fi
fi
+ if test "x$MSVC_DLL" = x; then
+ as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
+ fi
+ MSVCP_DLL="$MSVC_DLL"
+ elif test "x$DEVKIT_MSVCP_DLL" != x; then
-# Check whether --with-msvcp-dll was given.
-if test "${with_msvcp_dll+set}" = set; then :
- withval=$with_msvcp_dll;
-fi
-
-
- if test "x$MSVCP_NAME" != "x"; then
- if test "x$with_msvcp_dll" != x; then
- # If given explicitely by user, do not probe. If not present, fail directly.
-
- DLL_NAME="$DLL_NAME"
- POSSIBLE_MSVC_DLL="$with_msvcp_dll"
- METHOD="--with-msvcp-dll"
+ DLL_NAME="$MSVCP_NAME"
+ POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
+ METHOD="devkit"
if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
@@ -50502,6 +51596,132 @@ $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }
MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+ # Only process if variable expands to non-empty
+
+ if test "x$MSVC_DLL" != x; then
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$MSVC_DLL"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-style (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$MSVC_DLL"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a unix platform. Hooray! :)
+ path="$MSVC_DLL"
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+
+ # Use eval to expand a potential ~
+ eval path="$path"
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+ fi
+ fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
$as_echo_n "checking for $DLL_NAME... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
@@ -50515,11 +51735,11 @@ $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE"
fi
if test "x$MSVC_DLL" = x; then
- as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
+ as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
fi
+ MSVCP_DLL="$MSVC_DLL"
else
- VAR_NAME="MSVCP_DLL"
DLL_NAME="${MSVCP_NAME}"
MSVC_DLL=
@@ -50574,6 +51794,132 @@ $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }
MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+ # Only process if variable expands to non-empty
+
+ if test "x$MSVC_DLL" != x; then
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$MSVC_DLL"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-style (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$MSVC_DLL"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a unix platform. Hooray! :)
+ path="$MSVC_DLL"
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+
+ # Use eval to expand a potential ~
+ eval path="$path"
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+ fi
+ fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
$as_echo_n "checking for $DLL_NAME... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
@@ -50623,6 +51969,132 @@ $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }
MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+ # Only process if variable expands to non-empty
+
+ if test "x$MSVC_DLL" != x; then
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$MSVC_DLL"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-style (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$MSVC_DLL"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a unix platform. Hooray! :)
+ path="$MSVC_DLL"
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+
+ # Use eval to expand a potential ~
+ eval path="$path"
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+ fi
+ fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
$as_echo_n "checking for $DLL_NAME... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
@@ -50682,6 +52154,132 @@ $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }
MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+ # Only process if variable expands to non-empty
+
+ if test "x$MSVC_DLL" != x; then
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$MSVC_DLL"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-style (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$MSVC_DLL"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a unix platform. Hooray! :)
+ path="$MSVC_DLL"
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+
+ # Use eval to expand a potential ~
+ eval path="$path"
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+ fi
+ fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
$as_echo_n "checking for $DLL_NAME... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
@@ -50748,6 +52346,132 @@ $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }
MSVC_DLL="$POSSIBLE_MSVC_DLL"
+
+ # Only process if variable expands to non-empty
+
+ if test "x$MSVC_DLL" != x; then
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+ # Input might be given as Windows format, start by converting to
+ # unix format.
+ path="$MSVC_DLL"
+ new_path=`$CYGPATH -u "$path"`
+
+ # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+ # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+ # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+ # "foo.exe" is OK but "foo" is an error.
+ #
+ # This test is therefore slightly more accurate than "test -f" to check for file precense.
+ # It is also a way to make sure we got the proper file name for the real test later on.
+ test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+ if test "x$test_shortpath" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
+ fi
+
+ # Call helper function which possibly converts this using DOS-style short mode.
+ # If so, the updated path is stored in $new_path.
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+ path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+ if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+ # Going to short mode and back again did indeed matter. Since short mode is
+ # case insensitive, let's make it lowercase to improve readability.
+ shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Now convert it back to Unix-style (cygpath)
+ input_path=`$CYGPATH -u "$shortmode_path"`
+ new_path="$input_path"
+ fi
+ fi
+
+ test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+ if test "x$test_cygdrive_prefix" = x; then
+ # As a simple fix, exclude /usr/bin since it's not a real path.
+ if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+ # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+ # a path prefixed by /cygdrive for fixpath to work.
+ new_path="$CYGWIN_ROOT_PATH$input_path"
+ fi
+ fi
+
+
+ if test "x$path" != "x$new_path"; then
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+ fi
+
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+ path="$MSVC_DLL"
+ has_colon=`$ECHO $path | $GREP ^.:`
+ new_path="$path"
+ if test "x$has_colon" = x; then
+ # Not in mixed or Windows style, start by that.
+ new_path=`cmd //c echo $path`
+ fi
+
+
+ input_path="$new_path"
+ # Check if we need to convert this using DOS-style short mode. If the path
+ # contains just simple characters, use it. Otherwise (spaces, weird characters),
+ # take no chances and rewrite it.
+ # Note: m4 eats our [], so we need to use [ and ] instead.
+ has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+ if test "x$has_forbidden_chars" != x; then
+ # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+ new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ fi
+
+
+ windows_path="$new_path"
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ unix_path=`$CYGPATH -u "$windows_path"`
+ new_path="$unix_path"
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+ new_path="$unix_path"
+ fi
+
+ if test "x$path" != "x$new_path"; then
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
+ fi
+
+ # Save the first 10 bytes of this path to the storage, so fixpath can work.
+ all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+ else
+ # We're on a unix platform. Hooray! :)
+ path="$MSVC_DLL"
+ has_space=`$ECHO "$path" | $GREP " "`
+ if test "x$has_space" != x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ fi
+
+ # Use eval to expand a potential ~
+ eval path="$path"
+ if test ! -f "$path" && test ! -d "$path"; then
+ as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+ fi
+
+ MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
+ fi
+ fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
$as_echo_n "checking for $DLL_NAME... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
@@ -50811,39 +52535,15 @@ $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }
MSVC_DLL="$POSSIBLE_MSVC_DLL"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
-$as_echo_n "checking for $DLL_NAME... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
-$as_echo "$MSVC_DLL" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
-$as_echo "incorrect, ignoring" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
-$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
- fi
- fi
-
- fi
- fi
-
- if test "x$MSVC_DLL" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
-$as_echo_n "checking for $DLL_NAME... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
- fi
-
- MSVCP_DLL=$MSVC_DLL
# Only process if variable expands to non-empty
- if test "x$MSVCP_DLL" != x; then
+ if test "x$MSVC_DLL" != x; then
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
# Input might be given as Windows format, start by converting to
# unix format.
- path="$MSVCP_DLL"
+ path="$MSVC_DLL"
new_path=`$CYGPATH -u "$path"`
# Cygwin tries to hide some aspects of the Windows file system, such that binaries are
@@ -50855,9 +52555,9 @@ $as_echo "no" >&6; }
# It is also a way to make sure we got the proper file name for the real test later on.
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
if test "x$test_shortpath" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Cannot locate the the path of MSVCP_DLL" "$LINENO" 5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
+ as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
fi
# Call helper function which possibly converts this using DOS-style short mode.
@@ -50877,7 +52577,7 @@ $as_echo "$as_me: The path of MSVCP_DLL, which resolves as \"$path\", is invalid
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-stile (cygpath)
+ # Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
@@ -50895,14 +52595,14 @@ $as_echo "$as_me: The path of MSVCP_DLL, which resolves as \"$path\", is invalid
if test "x$path" != "x$new_path"; then
- MSVCP_DLL="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCP_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVCP_DLL to \"$new_path\"" >&6;}
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
fi
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- path="$MSVCP_DLL"
+ path="$MSVC_DLL"
has_colon=`$ECHO $path | $GREP ^.:`
new_path="$path"
if test "x$has_colon" = x; then
@@ -50933,9 +52633,9 @@ $as_echo "$as_me: Rewriting MSVCP_DLL to \"$new_path\"" >&6;}
fi
if test "x$path" != "x$new_path"; then
- MSVCP_DLL="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCP_DLL to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting MSVCP_DLL to \"$new_path\"" >&6;}
+ MSVC_DLL="$new_path"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
fi
# Save the first 10 bytes of this path to the storage, so fixpath can work.
@@ -50943,28 +52643,50 @@ $as_echo "$as_me: Rewriting MSVCP_DLL to \"$new_path\"" >&6;}
else
# We're on a unix platform. Hooray! :)
- path="$MSVCP_DLL"
+ path="$MSVC_DLL"
has_space=`$ECHO "$path" | $GREP " "`
if test "x$has_space" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
fi
# Use eval to expand a potential ~
eval path="$path"
if test ! -f "$path" && test ! -d "$path"; then
- as_fn_error $? "The path of MSVCP_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
+ as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
fi
- MSVCP_DLL="`cd "$path"; $THEPWDCMD -L`"
+ MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
fi
fi
- MSVCP_DLL=$MSVCP_DLL
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
+$as_echo_n "checking for $DLL_NAME... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
+$as_echo "$MSVC_DLL" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
+$as_echo "incorrect, ignoring" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
+$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
+ fi
+ fi
+ fi
+ fi
+ if test "x$MSVC_DLL" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
+$as_echo_n "checking for $DLL_NAME... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
+ fi
+
+ MSVCP_DLL="$MSVC_DLL"
fi
+
fi
diff --git a/common/autoconf/toolchain.m4 b/common/autoconf/toolchain.m4
index ed978d6a8fb..4a3c6426273 100644
--- a/common/autoconf/toolchain.m4
+++ b/common/autoconf/toolchain.m4
@@ -189,11 +189,15 @@ AC_DEFUN_ONCE([TOOLCHAIN_PRE_DETECTION],
ORG_CFLAGS="$CFLAGS"
ORG_CXXFLAGS="$CXXFLAGS"
+ # autoconf magic only relies on PATH, so update it if tools dir is specified
+ OLD_PATH="$PATH"
+
# On Windows, we need to detect the visual studio installation first.
# This will change the PATH, but we need to keep that new PATH even
# after toolchain detection is done, since the compiler (on x86) uses
# it for DLL resolution in runtime.
- if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
+ if test "x$OPENJDK_BUILD_OS" = "xwindows" \
+ && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV
# Reset path to VS_PATH. It will include everything that was on PATH at the time we
# ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
@@ -203,9 +207,6 @@ AC_DEFUN_ONCE([TOOLCHAIN_PRE_DETECTION],
export LIB="$VS_LIB"
fi
- # autoconf magic only relies on PATH, so update it if tools dir is specified
- OLD_PATH="$PATH"
-
# For solaris we really need solaris tools, and not the GNU equivalent.
# The build tools on Solaris reside in /usr/ccs (C Compilation System),
# so add that to path before starting to probe.
diff --git a/common/autoconf/toolchain_windows.m4 b/common/autoconf/toolchain_windows.m4
index 87850a25b2f..4a40fa63a91 100644
--- a/common/autoconf/toolchain_windows.m4
+++ b/common/autoconf/toolchain_windows.m4
@@ -210,6 +210,37 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO],
done
exit 0
+ elif test "x$DEVKIT_VS_VERSION" != x; then
+ VS_VERSION=$DEVKIT_VS_VERSION
+ TOOLCHAIN_VERSION=$VS_VERSION
+ eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
+ eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
+ eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
+ eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
+ eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
+ VS_PATH="$TOOLCHAIN_PATH:$PATH"
+
+ # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
+ # can still be exported as INCLUDE for compiler invocations without
+ # SYSROOT_CFLAGS
+ OLDIFS="$IFS"
+ IFS=";"
+ for i in $DEVKIT_VS_INCLUDE; do
+ ipath=$i
+ BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([ipath])
+ VS_INCLUDE="$VS_INCLUDE;$ipath"
+ done
+ # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
+ # as LIB for compiler invocations without SYSROOT_LDFLAGS
+ for i in $DEVKIT_VS_LIB; do
+ libpath=$i
+ BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([libpath])
+ VS_LIB="$VS_LIB;$libpath"
+ done
+ IFS="$OLDIFS"
+
+ AC_MSG_NOTICE([Found devkit $VS_DESCRIPTION])
+
elif test "x$with_toolchain_version" != x; then
# User override; check that it is valid
if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
@@ -262,71 +293,81 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
# First-hand choice is to locate and run the vsvars bat file.
TOOLCHAIN_FIND_VISUAL_STUDIO
- if test "x$VS_ENV_CMD" != x; then
- # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
- BASIC_FIXUP_EXECUTABLE(VS_ENV_CMD)
-
- # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
- AC_MSG_NOTICE([Trying to extract Visual Studio environment variables])
-
- # We need to create a couple of temporary files.
- VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
- $MKDIR -p $VS_ENV_TMP_DIR
-
- # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
- # Instead create a shell script which will set the relevant variables when run.
- WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
- BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([WINPATH_VS_ENV_CMD])
- WINPATH_BASH="$BASH"
- BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([WINPATH_BASH])
-
- # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
- # script (executable by bash) that will setup the important variables.
- EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
- $ECHO "@echo off" > $EXTRACT_VC_ENV_BAT_FILE
- # This will end up something like:
- # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
- $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
- # These will end up something like:
- # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
- # The trailing space for everyone except PATH is no typo, but is needed due
- # to trailing \ in the Windows paths. These will be stripped later.
- $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
- $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
- $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
- $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
- $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
- $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
-
- # Now execute the newly created bat file.
- # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
- # Change directory so we don't need to mess with Windows paths in redirects.
- cd $VS_ENV_TMP_DIR
- cmd /c extract-vs-env.bat | $CAT
- cd $CURDIR
-
- if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
- AC_MSG_NOTICE([Could not succesfully extract the envionment variables needed for the VS setup.])
- AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation])
- AC_MSG_NOTICE([or run "bash.exe -l" from a VS command prompt and then run configure from there.])
- AC_MSG_ERROR([Cannot continue])
- fi
+ # If we have a devkit, skip all of the below.
+ if test "x$DEVKIT_VS_VERSION" = x; then
+ if test "x$VS_ENV_CMD" != x; then
+ # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
+ BASIC_FIXUP_EXECUTABLE(VS_ENV_CMD)
+
+ # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
+ AC_MSG_NOTICE([Trying to extract Visual Studio environment variables])
+
+ # We need to create a couple of temporary files.
+ VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
+ $MKDIR -p $VS_ENV_TMP_DIR
+
+ # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
+ # Instead create a shell script which will set the relevant variables when run.
+ WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
+ BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([WINPATH_VS_ENV_CMD])
+ WINPATH_BASH="$BASH"
+ BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([WINPATH_BASH])
+
+ # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
+ # script (executable by bash) that will setup the important variables.
+ EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
+ $ECHO "@echo off" > $EXTRACT_VC_ENV_BAT_FILE
+ # This will end up something like:
+ # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
+ $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
+ # These will end up something like:
+ # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
+ # The trailing space for everyone except PATH is no typo, but is needed due
+ # to trailing \ in the Windows paths. These will be stripped later.
+ $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
+ >> $EXTRACT_VC_ENV_BAT_FILE
+ $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
+ >> $EXTRACT_VC_ENV_BAT_FILE
+ $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
+ >> $EXTRACT_VC_ENV_BAT_FILE
+ $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
+ >> $EXTRACT_VC_ENV_BAT_FILE
+ $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
+ >> $EXTRACT_VC_ENV_BAT_FILE
+ $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
+ >> $EXTRACT_VC_ENV_BAT_FILE
+
+ # Now execute the newly created bat file.
+ # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
+ # Change directory so we don't need to mess with Windows paths in redirects.
+ cd $VS_ENV_TMP_DIR
+ cmd /c extract-vs-env.bat | $CAT
+ cd $CURDIR
+
+ if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
+ AC_MSG_NOTICE([Could not succesfully extract the envionment variables needed for the VS setup.])
+ AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation])
+ AC_MSG_NOTICE([or run "bash.exe -l" from a VS command prompt and then run configure from there.])
+ AC_MSG_ERROR([Cannot continue])
+ fi
- # Now set all paths and other env variables. This will allow the rest of
- # the configure script to find and run the compiler in the proper way.
- AC_MSG_NOTICE([Setting extracted environment variables])
- . $VS_ENV_TMP_DIR/set-vs-env.sh
- # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
- # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
- else
- # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
- AC_MSG_NOTICE([Cannot locate a valid Visual Studio installation, checking current environment])
+ # Now set all paths and other env variables. This will allow the rest of
+ # the configure script to find and run the compiler in the proper way.
+ AC_MSG_NOTICE([Setting extracted environment variables])
+ . $VS_ENV_TMP_DIR/set-vs-env.sh
+ # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
+ # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
+ else
+ # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
+ AC_MSG_NOTICE([Cannot locate a valid Visual Studio installation, checking current environment])
+ fi
fi
# At this point, we should have correct variables in the environment, or we can't continue.
AC_MSG_CHECKING([for Visual Studio variables])
- if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
+ if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
+ || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
AC_MSG_RESULT([present but broken])
AC_MSG_ERROR([Your VC command prompt seems broken, INCLUDE and/or LIB is missing.])
@@ -403,10 +444,10 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL],
POSSIBLE_MSVC_DLL="$2"
METHOD="$3"
if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
- AC_MSG_NOTICE([Found $1 at $POSSIBLE_MSVC_DLL using $METHOD])
+ AC_MSG_NOTICE([Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD])
# Need to check if the found msvcr is correct architecture
- AC_MSG_CHECKING([found $1 architecture])
+ AC_MSG_CHECKING([found $DLL_NAME architecture])
MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
# The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
@@ -426,19 +467,19 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL],
if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
AC_MSG_RESULT([ok])
MSVC_DLL="$POSSIBLE_MSVC_DLL"
- AC_MSG_CHECKING([for $1])
+ BASIC_FIXUP_PATH(MSVC_DLL)
+ AC_MSG_CHECKING([for $DLL_NAME])
AC_MSG_RESULT([$MSVC_DLL])
else
AC_MSG_RESULT([incorrect, ignoring])
- AC_MSG_NOTICE([The file type of the located $1 is $MSVC_DLL_FILETYPE])
+ AC_MSG_NOTICE([The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE])
fi
fi
])
AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL],
[
- VAR_NAME="$1"
- DLL_NAME="$2"
+ DLL_NAME="$1"
MSVC_DLL=
if test "x$MSVC_DLL" = x; then
@@ -517,10 +558,6 @@ AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL],
AC_MSG_RESULT([no])
AC_MSG_ERROR([Could not find $DLL_NAME. Please specify using --with-msvcr-dll.])
fi
-
- $1=$MSVC_DLL
- BASIC_FIXUP_PATH($1)
- AC_SUBST($1, [$]$1)
])
AC_DEFUN([TOOLCHAIN_SETUP_VS_RUNTIME_DLLS],
@@ -530,14 +567,22 @@ AC_DEFUN([TOOLCHAIN_SETUP_VS_RUNTIME_DLLS],
if test "x$with_msvcr_dll" != x; then
# If given explicitely by user, do not probe. If not present, fail directly.
- TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$with_msvcr_dll],
- [--with-msvcr-dll])
+ TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($MSVCR_NAME, [$with_msvcr_dll], [--with-msvcr-dll])
if test "x$MSVC_DLL" = x; then
AC_MSG_ERROR([Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll])
fi
+ MSVCR_DLL="$MSVC_DLL"
+ elif test "x$DEVKIT_MSVCR_DLL" != x; then
+ TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($MSVCR_NAME, [$DEVKIT_MSVCR_DLL], [devkit])
+ if test "x$MSVC_DLL" = x; then
+ AC_MSG_ERROR([Could not find a proper $MSVCR_NAME as specified by devkit])
+ fi
+ MSVCR_DLL="$MSVC_DLL"
else
- TOOLCHAIN_SETUP_MSVC_DLL([MSVCR_DLL], [${MSVCR_NAME}])
+ TOOLCHAIN_SETUP_MSVC_DLL([${MSVCR_NAME}])
+ MSVCR_DLL="$MSVC_DLL"
fi
+ AC_SUBST(MSVCR_DLL)
AC_ARG_WITH(msvcp-dll, [AS_HELP_STRING([--with-msvcp-dll],
[path to microsoft C++ runtime dll (msvcp*.dll) (Windows only) @<:@probed@:>@])])
@@ -545,13 +590,21 @@ AC_DEFUN([TOOLCHAIN_SETUP_VS_RUNTIME_DLLS],
if test "x$MSVCP_NAME" != "x"; then
if test "x$with_msvcp_dll" != x; then
# If given explicitely by user, do not probe. If not present, fail directly.
- TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$with_msvcp_dll],
- [--with-msvcp-dll])
+ TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($MSVCP_NAME, [$with_msvcp_dll], [--with-msvcp-dll])
if test "x$MSVC_DLL" = x; then
AC_MSG_ERROR([Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll])
fi
+ MSVCP_DLL="$MSVC_DLL"
+ elif test "x$DEVKIT_MSVCP_DLL" != x; then
+ TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($MSVCP_NAME, [$DEVKIT_MSVCP_DLL], [devkit])
+ if test "x$MSVC_DLL" = x; then
+ AC_MSG_ERROR([Could not find a proper $MSVCP_NAME as specified by devkit])
+ fi
+ MSVCP_DLL="$MSVC_DLL"
else
- TOOLCHAIN_SETUP_MSVC_DLL([MSVCP_DLL], [${MSVCP_NAME}])
+ TOOLCHAIN_SETUP_MSVC_DLL([${MSVCP_NAME}])
+ MSVCP_DLL="$MSVC_DLL"
fi
+ AC_SUBST(MSVCP_DLL)
fi
])
diff --git a/corba/.hgtags b/corba/.hgtags
index 210694a9022..b1d9426e786 100644
--- a/corba/.hgtags
+++ b/corba/.hgtags
@@ -304,3 +304,4 @@ d8ebf1a5b18ccbc849f5bf0f80aa3d78583eee68 jdk9-b57
cda6ae062f85fac5555f4e1318885b0ecd998bd1 jdk9-b59
caa330b275f39282793466529f6864766b31d9fd jdk9-b60
d690f489ca0bb95a6157d996da2fa72bcbcf02ea jdk9-b61
+d27f7e0a7aca129969de23e9934408a31b4abf4c jdk9-b62
diff --git a/hotspot/.hgtags b/hotspot/.hgtags
index 07541de82ca..bf3b531730c 100644
--- a/hotspot/.hgtags
+++ b/hotspot/.hgtags
@@ -464,3 +464,4 @@ ee878f3d6732856f7725c590312bfbe2ffa52cc7 jdk9-b58
96bcaec07cb165782bae1b9a1f28450b37a10e3a jdk9-b59
9c916db4bf3bc164a47b5a9cefe5ffd71e111f6a jdk9-b60
715d2da5801c410746e92f08066d53bde1496286 jdk9-b61
+1eab877142cce6ca06e556e2ad0af688f993f00b jdk9-b62
diff --git a/hotspot/make/windows/makefiles/compile.make b/hotspot/make/windows/makefiles/compile.make
index 8523bfd2eb6..0ca02a18a96 100644
--- a/hotspot/make/windows/makefiles/compile.make
+++ b/hotspot/make/windows/makefiles/compile.make
@@ -74,7 +74,8 @@ LP64=1
!if "$(BUILDARCH)" == "i486"
MACHINE=I386
-CXX_FLAGS=$(CXX_FLAGS) /D "IA32"
+# VS2013 generates bad l2f without /arch:IA32
+CXX_FLAGS=$(CXX_FLAGS) /D "IA32" /arch:IA32
!endif
CXX_FLAGS=$(CXX_FLAGS) /D "WIN32" /D "_WINDOWS"
diff --git a/hotspot/src/cpu/aarch64/vm/aarch64.ad b/hotspot/src/cpu/aarch64/vm/aarch64.ad
index 9df5db4fb84..956a4ac3fd0 100644
--- a/hotspot/src/cpu/aarch64/vm/aarch64.ad
+++ b/hotspot/src/cpu/aarch64/vm/aarch64.ad
@@ -449,7 +449,7 @@ reg_class no_special_reg32(
R26
/* R27, */ // heapbase
/* R28, */ // thread
- /* R29, */ // fp
+ R29, // fp
/* R30, */ // lr
/* R31 */ // sp
);
@@ -483,7 +483,7 @@ reg_class no_special_reg(
R26, R26_H,
/* R27, R27_H, */ // heapbase
/* R28, R28_H, */ // thread
- /* R29, R29_H, */ // fp
+ R29, R29_H, // fp
/* R30, R30_H, */ // lr
/* R31, R31_H */ // sp
);
@@ -758,6 +758,8 @@ definitions %{
source_hpp %{
+#include "memory/cardTableModRefBS.hpp"
+
class CallStubImpl {
//--------------------------------------------------------------
@@ -2538,7 +2540,7 @@ RegMask Matcher::modL_proj_mask() {
}
const RegMask Matcher::method_handle_invoke_SP_save_mask() {
- return RegMask();
+ return FP_REG_mask();
}
// helper for encoding java_to_runtime calls on sim
diff --git a/hotspot/src/cpu/aarch64/vm/frame_aarch64.inline.hpp b/hotspot/src/cpu/aarch64/vm/frame_aarch64.inline.hpp
index eb0c9a1f20c..5a9ae786638 100644
--- a/hotspot/src/cpu/aarch64/vm/frame_aarch64.inline.hpp
+++ b/hotspot/src/cpu/aarch64/vm/frame_aarch64.inline.hpp
@@ -77,12 +77,6 @@ inline frame::frame(intptr_t* sp, intptr_t* fp, address pc) {
inline frame::frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc) {
intptr_t a = intptr_t(sp);
intptr_t b = intptr_t(fp);
-#ifndef PRODUCT
- if (fp)
- if (sp > fp || (fp - sp > 0x100000))
- for(;;)
- asm("nop");
-#endif
_sp = sp;
_unextended_sp = unextended_sp;
_fp = fp;
@@ -104,12 +98,6 @@ inline frame::frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address
inline frame::frame(intptr_t* sp, intptr_t* fp) {
intptr_t a = intptr_t(sp);
intptr_t b = intptr_t(fp);
-#ifndef PRODUCT
- if (fp)
- if (sp > fp || (fp - sp > 0x100000))
- for(;;)
- asm("nop");
-#endif
_sp = sp;
_unextended_sp = sp;
_fp = fp;
diff --git a/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
index 080d25b89f8..5653e44affd 100644
--- a/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
+++ b/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
@@ -32,22 +32,14 @@
#include "compiler/disassembler.hpp"
#include "memory/resourceArea.hpp"
+#include "nativeInst_aarch64.hpp"
+#include "opto/compile.hpp"
+#include "opto/node.hpp"
#include "runtime/biasedLocking.hpp"
#include "runtime/icache.hpp"
#include "runtime/interfaceSupport.hpp"
#include "runtime/sharedRuntime.hpp"
-// #include "gc_interface/collectedHeap.inline.hpp"
-// #include "interpreter/interpreter.hpp"
-// #include "memory/cardTableModRefBS.hpp"
-// #include "prims/methodHandles.hpp"
-// #include "runtime/biasedLocking.hpp"
-// #include "runtime/interfaceSupport.hpp"
-// #include "runtime/objectMonitor.hpp"
-// #include "runtime/os.hpp"
-// #include "runtime/sharedRuntime.hpp"
-// #include "runtime/stubRoutines.hpp"
-
#if INCLUDE_ALL_GCS
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
diff --git a/hotspot/test/compiler/floatingpoint/ModNaN.java b/hotspot/test/compiler/floatingpoint/ModNaN.java
index 84672566cde..4cd2f4aefde 100644
--- a/hotspot/test/compiler/floatingpoint/ModNaN.java
+++ b/hotspot/test/compiler/floatingpoint/ModNaN.java
@@ -25,7 +25,7 @@
* @test
* @bug 8015396
* @summary double a%b returns NaN for some (a,b) (|a| < inf, |b|>0) (on Core i7 980X)
- *
+ * @ignore 8015396
* @run main ModNaN
*/
public class ModNaN {
diff --git a/jaxp/.hgtags b/jaxp/.hgtags
index 08a2cfbe08b..d1bd7fd7519 100644
--- a/jaxp/.hgtags
+++ b/jaxp/.hgtags
@@ -304,3 +304,4 @@ d5b5a010a16688f188f5a9247ed873f5100b530c jdk9-b53
a1a9d943446911a4a0f74f0d082c32094af944ae jdk9-b59
c12db18748dacfccd6581ead29228c2cb6e51b34 jdk9-b60
f4a4a54620370f077c2e830a5561c8cfa811712b jdk9-b61
+3bcf83c1bbc1b7663e930d72c133a9bd86c7618d jdk9-b62
diff --git a/jaxws/.hgtags b/jaxws/.hgtags
index 6233b33cd39..fe7dbe8df69 100644
--- a/jaxws/.hgtags
+++ b/jaxws/.hgtags
@@ -307,3 +307,4 @@ b4f913b48e699980bd11fe19cce134d0adb4c31c jdk9-b56
8a9ebae410bc388668fc203e559b5407bde757eb jdk9-b59
f31835b59035377a220efc5a248b90f090ee1689 jdk9-b60
77f44848c44c003205490bf5ab88035233b65418 jdk9-b61
+cd0cf72b2cbf4adb778a02505fb065bb2292688c jdk9-b62
diff --git a/jdk/.hgtags b/jdk/.hgtags
index 7a547227410..07c91542bbc 100644
--- a/jdk/.hgtags
+++ b/jdk/.hgtags
@@ -304,3 +304,4 @@ c76339e86ea7da5d9ac7856f3fae9ef73eef04a2 jdk9-b57
48ee960f29df93a9b2a895621321358a86909086 jdk9-b59
84c5527f742bc64562e47d3149c16197fe1c4c1a jdk9-b60
da84dcac1b0b12c5b836b05ac75ecbfadee0cd32 jdk9-b61
+49118e68fbd4cc0044e718c47db681946d5efd69 jdk9-b62
diff --git a/jdk/src/java.base/share/classes/com/sun/crypto/provider/JceKeyStore.java b/jdk/src/java.base/share/classes/com/sun/crypto/provider/JceKeyStore.java
index a364881d88a..0e3f1ed0566 100644
--- a/jdk/src/java.base/share/classes/com/sun/crypto/provider/JceKeyStore.java
+++ b/jdk/src/java.base/share/classes/com/sun/crypto/provider/JceKeyStore.java
@@ -711,7 +711,7 @@ public final class JceKeyStore extends KeyStoreSpi {
cf = CertificateFactory.getInstance("X509");
} else {
// version 2
- cfs = new Hashtable<String, CertificateFactory>(3);
+ cfs = new Hashtable<>(3);
}
entries.clear();
diff --git a/jdk/src/java.base/share/classes/com/sun/crypto/provider/PBEKeyFactory.java b/jdk/src/java.base/share/classes/com/sun/crypto/provider/PBEKeyFactory.java
index 0c87971876f..3fd312f8737 100644
--- a/jdk/src/java.base/share/classes/com/sun/crypto/provider/PBEKeyFactory.java
+++ b/jdk/src/java.base/share/classes/com/sun/crypto/provider/PBEKeyFactory.java
@@ -56,7 +56,7 @@ abstract class PBEKeyFactory extends SecretKeyFactorySpi {
}
static {
- validTypes = new HashSet<String>(17);
+ validTypes = new HashSet<>(17);
validTypes.add("PBEWithMD5AndDES".toUpperCase(Locale.ENGLISH));
validTypes.add("PBEWithSHA1AndDESede".toUpperCase(Locale.ENGLISH));
validTypes.add("PBEWithSHA1AndRC2_40".toUpperCase(Locale.ENGLISH));
diff --git a/jdk/src/java.base/share/classes/com/sun/crypto/provider/SunJCE.java b/jdk/src/java.base/share/classes/com/sun/crypto/provider/SunJCE.java
index 439acb94f47..3d588bf8a2e 100644
--- a/jdk/src/java.base/share/classes/com/sun/crypto/provider/SunJCE.java
+++ b/jdk/src/java.base/share/classes/com/sun/crypto/provider/SunJCE.java
@@ -115,7 +115,7 @@ public final class SunJCE extends Provider {
final String BLOCK_PADS = "NOPADDING|PKCS5PADDING|ISO10126PADDING";
AccessController.doPrivileged(
- new java.security.PrivilegedAction<Object>() {
+ new java.security.PrivilegedAction<>() {
public Object run() {
/*
diff --git a/jdk/src/java.base/share/classes/com/sun/net/ssl/KeyManagerFactory.java b/jdk/src/java.base/share/classes/com/sun/net/ssl/KeyManagerFactory.java
index 30e941a89d5..6ddf6bf6917 100644
--- a/jdk/src/java.base/share/classes/com/sun/net/ssl/KeyManagerFactory.java
+++ b/jdk/src/java.base/share/classes/com/sun/net/ssl/KeyManagerFactory.java
@@ -63,7 +63,7 @@ public class KeyManagerFactory {
*/
public final static String getDefaultAlgorithm() {
String type;
- type = AccessController.doPrivileged(new PrivilegedAction<String>() {
+ type = AccessController.doPrivileged(new PrivilegedAction<>() {
public String run() {
return Security.getProperty("sun.ssl.keymanager.type");
}
diff --git a/jdk/src/java.base/share/classes/com/sun/net/ssl/TrustManagerFactory.java b/jdk/src/java.base/share/classes/com/sun/net/ssl/TrustManagerFactory.java
index b9ef566a0e7..8b0701c0a29 100644
--- a/jdk/src/java.base/share/classes/com/sun/net/ssl/TrustManagerFactory.java
+++ b/jdk/src/java.base/share/classes/com/sun/net/ssl/TrustManagerFactory.java
@@ -63,7 +63,7 @@ public class TrustManagerFactory {
*/
public final static String getDefaultAlgorithm() {
String type;
- type = AccessController.doPrivileged(new PrivilegedAction<String>() {
+ type = AccessController.doPrivileged(new PrivilegedAction<>() {
public String run() {
return Security.getProperty("sun.ssl.trustmanager.type");
}
diff --git a/jdk/src/java.base/share/classes/java/lang/Runtime.java b/jdk/src/java.base/share/classes/java/lang/Runtime.java
index 114f6cb968f..e75fcb439cf 100644
--- a/jdk/src/java.base/share/classes/java/lang/Runtime.java
+++ b/jdk/src/java.base/share/classes/java/lang/Runtime.java
@@ -32,9 +32,9 @@ import sun.reflect.Reflection;
/**
* Every Java application has a single instance of class
- * <code>Runtime</code> that allows the application to interface with
+ * {@code Runtime} that allows the application to interface with
* the environment in which the application is running. The current
- * runtime can be obtained from the <code>getRuntime</code> method.
+ * runtime can be obtained from the {@code getRuntime} method.
* <p>
* An application cannot create its own instance of this class.
*
@@ -48,10 +48,10 @@ public class Runtime {
/**
* Returns the runtime object associated with the current Java application.
- * Most of the methods of class <code>Runtime</code> are instance
+ * Most of the methods of class {@code Runtime} are instance
* methods and must be invoked with respect to the current runtime object.
*
- * @return the <code>Runtime</code> object associated with the current
+ * @return the {@code Runtime} object associated with the current
* Java application.
*/
public static Runtime getRuntime() {
@@ -72,8 +72,7 @@ public class Runtime {
* if any, are started in some unspecified order and allowed to run
* concurrently until they finish. In the second phase all uninvoked
* finalizers are run if {@link #runFinalizersOnExit finalization-on-exit}
- * has been enabled. Once this is done the virtual machine {@link #halt
- * halts}.
+ * has been enabled. Once this is done the virtual machine {@link #halt halts}.
*
* <p> If this method is invoked after the virtual machine has begun its
* shutdown sequence then if shutdown hooks are being run this method will
@@ -82,7 +81,7 @@ public class Runtime {
* with the given status code if the status is nonzero; otherwise, it
* blocks indefinitely.
*
- * <p> The <tt>{@link System#exit(int) System.exit}</tt> method is the
+ * <p> The {@link System#exit(int) System.exit} method is the
* conventional and convenient means of invoking this method.
*
* @param status
@@ -90,8 +89,8 @@ public class Runtime {
* indicates abnormal termination.
*
* @throws SecurityException
- * If a security manager is present and its <tt>{@link
- * SecurityManager#checkExit checkExit}</tt> method does not permit
+ * If a security manager is present and its
+ * {@link SecurityManager#checkExit checkExit} method does not permit
* exiting with the specified status
*
* @see java.lang.SecurityException
@@ -118,11 +117,11 @@ public class Runtime {
* <ul>
*
* <li> The program <i>exits</i> normally, when the last non-daemon
- * thread exits or when the <tt>{@link #exit exit}</tt> (equivalently,
+ * thread exits or when the {@link #exit exit} (equivalently,
* {@link System#exit(int) System.exit}) method is invoked, or
*
* <li> The virtual machine is <i>terminated</i> in response to a
- * user interrupt, such as typing <tt>^C</tt>, or a system-wide event,
+ * user interrupt, such as typing {@code ^C}, or a system-wide event,
* such as user logoff or system shutdown.
*
* </ul>
@@ -134,17 +133,16 @@ public class Runtime {
* run all uninvoked finalizers if finalization-on-exit has been enabled.
* Finally, the virtual machine will halt. Note that daemon threads will
* continue to run during the shutdown sequence, as will non-daemon threads
- * if shutdown was initiated by invoking the <tt>{@link #exit exit}</tt>
- * method.
+ * if shutdown was initiated by invoking the {@link #exit exit} method.
*
* <p> Once the shutdown sequence has begun it can be stopped only by
- * invoking the <tt>{@link #halt halt}</tt> method, which forcibly
+ * invoking the {@link #halt halt} method, which forcibly
* terminates the virtual machine.
*
* <p> Once the shutdown sequence has begun it is impossible to register a
* new shutdown hook or de-register a previously-registered hook.
* Attempting either of these operations will cause an
- * <tt>{@link IllegalStateException}</tt> to be thrown.
+ * {@link IllegalStateException} to be thrown.
*
* <p> Shutdown hooks run at a delicate time in the life cycle of a virtual
* machine and should therefore be coded defensively. They should, in
@@ -156,7 +154,7 @@ public class Runtime {
* deadlocks.
*
* <p> Shutdown hooks should also finish their work quickly. When a
- * program invokes <tt>{@link #exit exit}</tt> the expectation is
+ * program invokes {@link #exit exit} the expectation is
* that the virtual machine will promptly shut down and exit. When the
* virtual machine is terminated due to user logoff or system shutdown the
* underlying operating system may only allow a fixed amount of time in
@@ -165,17 +163,17 @@ public class Runtime {
* hook.
*
* <p> Uncaught exceptions are handled in shutdown hooks just as in any
- * other thread, by invoking the <tt>{@link ThreadGroup#uncaughtException
- * uncaughtException}</tt> method of the thread's <tt>{@link
- * ThreadGroup}</tt> object. The default implementation of this method
- * prints the exception's stack trace to <tt>{@link System#err}</tt> and
+ * other thread, by invoking the
+ * {@link ThreadGroup#uncaughtException uncaughtException} method of the
+ * thread's {@link ThreadGroup} object. The default implementation of this
+ * method prints the exception's stack trace to {@link System#err} and
* terminates the thread; it does not cause the virtual machine to exit or
* halt.
*
* <p> In rare circumstances the virtual machine may <i>abort</i>, that is,
* stop running without shutting down cleanly. This occurs when the
* virtual machine is terminated externally, for example with the
- * <tt>SIGKILL</tt> signal on Unix or the <tt>TerminateProcess</tt> call on
+ * {@code SIGKILL} signal on Unix or the {@code TerminateProcess} call on
* Microsoft Windows. The virtual machine may also abort if a native
* method goes awry by, for example, corrupting internal data structures or
* attempting to access nonexistent memory. If the virtual machine aborts
@@ -183,7 +181,7 @@ public class Runtime {
* will be run.
*
* @param hook
- * An initialized but unstarted <tt>{@link Thread}</tt> object
+ * An initialized but unstarted {@link Thread} object
*
* @throws IllegalArgumentException
* If the specified hook has already been registered,
@@ -196,7 +194,7 @@ public class Runtime {
*
* @throws SecurityException
* If a security manager is present and it denies
- * <tt>{@link RuntimePermission}("shutdownHooks")</tt>
+ * {@link RuntimePermission}("shutdownHooks")
*
* @see #removeShutdownHook
* @see #halt(int)
@@ -212,11 +210,11 @@ public class Runtime {
}
/**
- * De-registers a previously-registered virtual-machine shutdown hook. <p>
+ * De-registers a previously-registered virtual-machine shutdown hook.
*
* @param hook the hook to remove
- * @return <tt>true</tt> if the specified hook had previously been
- * registered and was successfully de-registered, <tt>false</tt>
+ * @return {@code true} if the specified hook had previously been
+ * registered and was successfully de-registered, {@code false}
* otherwise.
*
* @throws IllegalStateException
@@ -225,7 +223,7 @@ public class Runtime {
*
* @throws SecurityException
* If a security manager is present and it denies
- * <tt>{@link RuntimePermission}("shutdownHooks")</tt>
+ * {@link RuntimePermission}("shutdownHooks")
*
* @see #addShutdownHook
* @see #exit(int)
@@ -244,23 +242,23 @@ public class Runtime {
* method never returns normally.
*
* <p> This method should be used with extreme caution. Unlike the
- * <tt>{@link #exit exit}</tt> method, this method does not cause shutdown
+ * {@link #exit exit} method, this method does not cause shutdown
* hooks to be started and does not run uninvoked finalizers if
* finalization-on-exit has been enabled. If the shutdown sequence has
* already been initiated then this method does not wait for any running
* shutdown hooks or finalizers to finish their work.
*
* @param status
- * Termination status. By convention, a nonzero status code
- * indicates abnormal termination. If the <tt>{@link Runtime#exit
- * exit}</tt> (equivalently, <tt>{@link System#exit(int)
- * System.exit}</tt>) method has already been invoked then this
- * status code will override the status code passed to that method.
+ * Termination status. By convention, a nonzero status code
+ * indicates abnormal termination. If the {@link Runtime#exit exit}
+ * (equivalently, {@link System#exit(int) System.exit}) method
+ * has already been invoked then this status code
+ * will override the status code passed to that method.
*
* @throws SecurityException
- * If a security manager is present and its <tt>{@link
- * SecurityManager#checkExit checkExit}</tt> method does not permit
- * an exit with the specified status
+ * If a security manager is present and its
+ * {@link SecurityManager#checkExit checkExit} method
+ * does not permit an exit with the specified status
*
* @see #exit
* @see #addShutdownHook
@@ -282,7 +280,7 @@ public class Runtime {
* By default, finalization on exit is disabled.
*
* <p>If there is a security manager,
- * its <code>checkExit</code> method is first called
+ * its {@code checkExit} method is first called
* with 0 as its argument to ensure the exit is allowed.
* This could result in a SecurityException.
*
@@ -293,7 +291,7 @@ public class Runtime {
* behavior or deadlock.
*
* @throws SecurityException
- * if a security manager exists and its <code>checkExit</code>
+ * if a security manager exists and its {@code checkExit}
* method doesn't allow the exit.
*
* @see java.lang.Runtime#exit(int)
@@ -318,9 +316,9 @@ public class Runtime {
* Executes the specified string command in a separate process.
*
* <p>This is a convenience method. An invocation of the form
- * <tt>exec(command)</tt>
+ * {@code exec(command)}
* behaves in exactly the same way as the invocation
- * <tt>{@link #exec(String, String[], File) exec}(command, null, null)</tt>.
+ * {@link #exec(String, String[], File) exec}{@code (command, null, null)}.
*
* @param command a specified system command.
*
@@ -335,10 +333,10 @@ public class Runtime {
* If an I/O error occurs
*
* @throws NullPointerException
- * If <code>command</code> is <code>null</code>
+ * If {@code command} is {@code null}
*
* @throws IllegalArgumentException
- * If <code>command</code> is empty
+ * If {@code command} is empty
*
* @see #exec(String[], String[], File)
* @see ProcessBuilder
@@ -352,16 +350,16 @@ public class Runtime {
* specified environment.
*
* <p>This is a convenience method. An invocation of the form
- * <tt>exec(command, envp)</tt>
+ * {@code exec(command, envp)}
* behaves in exactly the same way as the invocation
- * <tt>{@link #exec(String, String[], File) exec}(command, envp, null)</tt>.
+ * {@link #exec(String, String[], File) exec}{@code (command, envp, null)}.
*
* @param command a specified system command.
*
* @param envp array of strings, each element of which
* has environment variable settings in the format
* <i>name</i>=<i>value</i>, or
- * <tt>null</tt> if the subprocess should inherit
+ * {@code null} if the subprocess should inherit
* the environment of the current process.
*
* @return A new {@link Process} object for managing the subprocess
@@ -375,11 +373,11 @@ public class Runtime {
* If an I/O error occurs
*
* @throws NullPointerException
- * If <code>command</code> is <code>null</code>,
- * or one of the elements of <code>envp</code> is <code>null</code>
+ * If {@code command} is {@code null},
+ * or one of the elements of {@code envp} is {@code null}
*
* @throws IllegalArgumentException
- * If <code>command</code> is empty
+ * If {@code command} is empty
*
* @see #exec(String[], String[], File)
* @see ProcessBuilder
@@ -393,29 +391,29 @@ public class Runtime {
* specified environment and working directory.
*
* <p>This is a convenience method. An invocation of the form
- * <tt>exec(command, envp, dir)</tt>
+ * {@code exec(command, envp, dir)}
* behaves in exactly the same way as the invocation
- * <tt>{@link #exec(String[], String[], File) exec}(cmdarray, envp, dir)</tt>,
- * where <code>cmdarray</code> is an array of all the tokens in
- * <code>command</code>.
+ * {@link #exec(String[], String[], File) exec}{@code (cmdarray, envp, dir)},
+ * where {@code cmdarray} is an array of all the tokens in
+ * {@code command}.
*
- * <p>More precisely, the <code>command</code> string is broken
+ * <p>More precisely, the {@code command} string is broken
* into tokens using a {@link StringTokenizer} created by the call
- * <code>new {@link StringTokenizer}(command)</code> with no
+ * {@code new {@link StringTokenizer}(command)} with no
* further modification of the character categories. The tokens
* produced by the tokenizer are then placed in the new string
- * array <code>cmdarray</code>, in the same order.
+ * array {@code cmdarray}, in the same order.
*
* @param command a specified system command.
*
* @param envp array of strings, each element of which
* has environment variable settings in the format
* <i>name</i>=<i>value</i>, or
- * <tt>null</tt> if the subprocess should inherit
+ * {@code null} if the subprocess should inherit
* the environment of the current process.
*
* @param dir the working directory of the subprocess, or
- * <tt>null</tt> if the subprocess should inherit
+ * {@code null} if the subprocess should inherit
* the working directory of the current process.
*
* @return A new {@link Process} object for managing the subprocess
@@ -429,11 +427,11 @@ public class Runtime {
* If an I/O error occurs
*
* @throws NullPointerException
- * If <code>command</code> is <code>null</code>,
- * or one of the elements of <code>envp</code> is <code>null</code>
+ * If {@code command} is {@code null},
+ * or one of the elements of {@code envp} is {@code null}
*
* @throws IllegalArgumentException
- * If <code>command</code> is empty
+ * If {@code command} is empty
*
* @see ProcessBuilder
* @since 1.3
@@ -454,9 +452,9 @@ public class Runtime {
* Executes the specified command and arguments in a separate process.
*
* <p>This is a convenience method. An invocation of the form
- * <tt>exec(cmdarray)</tt>
+ * {@code exec(cmdarray)}
* behaves in exactly the same way as the invocation
- * <tt>{@link #exec(String[], String[], File) exec}(cmdarray, null, null)</tt>.
+ * {@link #exec(String[], String[], File) exec}{@code (cmdarray, null, null)}.
*
* @param cmdarray array containing the command to call and
* its arguments.
@@ -472,12 +470,12 @@ public class Runtime {
* If an I/O error occurs
*
* @throws NullPointerException
- * If <code>cmdarray</code> is <code>null</code>,
- * or one of the elements of <code>cmdarray</code> is <code>null</code>
+ * If {@code cmdarray} is {@code null},
+ * or one of the elements of {@code cmdarray} is {@code null}
*
* @throws IndexOutOfBoundsException
- * If <code>cmdarray</code> is an empty array
- * (has length <code>0</code>)
+ * If {@code cmdarray} is an empty array
+ * (has length {@code 0})
*
* @see ProcessBuilder
*/
@@ -490,9 +488,9 @@ public class Runtime {
* with the specified environment.
*
* <p>This is a convenience method. An invocation of the form
- * <tt>exec(cmdarray, envp)</tt>
+ * {@code exec(cmdarray, envp)}
* behaves in exactly the same way as the invocation
- * <tt>{@link #exec(String[], String[], File) exec}(cmdarray, envp, null)</tt>.
+ * {@link #exec(String[], String[], File) exec}{@code (cmdarray, envp, null)}.
*
* @param cmdarray array containing the command to call and
* its arguments.
@@ -500,7 +498,7 @@ public class Runtime {
* @param envp array of strings, each element of which
* has environment variable settings in the format
* <i>name</i>=<i>value</i>, or
- * <tt>null</tt> if the subprocess should inherit
+ * {@code null} if the subprocess should inherit
* the environment of the current process.
*
* @return A new {@link Process} object for managing the subprocess
@@ -514,13 +512,13 @@ public class Runtime {
* If an I/O error occurs
*
* @throws NullPointerException
- * If <code>cmdarray</code> is <code>null</code>,
- * or one of the elements of <code>cmdarray</code> is <code>null</code>,
- * or one of the elements of <code>envp</code> is <code>null</code>
+ * If {@code cmdarray} is {@code null},
+ * or one of the elements of {@code cmdarray} is {@code null},
+ * or one of the elements of {@code envp} is {@code null}
*
* @throws IndexOutOfBoundsException
- * If <code>cmdarray</code> is an empty array
- * (has length <code>0</code>)
+ * If {@code cmdarray} is an empty array
+ * (has length {@code 0})
*
* @see ProcessBuilder
*/
@@ -533,17 +531,17 @@ public class Runtime {
* Executes the specified command and arguments in a separate process with
* the specified environment and working directory.
*
- * <p>Given an array of strings <code>cmdarray</code>, representing the
- * tokens of a command line, and an array of strings <code>envp</code>,
+ * <p>Given an array of strings {@code cmdarray}, representing the
+ * tokens of a command line, and an array of strings {@code envp},
* representing "environment" variable settings, this method creates
* a new process in which to execute the specified command.
*
- * <p>This method checks that <code>cmdarray</code> is a valid operating
+ * <p>This method checks that {@code cmdarray} is a valid operating
* system command. Which commands are valid is system-dependent,
* but at the very least the command must be a non-empty list of
* non-null strings.
*
- * <p>If <tt>envp</tt> is <tt>null</tt>, the subprocess inherits the
+ * <p>If {@code envp} is {@code null}, the subprocess inherits the
* environment settings of the current process.
*
* <p>A minimal set of system dependent environment variables may
@@ -554,14 +552,14 @@ public class Runtime {
* <p>{@link ProcessBuilder#start()} is now the preferred way to
* start a process with a modified environment.
*
- * <p>The working directory of the new subprocess is specified by <tt>dir</tt>.
- * If <tt>dir</tt> is <tt>null</tt>, the subprocess inherits the
+ * <p>The working directory of the new subprocess is specified by {@code dir}.
+ * If {@code dir} is {@code null}, the subprocess inherits the
* current working directory of the current process.
*
* <p>If a security manager exists, its
* {@link SecurityManager#checkExec checkExec}
* method is invoked with the first component of the array
- * <code>cmdarray</code> as its argument. This may result in a
+ * {@code cmdarray} as its argument. This may result in a
* {@link SecurityException} being thrown.
*
* <p>Starting an operating system process is highly system-dependent.
@@ -586,11 +584,11 @@ public class Runtime {
* @param envp array of strings, each element of which
* has environment variable settings in the format
* <i>name</i>=<i>value</i>, or
- * <tt>null</tt> if the subprocess should inherit
+ * {@code null} if the subprocess should inherit
* the environment of the current process.
*
* @param dir the working directory of the subprocess, or
- * <tt>null</tt> if the subprocess should inherit
+ * {@code null} if the subprocess should inherit
* the working directory of the current process.
*
* @return A new {@link Process} object for managing the subprocess
@@ -607,13 +605,13 @@ public class Runtime {
* If an I/O error occurs
*
* @throws NullPointerException
- * If <code>cmdarray</code> is <code>null</code>,
- * or one of the elements of <code>cmdarray</code> is <code>null</code>,
- * or one of the elements of <code>envp</code> is <code>null</code>
+ * If {@code cmdarray} is {@code null},
+ * or one of the elements of {@code cmdarray} is {@code null},
+ * or one of the elements of {@code envp} is {@code null}
*
* @throws IndexOutOfBoundsException
- * If <code>cmdarray</code> is an empty array
- * (has length <code>0</code>)
+ * If {@code cmdarray} is an empty array
+ * (has length {@code 0})
*
* @see ProcessBuilder
* @since 1.3
@@ -643,8 +641,8 @@ public class Runtime {
/**
* Returns the amount of free memory in the Java Virtual Machine.
* Calling the
- * <code>gc</code> method may result in increasing the value returned
- * by <code>freeMemory.</code>
+ * {@code gc} method may result in increasing the value returned
+ * by {@code freeMemory.}
*
* @return an approximation to the total amount of memory currently
* available for future allocated objects, measured in bytes.
@@ -665,9 +663,9 @@ public class Runtime {
public native long totalMemory();
/**
- * Returns the maximum amount of memory that the Java virtual machine will
- * attempt to use. If there is no inherent limit then the value {@link
- * java.lang.Long#MAX_VALUE} will be returned.
+ * Returns the maximum amount of memory that the Java virtual machine
+ * will attempt to use. If there is no inherent limit then the value
+ * {@link java.lang.Long#MAX_VALUE} will be returned.
*
* @return the maximum amount of memory that the virtual machine will
* attempt to use, measured in bytes
@@ -683,10 +681,10 @@ public class Runtime {
* returns from the method call, the virtual machine has made
* its best effort to recycle all discarded objects.
* <p>
- * The name <code>gc</code> stands for "garbage
+ * The name {@code gc} stands for "garbage
* collector". The virtual machine performs this recycling
* process automatically as needed, in a separate thread, even if the
- * <code>gc</code> method is not invoked explicitly.
+ * {@code gc} method is not invoked explicitly.
* <p>
* The method {@link System#gc()} is the conventional and convenient
* means of invoking this method.
@@ -699,15 +697,15 @@ public class Runtime {
/**
* Runs the finalization methods of any objects pending finalization.
* Calling this method suggests that the Java virtual machine expend
- * effort toward running the <code>finalize</code> methods of objects
- * that have been found to be discarded but whose <code>finalize</code>
+ * effort toward running the {@code finalize} methods of objects
+ * that have been found to be discarded but whose {@code finalize}
* methods have not yet been run. When control returns from the
* method call, the virtual machine has made a best effort to
* complete all outstanding finalizations.
* <p>
* The virtual machine performs the finalization process
* automatically as needed, in a separate thread, if the
- * <code>runFinalization</code> method is not invoked explicitly.
+ * {@code runFinalization} method is not invoked explicitly.
* <p>
* The method {@link System#runFinalization()} is the conventional
* and convenient means of invoking this method.
@@ -720,7 +718,7 @@ public class Runtime {
/**
* Enables/Disables tracing of instructions.
- * If the <code>boolean</code> argument is <code>true</code>, this
+ * If the {@code boolean} argument is {@code true}, this
* method suggests that the Java virtual machine emit debugging
* information for each instruction in the virtual machine as it
* is executed. The format of this information, and the file or other
@@ -729,18 +727,18 @@ public class Runtime {
* this feature. The destination of the trace output is system
* dependent.
* <p>
- * If the <code>boolean</code> argument is <code>false</code>, this
+ * If the {@code boolean} argument is {@code false}, this
* method causes the virtual machine to stop performing the
* detailed instruction trace it is performing.
*
- * @param on <code>true</code> to enable instruction tracing;
- * <code>false</code> to disable this feature.
+ * @param on {@code true} to enable instruction tracing;
+ * {@code false} to disable this feature.
*/
public void traceInstructions(boolean on) { }
/**
* Enables/Disables tracing of method calls.
- * If the <code>boolean</code> argument is <code>true</code>, this
+ * If the {@code boolean} argument is {@code true}, this
* method suggests that the Java virtual machine emit debugging
* information for each method in the virtual machine as it is
* called. The format of this information, and the file or other output
@@ -751,8 +749,8 @@ public class Runtime {
* Calling this method with argument false suggests that the
* virtual machine cease emitting per-call debugging information.
*
- * @param on <code>true</code> to enable instruction tracing;
- * <code>false</code> to disable this feature.
+ * @param on {@code true} to enable instruction tracing;
+ * {@code false} to disable this feature.
*/
public void traceMethodCalls(boolean on) { }
@@ -760,7 +758,7 @@ public class Runtime {
* Loads the native library specified by the filename argument. The filename
* argument must be an absolute path name.
* (for example
- * <code>Runtime.getRuntime().load("/home/avh/lib/libX11.so");</code>).
+ * {@code Runtime.getRuntime().load("/home/avh/lib/libX11.so");}).
*
* If the filename argument, when stripped of any platform-specific library
* prefix, path, and file extension, indicates a library whose name is,
@@ -773,8 +771,8 @@ public class Runtime {
* Otherwise, the filename argument is mapped to a native library image in
* an implementation-dependent manner.
* <p>
- * First, if there is a security manager, its <code>checkLink</code>
- * method is called with the <code>filename</code> as its argument.
+ * First, if there is a security manager, its {@code checkLink}
+ * method is called with the {@code filename} as its argument.
* This may result in a security exception.
* <p>
* This is similar to the method {@link #loadLibrary(String)}, but it
@@ -786,14 +784,14 @@ public class Runtime {
*
* @param filename the file to load.
* @exception SecurityException if a security manager exists and its
- * <code>checkLink</code> method doesn't allow
+ * {@code checkLink} method doesn't allow
* loading of the specified dynamic library
* @exception UnsatisfiedLinkError if either the filename is not an
* absolute path name, the native library is not statically
* linked with the VM, or the library cannot be mapped to
* a native library image by the host system.
- * @exception NullPointerException if <code>filename</code> is
- * <code>null</code>
+ * @exception NullPointerException if {@code filename} is
+ * {@code null}
* @see java.lang.Runtime#getRuntime()
* @see java.lang.SecurityException
* @see java.lang.SecurityManager#checkLink(java.lang.String)
@@ -816,26 +814,26 @@ public class Runtime {
}
/**
- * Loads the native library specified by the <code>libname</code>
- * argument. The <code>libname</code> argument must not contain any platform
+ * Loads the native library specified by the {@code libname}
+ * argument. The {@code libname} argument must not contain any platform
* specific prefix, file extension or path. If a native library
- * called <code>libname</code> is statically linked with the VM, then the
- * JNI_OnLoad_<code>libname</code> function exported by the library is invoked.
+ * called {@code libname} is statically linked with the VM, then the
+ * JNI_OnLoad_{@code libname} function exported by the library is invoked.
* See the JNI Specification for more details.
*
* Otherwise, the libname argument is loaded from a system library
* location and mapped to a native library image in an implementation-
* dependent manner.
* <p>
- * First, if there is a security manager, its <code>checkLink</code>
- * method is called with the <code>libname</code> as its argument.
+ * First, if there is a security manager, its {@code checkLink}
+ * method is called with the {@code libname} as its argument.
* This may result in a security exception.
* <p>
* The method {@link System#loadLibrary(String)} is the conventional
* and convenient means of invoking this method. If native
* methods are to be used in the implementation of a class, a standard
* strategy is to put the native code in a library file (call it
- * <code>LibFile</code>) and then to put a static initializer:
+ * {@code LibFile}) and then to put a static initializer:
* <blockquote><pre>
* static { System.loadLibrary("LibFile"); }
* </pre></blockquote>
@@ -848,14 +846,14 @@ public class Runtime {
*
* @param libname the name of the library.
* @exception SecurityException if a security manager exists and its
- * <code>checkLink</code> method doesn't allow
+ * {@code checkLink} method doesn't allow
* loading of the specified dynamic library
* @exception UnsatisfiedLinkError if either the libname argument
* contains a file path, the native library is not statically
* linked with the VM, or the library cannot be mapped to a
* native library image by the host system.
- * @exception NullPointerException if <code>libname</code> is
- * <code>null</code>
+ * @exception NullPointerException if {@code libname} is
+ * {@code null}
* @see java.lang.SecurityException
* @see java.lang.SecurityManager#checkLink(java.lang.String)
*/
@@ -878,7 +876,7 @@ public class Runtime {
/**
* Creates a localized version of an input stream. This method takes
- * an <code>InputStream</code> and returns an <code>InputStream</code>
+ * an {@code InputStream} and returns an {@code InputStream}
* equivalent to the argument in all respects except that it is
* localized: as characters in the local character set are read from
* the stream, they are automatically converted from the local
@@ -894,7 +892,7 @@ public class Runtime {
* @see java.io.InputStreamReader#InputStreamReader(java.io.InputStream)
* @deprecated As of JDK&nbsp;1.1, the preferred way to translate a byte
* stream in the local encoding into a character stream in Unicode is via
- * the <code>InputStreamReader</code> and <code>BufferedReader</code>
+ * the {@code InputStreamReader} and {@code BufferedReader}
* classes.
*/
@Deprecated
@@ -904,8 +902,8 @@ public class Runtime {
/**
* Creates a localized version of an output stream. This method
- * takes an <code>OutputStream</code> and returns an
- * <code>OutputStream</code> equivalent to the argument in all respects
+ * takes an {@code OutputStream} and returns an
+ * {@code OutputStream} equivalent to the argument in all respects
* except that it is localized: as Unicode characters are written to
* the stream, they are automatically converted to the local
* character set.
@@ -915,8 +913,8 @@ public class Runtime {
*
* @deprecated As of JDK&nbsp;1.1, the preferred way to translate a
* Unicode character stream into a byte stream in the local encoding is via
- * the <code>OutputStreamWriter</code>, <code>BufferedWriter</code>, and
- * <code>PrintWriter</code> classes.
+ * the {@code OutputStreamWriter}, {@code BufferedWriter}, and
+ * {@code PrintWriter} classes.
*
* @param out OutputStream to localize
* @return a localized output stream
diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/LambdaForm.java b/jdk/src/java.base/share/classes/java/lang/invoke/LambdaForm.java
index 5c441071b92..09a742f55ec 100644
--- a/jdk/src/java.base/share/classes/java/lang/invoke/LambdaForm.java
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/LambdaForm.java
@@ -631,7 +631,7 @@ class LambdaForm {
* as a sort of pre-invocation linkage step.)
*/
public void prepare() {
- if (COMPILE_THRESHOLD == 0) {
+ if (COMPILE_THRESHOLD == 0 && !isCompiled) {
compileToBytecode();
}
if (this.vmentry != null) {
@@ -645,11 +645,11 @@ class LambdaForm {
/** Generate optimizable bytecode for this form. */
MemberName compileToBytecode() {
- MethodType invokerType = methodType();
- assert(vmentry == null || vmentry.getMethodType().basicType().equals(invokerType));
if (vmentry != null && isCompiled) {
return vmentry; // already compiled somehow
}
+ MethodType invokerType = methodType();
+ assert(vmentry == null || vmentry.getMethodType().basicType().equals(invokerType));
try {
vmentry = InvokerBytecodeGenerator.generateCustomizedCode(this, invokerType);
if (TRACE_INTERPRETER)
diff --git a/jdk/src/java.base/share/classes/java/nio/file/AtomicMoveNotSupportedException.java b/jdk/src/java.base/share/classes/java/nio/file/AtomicMoveNotSupportedException.java
index 27947c31a8c..5849565330e 100644
--- a/jdk/src/java.base/share/classes/java/nio/file/AtomicMoveNotSupportedException.java
+++ b/jdk/src/java.base/share/classes/java/nio/file/AtomicMoveNotSupportedException.java
@@ -45,7 +45,7 @@ public class AtomicMoveNotSupportedException
* @param target
* a string identifying the target file or {@code null} if not known
* @param reason
- * a reason message with additional information
+ * a reason message with additional information or {@code null}
*/
public AtomicMoveNotSupportedException(String source,
String target,
diff --git a/jdk/src/java.base/share/classes/java/security/AccessControlContext.java b/jdk/src/java.base/share/classes/java/security/AccessControlContext.java
index feed0cf11e1..5e588602c97 100644
--- a/jdk/src/java.base/share/classes/java/security/AccessControlContext.java
+++ b/jdk/src/java.base/share/classes/java/security/AccessControlContext.java
@@ -458,7 +458,7 @@ public final class AccessControlContext {
Thread.dumpStack();
final ProtectionDomain pd = context[i];
final Debug db = debug;
- AccessController.doPrivileged (new PrivilegedAction<Void>() {
+ AccessController.doPrivileged (new PrivilegedAction<>() {
public Void run() {
db.println("domain that failed "+pd);
return null;
diff --git a/jdk/src/java.base/share/classes/java/security/AccessController.java b/jdk/src/java.base/share/classes/java/security/AccessController.java
index e2b8e584560..90503d29cf8 100644
--- a/jdk/src/java.base/share/classes/java/security/AccessController.java
+++ b/jdk/src/java.base/share/classes/java/security/AccessController.java
@@ -612,7 +612,7 @@ public final class AccessController {
private static ProtectionDomain getCallerPD(final Class <?> caller) {
ProtectionDomain callerPd = doPrivileged
- (new PrivilegedAction<ProtectionDomain>() {
+ (new PrivilegedAction<>() {
public ProtectionDomain run() {
return caller.getProtectionDomain();
}
diff --git a/jdk/src/java.base/share/classes/java/security/AllPermission.java b/jdk/src/java.base/share/classes/java/security/AllPermission.java
index b830b884c59..fcda7ce0bc1 100644
--- a/jdk/src/java.base/share/classes/java/security/AllPermission.java
+++ b/jdk/src/java.base/share/classes/java/security/AllPermission.java
@@ -212,7 +212,7 @@ final class AllPermissionCollection
* @return an enumeration of all the AllPermission objects.
*/
public Enumeration<Permission> elements() {
- return new Enumeration<Permission>() {
+ return new Enumeration<>() {
private boolean hasMore = all_allowed;
public boolean hasMoreElements() {
diff --git a/jdk/src/java.base/share/classes/java/security/BasicPermission.java b/jdk/src/java.base/share/classes/java/security/BasicPermission.java
index 7e0f4fb85b4..92dbe345b26 100644
--- a/jdk/src/java.base/share/classes/java/security/BasicPermission.java
+++ b/jdk/src/java.base/share/classes/java/security/BasicPermission.java
@@ -332,7 +332,7 @@ final class BasicPermissionCollection
*/
public BasicPermissionCollection(Class<?> clazz) {
- perms = new HashMap<String, Permission>(11);
+ perms = new HashMap<>(11);
all_allowed = false;
permClass = clazz;
}
@@ -533,7 +533,7 @@ final class BasicPermissionCollection
@SuppressWarnings("unchecked")
Hashtable<String, Permission> permissions =
(Hashtable<String, Permission>)gfields.get("permissions", null);
- perms = new HashMap<String, Permission>(permissions.size()*2);
+ perms = new HashMap<>(permissions.size()*2);
perms.putAll(permissions);
// Get all_allowed
diff --git a/jdk/src/java.base/share/classes/java/security/CodeSource.java b/jdk/src/java.base/share/classes/java/security/CodeSource.java
index 62a5959ecd8..e05c68f9e49 100644
--- a/jdk/src/java.base/share/classes/java/security/CodeSource.java
+++ b/jdk/src/java.base/share/classes/java/security/CodeSource.java
@@ -543,7 +543,7 @@ public class CodeSource implements java.io.Serializable {
if (size > 0) {
// we know of 3 different cert types: X.509, PGP, SDSI, which
// could all be present in the stream at the same time
- cfs = new Hashtable<String, CertificateFactory>(3);
+ cfs = new Hashtable<>(3);
this.certs = new java.security.cert.Certificate[size];
}
diff --git a/jdk/src/java.base/share/classes/java/security/Identity.java b/jdk/src/java.base/share/classes/java/security/Identity.java
index 6a5e87e20fa..467e18d1b84 100644
--- a/jdk/src/java.base/share/classes/java/security/Identity.java
+++ b/jdk/src/java.base/share/classes/java/security/Identity.java
@@ -185,7 +185,7 @@ public abstract class Identity implements Principal, Serializable {
check("setIdentityPublicKey");
this.publicKey = key;
- certificates = new Vector<Certificate>();
+ certificates = new Vector<>();
}
/**
@@ -248,7 +248,7 @@ public abstract class Identity implements Principal, Serializable {
check("addIdentityCertificate");
if (certificates == null) {
- certificates = new Vector<Certificate>();
+ certificates = new Vector<>();
}
if (publicKey != null) {
if (!keyEquals(publicKey, certificate.getPublicKey())) {
diff --git a/jdk/src/java.base/share/classes/java/security/IdentityScope.java b/jdk/src/java.base/share/classes/java/security/IdentityScope.java
index 64c4a634374..763f8308c53 100644
--- a/jdk/src/java.base/share/classes/java/security/IdentityScope.java
+++ b/jdk/src/java.base/share/classes/java/security/IdentityScope.java
@@ -74,7 +74,7 @@ class IdentityScope extends Identity {
private static void initializeSystemScope() {
String classname = AccessController.doPrivileged(
- new PrivilegedAction<String>() {
+ new PrivilegedAction<>() {
public String run() {
return Security.getProperty("system.scope");
}
diff --git a/jdk/src/java.base/share/classes/java/security/KeyStore.java b/jdk/src/java.base/share/classes/java/security/KeyStore.java
index 8fde796e041..75b64ab337a 100644
--- a/jdk/src/java.base/share/classes/java/security/KeyStore.java
+++ b/jdk/src/java.base/share/classes/java/security/KeyStore.java
@@ -976,7 +976,7 @@ public class KeyStore {
*/
public final static String getDefaultType() {
String kstype;
- kstype = AccessController.doPrivileged(new PrivilegedAction<String>() {
+ kstype = AccessController.doPrivileged(new PrivilegedAction<>() {
public String run() {
return Security.getProperty(KEYSTORE_TYPE);
}
diff --git a/jdk/src/java.base/share/classes/java/security/Permissions.java b/jdk/src/java.base/share/classes/java/security/Permissions.java
index cc9c69358ee..56a5059351b 100644
--- a/jdk/src/java.base/share/classes/java/security/Permissions.java
+++ b/jdk/src/java.base/share/classes/java/security/Permissions.java
@@ -99,7 +99,7 @@ implements Serializable
* Creates a new Permissions object containing no PermissionCollections.
*/
public Permissions() {
- permsMap = new HashMap<Class<?>, PermissionCollection>(11);
+ permsMap = new HashMap<>(11);
allPermission = null;
}
@@ -394,7 +394,7 @@ implements Serializable
@SuppressWarnings("unchecked")
Hashtable<Class<?>, PermissionCollection> perms =
(Hashtable<Class<?>, PermissionCollection>)gfields.get("perms", null);
- permsMap = new HashMap<Class<?>, PermissionCollection>(perms.size()*2);
+ permsMap = new HashMap<>(perms.size()*2);
permsMap.putAll(perms);
// Set hasUnresolved
@@ -488,7 +488,7 @@ implements Serializable
*/
PermissionsHash() {
- permsMap = new HashMap<Permission, Permission>(11);
+ permsMap = new HashMap<>(11);
}
/**
@@ -597,7 +597,7 @@ implements Serializable
@SuppressWarnings("unchecked")
Hashtable<Permission, Permission> perms =
(Hashtable<Permission, Permission>)gfields.get("perms", null);
- permsMap = new HashMap<Permission, Permission>(perms.size()*2);
+ permsMap = new HashMap<>(perms.size()*2);
permsMap.putAll(perms);
}
}
diff --git a/jdk/src/java.base/share/classes/java/security/Policy.java b/jdk/src/java.base/share/classes/java/security/Policy.java
index ffbcb44cf3f..0864f10d188 100644
--- a/jdk/src/java.base/share/classes/java/security/Policy.java
+++ b/jdk/src/java.base/share/classes/java/security/Policy.java
@@ -170,7 +170,7 @@ public abstract class Policy {
PolicyInfo pinfo = policy.get();
if (pinfo.policy == null) {
String policy_class = AccessController.doPrivileged(
- new PrivilegedAction<String>() {
+ new PrivilegedAction<>() {
public String run() {
return Security.getProperty("policy.provider");
}
@@ -199,7 +199,7 @@ public abstract class Policy {
final String pc = policy_class;
Policy pol = AccessController.doPrivileged(
- new PrivilegedAction<Policy>() {
+ new PrivilegedAction<>() {
public Policy run() {
try {
ClassLoader cl =
@@ -303,7 +303,7 @@ public abstract class Policy {
*/
ProtectionDomain policyDomain =
- AccessController.doPrivileged(new PrivilegedAction<ProtectionDomain>() {
+ AccessController.doPrivileged(new PrivilegedAction<>() {
public ProtectionDomain run() {
return p.getClass().getProtectionDomain();
}
diff --git a/jdk/src/java.base/share/classes/java/security/ProtectionDomain.java b/jdk/src/java.base/share/classes/java/security/ProtectionDomain.java
index 6e7056ddc92..3dd5933fb06 100644
--- a/jdk/src/java.base/share/classes/java/security/ProtectionDomain.java
+++ b/jdk/src/java.base/share/classes/java/security/ProtectionDomain.java
@@ -367,7 +367,7 @@ public class ProtectionDomain {
PermissionCollection perms =
java.security.AccessController.doPrivileged
- (new java.security.PrivilegedAction<PermissionCollection>() {
+ (new java.security.PrivilegedAction<>() {
public PermissionCollection run() {
Policy p = Policy.getPolicyNoCheck();
return p.getPermissions(ProtectionDomain.this);
diff --git a/jdk/src/java.base/share/classes/java/security/Provider.java b/jdk/src/java.base/share/classes/java/security/Provider.java
index fa20e072d5f..80e510f7fba 100644
--- a/jdk/src/java.base/share/classes/java/security/Provider.java
+++ b/jdk/src/java.base/share/classes/java/security/Provider.java
@@ -711,7 +711,7 @@ public abstract class Provider extends Properties {
legacyChanged = true;
if (legacyStrings == null) {
- legacyStrings = new LinkedHashMap<String,String>();
+ legacyStrings = new LinkedHashMap<>();
}
return true;
}
@@ -773,7 +773,7 @@ public abstract class Provider extends Properties {
private void implReplaceAll(BiFunction<? super Object, ? super Object, ? extends Object> function) {
legacyChanged = true;
if (legacyStrings == null) {
- legacyStrings = new LinkedHashMap<String,String>();
+ legacyStrings = new LinkedHashMap<>();
} else {
legacyStrings.replaceAll((BiFunction<? super String, ? super String, ? extends String>) function);
}
@@ -905,7 +905,7 @@ public abstract class Provider extends Properties {
}
serviceSet = null;
if (legacyMap == null) {
- legacyMap = new LinkedHashMap<ServiceKey,Service>();
+ legacyMap = new LinkedHashMap<>();
} else {
legacyMap.clear();
}
@@ -1133,7 +1133,7 @@ public abstract class Provider extends Properties {
("service.getProvider() must match this Provider object");
}
if (serviceMap == null) {
- serviceMap = new LinkedHashMap<ServiceKey,Service>();
+ serviceMap = new LinkedHashMap<>();
}
servicesChanged = true;
String type = s.getType();
@@ -1305,7 +1305,7 @@ public abstract class Provider extends Properties {
}
static {
- knownEngines = new HashMap<String,EngineDescription>();
+ knownEngines = new HashMap<>();
// JCA
addEngine("AlgorithmParameterGenerator", false, null);
addEngine("AlgorithmParameters", false, null);
@@ -1431,14 +1431,14 @@ public abstract class Provider extends Properties {
private void addAlias(String alias) {
if (aliases.isEmpty()) {
- aliases = new ArrayList<String>(2);
+ aliases = new ArrayList<>(2);
}
aliases.add(alias);
}
void addAttribute(String type, String value) {
if (attributes.isEmpty()) {
- attributes = new HashMap<UString,String>(8);
+ attributes = new HashMap<>(8);
}
attributes.put(new UString(type), value);
}
@@ -1471,12 +1471,12 @@ public abstract class Provider extends Properties {
if (aliases == null) {
this.aliases = Collections.<String>emptyList();
} else {
- this.aliases = new ArrayList<String>(aliases);
+ this.aliases = new ArrayList<>(aliases);
}
if (attributes == null) {
this.attributes = Collections.<UString,String>emptyMap();
} else {
- this.attributes = new HashMap<UString,String>();
+ this.attributes = new HashMap<>();
for (Map.Entry<String,String> entry : attributes.entrySet()) {
this.attributes.put(new UString(entry.getKey()), entry.getValue());
}
@@ -1644,7 +1644,7 @@ public abstract class Provider extends Properties {
("class configured for " + type + " (provider: " +
provider.getName() + ") is not public.");
}
- classRef = new WeakReference<Class<?>>(clazz);
+ classRef = new WeakReference<>(clazz);
}
return clazz;
} catch (ClassNotFoundException e) {
diff --git a/jdk/src/java.base/share/classes/java/security/SecureRandom.java b/jdk/src/java.base/share/classes/java/security/SecureRandom.java
index a9c4469e8e1..f1531de25f7 100644
--- a/jdk/src/java.base/share/classes/java/security/SecureRandom.java
+++ b/jdk/src/java.base/share/classes/java/security/SecureRandom.java
@@ -616,7 +616,7 @@ public class SecureRandom extends java.util.Random {
throws NoSuchAlgorithmException {
String property = AccessController.doPrivileged(
- new PrivilegedAction<String>() {
+ new PrivilegedAction<>() {
@Override
public String run() {
return Security.getProperty(
diff --git a/jdk/src/java.base/share/classes/java/security/Security.java b/jdk/src/java.base/share/classes/java/security/Security.java
index 11e1a997639..5b7be62ca67 100644
--- a/jdk/src/java.base/share/classes/java/security/Security.java
+++ b/jdk/src/java.base/share/classes/java/security/Security.java
@@ -66,7 +66,7 @@ public final class Security {
// things in initialize that might require privs.
// (the FileInputStream call and the File.exists call,
// the securityPropFile call, etc)
- AccessController.doPrivileged(new PrivilegedAction<Void>() {
+ AccessController.doPrivileged(new PrivilegedAction<>() {
public Void run() {
initialize();
return null;
@@ -810,7 +810,7 @@ public final class Security {
final boolean pd = key.equals("package.definition");
if (pa || pd) {
- AccessController.doPrivileged(new PrivilegedAction<Void>() {
+ AccessController.doPrivileged(new PrivilegedAction<>() {
public Void run() {
try {
/* Get the class via the bootstrap class loader. */
diff --git a/jdk/src/java.base/share/classes/java/security/Signature.java b/jdk/src/java.base/share/classes/java/security/Signature.java
index bb2e75dd1ac..e23b0dde121 100644
--- a/jdk/src/java.base/share/classes/java/security/Signature.java
+++ b/jdk/src/java.base/share/classes/java/security/Signature.java
@@ -265,7 +265,7 @@ public abstract class Signature extends SignatureSpi {
private final static Map<String,Boolean> signatureInfo;
static {
- signatureInfo = new ConcurrentHashMap<String,Boolean>();
+ signatureInfo = new ConcurrentHashMap<>();
Boolean TRUE = Boolean.TRUE;
// pre-initialize with values for our SignatureSpi implementations
signatureInfo.put("sun.security.provider.DSA$RawDSA", TRUE);
diff --git a/jdk/src/java.base/share/classes/java/security/Signer.java b/jdk/src/java.base/share/classes/java/security/Signer.java
index 077538da979..2edf668b530 100644
--- a/jdk/src/java.base/share/classes/java/security/Signer.java
+++ b/jdk/src/java.base/share/classes/java/security/Signer.java
@@ -140,7 +140,7 @@ public abstract class Signer extends Identity {
}
try {
AccessController.doPrivileged(
- new PrivilegedExceptionAction<Void>() {
+ new PrivilegedExceptionAction<>() {
public Void run() throws KeyManagementException {
setPublicKey(pub);
return null;
diff --git a/jdk/src/java.base/share/classes/java/security/UnresolvedPermission.java b/jdk/src/java.base/share/classes/java/security/UnresolvedPermission.java
index 9dff324920e..e5b0d3047aa 100644
--- a/jdk/src/java.base/share/classes/java/security/UnresolvedPermission.java
+++ b/jdk/src/java.base/share/classes/java/security/UnresolvedPermission.java
@@ -560,7 +560,7 @@ implements java.io.Serializable
if (size > 0) {
// we know of 3 different cert types: X.509, PGP, SDSI, which
// could all be present in the stream at the same time
- cfs = new Hashtable<String, CertificateFactory>(3);
+ cfs = new Hashtable<>(3);
this.certs = new java.security.cert.Certificate[size];
}
diff --git a/jdk/src/java.base/share/classes/java/security/UnresolvedPermissionCollection.java b/jdk/src/java.base/share/classes/java/security/UnresolvedPermissionCollection.java
index 76336485842..87ab32d54f9 100644
--- a/jdk/src/java.base/share/classes/java/security/UnresolvedPermissionCollection.java
+++ b/jdk/src/java.base/share/classes/java/security/UnresolvedPermissionCollection.java
@@ -61,7 +61,7 @@ implements java.io.Serializable
*
*/
public UnresolvedPermissionCollection() {
- perms = new HashMap<String, List<UnresolvedPermission>>(11);
+ perms = new HashMap<>(11);
}
/**
@@ -82,7 +82,7 @@ implements java.io.Serializable
synchronized (this) {
v = perms.get(up.getName());
if (v == null) {
- v = new ArrayList<UnresolvedPermission>();
+ v = new ArrayList<>();
perms.put(up.getName(), v);
}
}
@@ -203,7 +203,7 @@ implements java.io.Serializable
Hashtable<String, Vector<UnresolvedPermission>> permissions =
(Hashtable<String, Vector<UnresolvedPermission>>)
gfields.get("permissions", null);
- perms = new HashMap<String, List<UnresolvedPermission>>(permissions.size()*2);
+ perms = new HashMap<>(permissions.size()*2);
// Convert each entry (Vector) into a List
Set<Map.Entry<String, Vector<UnresolvedPermission>>> set = permissions.entrySet();
diff --git a/jdk/src/java.base/share/classes/java/security/cert/CertPathBuilder.java b/jdk/src/java.base/share/classes/java/security/cert/CertPathBuilder.java
index 6008e9ec180..06c0d04fefa 100644
--- a/jdk/src/java.base/share/classes/java/security/cert/CertPathBuilder.java
+++ b/jdk/src/java.base/share/classes/java/security/cert/CertPathBuilder.java
@@ -301,7 +301,7 @@ public class CertPathBuilder {
*/
public final static String getDefaultType() {
String cpbtype =
- AccessController.doPrivileged(new PrivilegedAction<String>() {
+ AccessController.doPrivileged(new PrivilegedAction<>() {
public String run() {
return Security.getProperty(CPB_TYPE);
}
diff --git a/jdk/src/java.base/share/classes/java/security/cert/CertPathValidator.java b/jdk/src/java.base/share/classes/java/security/cert/CertPathValidator.java
index bd2ff56dd0c..ce9d38d1800 100644
--- a/jdk/src/java.base/share/classes/java/security/cert/CertPathValidator.java
+++ b/jdk/src/java.base/share/classes/java/security/cert/CertPathValidator.java
@@ -313,7 +313,7 @@ public class CertPathValidator {
*/
public final static String getDefaultType() {
String cpvtype =
- AccessController.doPrivileged(new PrivilegedAction<String>() {
+ AccessController.doPrivileged(new PrivilegedAction<>() {
public String run() {
return Security.getProperty(CPV_TYPE);
}
diff --git a/jdk/src/java.base/share/classes/java/security/cert/CertStore.java b/jdk/src/java.base/share/classes/java/security/cert/CertStore.java
index 1a8ed628c13..d39d6703b9a 100644
--- a/jdk/src/java.base/share/classes/java/security/cert/CertStore.java
+++ b/jdk/src/java.base/share/classes/java/security/cert/CertStore.java
@@ -409,7 +409,7 @@ public class CertStore {
*/
public final static String getDefaultType() {
String cstype;
- cstype = AccessController.doPrivileged(new PrivilegedAction<String>() {
+ cstype = AccessController.doPrivileged(new PrivilegedAction<>() {
public String run() {
return Security.getProperty(CERTSTORE_TYPE);
}
diff --git a/jdk/src/java.base/share/classes/java/security/cert/CertificateRevokedException.java b/jdk/src/java.base/share/classes/java/security/cert/CertificateRevokedException.java
index 8c1f0664023..0fce92f0ef7 100644
--- a/jdk/src/java.base/share/classes/java/security/cert/CertificateRevokedException.java
+++ b/jdk/src/java.base/share/classes/java/security/cert/CertificateRevokedException.java
@@ -231,7 +231,7 @@ public class CertificateRevokedException extends CertificateException {
if (size == 0) {
extensions = Collections.emptyMap();
} else {
- extensions = new HashMap<String, Extension>(size);
+ extensions = new HashMap<>(size);
}
// Read in the extensions and put the mappings in the extensions map
diff --git a/jdk/src/java.base/share/classes/java/security/cert/PKIXParameters.java b/jdk/src/java.base/share/classes/java/security/cert/PKIXParameters.java
index a411f6e2aec..4bc453ca956 100644
--- a/jdk/src/java.base/share/classes/java/security/cert/PKIXParameters.java
+++ b/jdk/src/java.base/share/classes/java/security/cert/PKIXParameters.java
@@ -120,8 +120,8 @@ public class PKIXParameters implements CertPathParameters {
setTrustAnchors(trustAnchors);
this.unmodInitialPolicies = Collections.<String>emptySet();
- this.certPathCheckers = new ArrayList<PKIXCertPathChecker>();
- this.certStores = new ArrayList<CertStore>();
+ this.certPathCheckers = new ArrayList<>();
+ this.certStores = new ArrayList<>();
}
/**
@@ -144,7 +144,7 @@ public class PKIXParameters implements CertPathParameters {
if (keystore == null)
throw new NullPointerException("the keystore parameter must be " +
"non-null");
- Set<TrustAnchor> hashSet = new HashSet<TrustAnchor>();
+ Set<TrustAnchor> hashSet = new HashSet<>();
Enumeration<String> aliases = keystore.aliases();
while (aliases.hasMoreElements()) {
String alias = aliases.nextElement();
@@ -156,8 +156,8 @@ public class PKIXParameters implements CertPathParameters {
}
setTrustAnchors(hashSet);
this.unmodInitialPolicies = Collections.<String>emptySet();
- this.certPathCheckers = new ArrayList<PKIXCertPathChecker>();
- this.certStores = new ArrayList<CertStore>();
+ this.certPathCheckers = new ArrayList<>();
+ this.certStores = new ArrayList<>();
}
/**
@@ -207,7 +207,7 @@ public class PKIXParameters implements CertPathParameters {
}
}
this.unmodTrustAnchors = Collections.unmodifiableSet
- (new HashSet<TrustAnchor>(trustAnchors));
+ (new HashSet<>(trustAnchors));
}
/**
@@ -256,7 +256,7 @@ public class PKIXParameters implements CertPathParameters {
+ "of type java.lang.String");
}
this.unmodInitialPolicies =
- Collections.unmodifiableSet(new HashSet<String>(initialPolicies));
+ Collections.unmodifiableSet(new HashSet<>(initialPolicies));
} else
this.unmodInitialPolicies = Collections.<String>emptySet();
}
@@ -280,7 +280,7 @@ public class PKIXParameters implements CertPathParameters {
*/
public void setCertStores(List<CertStore> stores) {
if (stores == null) {
- this.certStores = new ArrayList<CertStore>();
+ this.certStores = new ArrayList<>();
} else {
for (Iterator<CertStore> i = stores.iterator(); i.hasNext();) {
if (!(i.next() instanceof CertStore)) {
@@ -288,7 +288,7 @@ public class PKIXParameters implements CertPathParameters {
+ "of type java.security.cert.CertStore");
}
}
- this.certStores = new ArrayList<CertStore>(stores);
+ this.certStores = new ArrayList<>(stores);
}
}
@@ -316,7 +316,7 @@ public class PKIXParameters implements CertPathParameters {
*/
public List<CertStore> getCertStores() {
return Collections.unmodifiableList
- (new ArrayList<CertStore>(this.certStores));
+ (new ArrayList<>(this.certStores));
}
/**
@@ -544,14 +544,13 @@ public class PKIXParameters implements CertPathParameters {
*/
public void setCertPathCheckers(List<PKIXCertPathChecker> checkers) {
if (checkers != null) {
- List<PKIXCertPathChecker> tmpList =
- new ArrayList<PKIXCertPathChecker>();
+ List<PKIXCertPathChecker> tmpList = new ArrayList<>();
for (PKIXCertPathChecker checker : checkers) {
tmpList.add((PKIXCertPathChecker)checker.clone());
}
this.certPathCheckers = tmpList;
} else {
- this.certPathCheckers = new ArrayList<PKIXCertPathChecker>();
+ this.certPathCheckers = new ArrayList<>();
}
}
@@ -567,7 +566,7 @@ public class PKIXParameters implements CertPathParameters {
* @see #setCertPathCheckers
*/
public List<PKIXCertPathChecker> getCertPathCheckers() {
- List<PKIXCertPathChecker> tmpList = new ArrayList<PKIXCertPathChecker>();
+ List<PKIXCertPathChecker> tmpList = new ArrayList<>();
for (PKIXCertPathChecker ck : certPathCheckers) {
tmpList.add((PKIXCertPathChecker)ck.clone());
}
@@ -667,11 +666,11 @@ public class PKIXParameters implements CertPathParameters {
// must clone these because addCertStore, et al. modify them
if (certStores != null) {
- copy.certStores = new ArrayList<CertStore>(certStores);
+ copy.certStores = new ArrayList<>(certStores);
}
if (certPathCheckers != null) {
copy.certPathCheckers =
- new ArrayList<PKIXCertPathChecker>(certPathCheckers.size());
+ new ArrayList<>(certPathCheckers.size());
for (PKIXCertPathChecker checker : certPathCheckers) {
copy.certPathCheckers.add(
(PKIXCertPathChecker)checker.clone());
diff --git a/jdk/src/java.base/share/classes/java/security/cert/PKIXRevocationChecker.java b/jdk/src/java.base/share/classes/java/security/cert/PKIXRevocationChecker.java
index a345c96cac8..14e17cccb2d 100644
--- a/jdk/src/java.base/share/classes/java/security/cert/PKIXRevocationChecker.java
+++ b/jdk/src/java.base/share/classes/java/security/cert/PKIXRevocationChecker.java
@@ -170,7 +170,7 @@ public abstract class PKIXRevocationChecker extends PKIXCertPathChecker {
{
this.ocspExtensions = (extensions == null)
? Collections.<Extension>emptyList()
- : new ArrayList<Extension>(extensions);
+ : new ArrayList<>(extensions);
}
/**
@@ -232,7 +232,7 @@ public abstract class PKIXRevocationChecker extends PKIXCertPathChecker {
public void setOptions(Set<Option> options) {
this.options = (options == null)
? Collections.<Option>emptySet()
- : new HashSet<Option>(options);
+ : new HashSet<>(options);
}
/**
diff --git a/jdk/src/java.base/share/classes/java/security/cert/X509CRLSelector.java b/jdk/src/java.base/share/classes/java/security/cert/X509CRLSelector.java
index f761721007a..056d36ab298 100644
--- a/jdk/src/java.base/share/classes/java/security/cert/X509CRLSelector.java
+++ b/jdk/src/java.base/share/classes/java/security/cert/X509CRLSelector.java
@@ -124,8 +124,8 @@ public class X509CRLSelector implements CRLSelector {
issuerX500Principals = null;
} else {
// clone
- issuerX500Principals = new HashSet<X500Principal>(issuers);
- issuerNames = new HashSet<Object>();
+ issuerX500Principals = new HashSet<>(issuers);
+ issuerNames = new HashSet<>();
for (X500Principal p : issuerX500Principals) {
issuerNames.add(p.getEncoded());
}
@@ -288,10 +288,10 @@ public class X509CRLSelector implements CRLSelector {
*/
private void addIssuerNameInternal(Object name, X500Principal principal) {
if (issuerNames == null) {
- issuerNames = new HashSet<Object>();
+ issuerNames = new HashSet<>();
}
if (issuerX500Principals == null) {
- issuerX500Principals = new HashSet<X500Principal>();
+ issuerX500Principals = new HashSet<>();
}
issuerNames.add(name);
issuerX500Principals.add(principal);
@@ -311,7 +311,7 @@ public class X509CRLSelector implements CRLSelector {
private static HashSet<Object> cloneAndCheckIssuerNames(Collection<?> names)
throws IOException
{
- HashSet<Object> namesCopy = new HashSet<Object>();
+ HashSet<Object> namesCopy = new HashSet<>();
Iterator<?> i = names.iterator();
while (i.hasNext()) {
Object nameObject = i.next();
@@ -363,7 +363,7 @@ public class X509CRLSelector implements CRLSelector {
*/
private static HashSet<X500Principal> parseIssuerNames(Collection<Object> names)
throws IOException {
- HashSet<X500Principal> x500Principals = new HashSet<X500Principal>();
+ HashSet<X500Principal> x500Principals = new HashSet<>();
for (Iterator<Object> t = names.iterator(); t.hasNext(); ) {
Object nameObject = t.next();
if (nameObject instanceof String) {
@@ -701,9 +701,9 @@ public class X509CRLSelector implements CRLSelector {
X509CRLSelector copy = (X509CRLSelector)super.clone();
if (issuerNames != null) {
copy.issuerNames =
- new HashSet<Object>(issuerNames);
+ new HashSet<>(issuerNames);
copy.issuerX500Principals =
- new HashSet<X500Principal>(issuerX500Principals);
+ new HashSet<>(issuerX500Principals);
}
return copy;
} catch (CloneNotSupportedException e) {
diff --git a/jdk/src/java.base/share/classes/java/security/cert/X509CertSelector.java b/jdk/src/java.base/share/classes/java/security/cert/X509CertSelector.java
index 49d7e3da1a4..a498bbefc5f 100644
--- a/jdk/src/java.base/share/classes/java/security/cert/X509CertSelector.java
+++ b/jdk/src/java.base/share/classes/java/security/cert/X509CertSelector.java
@@ -619,8 +619,8 @@ public class X509CertSelector implements CertSelector {
keyPurposeOIDSet = null;
} else {
this.keyPurposeSet =
- Collections.unmodifiableSet(new HashSet<String>(keyPurposeSet));
- keyPurposeOIDSet = new HashSet<ObjectIdentifier>();
+ Collections.unmodifiableSet(new HashSet<>(keyPurposeSet));
+ keyPurposeOIDSet = new HashSet<>();
for (String s : this.keyPurposeSet) {
keyPurposeOIDSet.add(new ObjectIdentifier(s));
}
@@ -815,12 +815,12 @@ public class X509CertSelector implements CertSelector {
// First, ensure that the name parses
GeneralNameInterface tempName = makeGeneralNameInterface(type, name);
if (subjectAlternativeNames == null) {
- subjectAlternativeNames = new HashSet<List<?>>();
+ subjectAlternativeNames = new HashSet<>();
}
if (subjectAlternativeGeneralNames == null) {
- subjectAlternativeGeneralNames = new HashSet<GeneralNameInterface>();
+ subjectAlternativeGeneralNames = new HashSet<>();
}
- List<Object> list = new ArrayList<Object>(2);
+ List<Object> list = new ArrayList<>(2);
list.add(Integer.valueOf(type));
list.add(name);
subjectAlternativeNames.add(list);
@@ -845,7 +845,7 @@ public class X509CertSelector implements CertSelector {
* @throws IOException if a parsing error occurs
*/
private static Set<GeneralNameInterface> parseNames(Collection<List<?>> names) throws IOException {
- Set<GeneralNameInterface> genNames = new HashSet<GeneralNameInterface>();
+ Set<GeneralNameInterface> genNames = new HashSet<>();
for (List<?> nameList : names) {
if (nameList.size() != 2) {
throw new IOException("name list size not 2");
@@ -1096,10 +1096,10 @@ public class X509CertSelector implements CertSelector {
} else {
// Snapshot set and parse it
Set<String> tempSet = Collections.unmodifiableSet
- (new HashSet<String>(certPolicySet));
+ (new HashSet<>(certPolicySet));
/* Convert to Vector of ObjectIdentifiers */
Iterator<String> i = tempSet.iterator();
- Vector<CertificatePolicyId> polIdVector = new Vector<CertificatePolicyId>();
+ Vector<CertificatePolicyId> polIdVector = new Vector<>();
while (i.hasNext()) {
Object o = i.next();
if (!(o instanceof String)) {
@@ -1267,10 +1267,10 @@ public class X509CertSelector implements CertSelector {
// First, ensure that the name parses
GeneralNameInterface tempName = makeGeneralNameInterface(type, name);
if (pathToGeneralNames == null) {
- pathToNames = new HashSet<List<?>>();
- pathToGeneralNames = new HashSet<GeneralNameInterface>();
+ pathToNames = new HashSet<>();
+ pathToGeneralNames = new HashSet<>();
}
- List<Object> list = new ArrayList<Object>(2);
+ List<Object> list = new ArrayList<>(2);
list.add(Integer.valueOf(type));
list.add(name);
pathToNames.add(list);
@@ -1671,10 +1671,10 @@ public class X509CertSelector implements CertSelector {
*/
private static Set<List<?>> cloneAndCheckNames(Collection<List<?>> names) throws IOException {
// Copy the Lists and Collection
- Set<List<?>> namesCopy = new HashSet<List<?>>();
+ Set<List<?>> namesCopy = new HashSet<>();
for (List<?> o : names)
{
- namesCopy.add(new ArrayList<Object>(o));
+ namesCopy.add(new ArrayList<>(o));
}
// Check the contents of the Lists and clone any byte arrays
@@ -2397,7 +2397,7 @@ public class X509CertSelector implements CertSelector {
* Convert the Vector of PolicyInformation to a Vector
* of CertificatePolicyIds for easier comparison.
*/
- List<CertificatePolicyId> policyIDs = new ArrayList<CertificatePolicyId>(policies.size());
+ List<CertificatePolicyId> policyIDs = new ArrayList<>(policies.size());
for (PolicyInformation info : policies) {
policyIDs.add(info.getPolicyIdentifier());
}
diff --git a/jdk/src/java.base/share/classes/java/util/JapaneseImperialCalendar.java b/jdk/src/java.base/share/classes/java/util/JapaneseImperialCalendar.java
index c66518a5cc4..844a5a2923c 100644
--- a/jdk/src/java.base/share/classes/java/util/JapaneseImperialCalendar.java
+++ b/jdk/src/java.base/share/classes/java/util/JapaneseImperialCalendar.java
@@ -53,9 +53,9 @@ import sun.util.calendar.ZoneInfo;
* ------------------------------------------------------
* }</pre>
*
- * <p><code>ERA</code> value 0 specifies the years before Meiji and
- * the Gregorian year values are used. Unlike {@link
- * GregorianCalendar}, the Julian to Gregorian transition is not
+ * <p>{@code ERA} value 0 specifies the years before Meiji and
+ * the Gregorian year values are used. Unlike
+ * {@link GregorianCalendar}, the Julian to Gregorian transition is not
* supported because it doesn't make any sense to the Japanese
* calendar systems used before Meiji. To represent the years before
* Gregorian year 1, 0 and negative values are used. The Japanese
@@ -66,7 +66,7 @@ import sun.util.calendar.ZoneInfo;
* <p>A new era can be specified using property
* jdk.calendar.japanese.supplemental.era. The new era is added to the
* predefined eras. The syntax of the property is as follows.
- * <p><pre>
+ * <pre>
* {@code name=<name>,abbr=<abbr>,since=<time['u']>}
* </pre>
* where
@@ -83,7 +83,7 @@ import sun.util.calendar.ZoneInfo;
* ignored.
*
* <p>The following is an example of the property usage.
- * <p><pre>
+ * <pre>
* java -Djdk.calendar.japanese.supplemental.era="name=NewEra,abbr=N,since=253374307200000"
* </pre>
* The property specifies an era change to NewEra at 9999-02-11T00:00:00 local time.
@@ -315,7 +315,7 @@ class JapaneseImperialCalendar extends Calendar {
private transient int[] originalFields;
/**
- * Constructs a <code>JapaneseImperialCalendar</code> based on the current time
+ * Constructs a {@code JapaneseImperialCalendar} based on the current time
* in the given time zone with the given locale.
*
* @param zone the given time zone.
@@ -351,16 +351,16 @@ class JapaneseImperialCalendar extends Calendar {
}
/**
- * Compares this <code>JapaneseImperialCalendar</code> to the specified
- * <code>Object</code>. The result is <code>true</code> if and
- * only if the argument is a <code>JapaneseImperialCalendar</code> object
+ * Compares this {@code JapaneseImperialCalendar} to the specified
+ * {@code Object}. The result is {@code true} if and
+ * only if the argument is a {@code JapaneseImperialCalendar} object
* that represents the same time value (millisecond offset from
* the <a href="Calendar.html#Epoch">Epoch</a>) under the same
- * <code>Calendar</code> parameters.
+ * {@code Calendar} parameters.
*
* @param obj the object to compare with.
- * @return <code>true</code> if this object is equal to <code>obj</code>;
- * <code>false</code> otherwise.
+ * @return {@code true} if this object is equal to {@code obj};
+ * {@code false} otherwise.
* @see Calendar#compareTo(Calendar)
*/
@Override
@@ -371,7 +371,7 @@ class JapaneseImperialCalendar extends Calendar {
/**
* Generates the hash code for this
- * <code>JapaneseImperialCalendar</code> object.
+ * {@code JapaneseImperialCalendar} object.
*/
@Override
public int hashCode() {
@@ -382,27 +382,27 @@ class JapaneseImperialCalendar extends Calendar {
* Adds the specified (signed) amount of time to the given calendar field,
* based on the calendar's rules.
*
- * <p><em>Add rule 1</em>. The value of <code>field</code>
- * after the call minus the value of <code>field</code> before the
- * call is <code>amount</code>, modulo any overflow that has occurred in
- * <code>field</code>. Overflow occurs when a field value exceeds its
+ * <p><em>Add rule 1</em>. The value of {@code field}
+ * after the call minus the value of {@code field} before the
+ * call is {@code amount}, modulo any overflow that has occurred in
+ * {@code field}. Overflow occurs when a field value exceeds its
* range and, as a result, the next larger field is incremented or
* decremented and the field value is adjusted back into its range.</p>
*
* <p><em>Add rule 2</em>. If a smaller field is expected to be
* invariant, but it is impossible for it to be equal to its
* prior value because of changes in its minimum or maximum after
- * <code>field</code> is changed, then its value is adjusted to be as close
+ * {@code field} is changed, then its value is adjusted to be as close
* as possible to its expected value. A smaller field represents a
- * smaller unit of time. <code>HOUR</code> is a smaller field than
- * <code>DAY_OF_MONTH</code>. No adjustment is made to smaller fields
+ * smaller unit of time. {@code HOUR} is a smaller field than
+ * {@code DAY_OF_MONTH}. No adjustment is made to smaller fields
* that are not expected to be invariant. The calendar system
* determines what fields are expected to be invariant.</p>
*
* @param field the calendar field.
* @param amount the amount of date or time to be added to the field.
- * @exception IllegalArgumentException if <code>field</code> is
- * <code>ZONE_OFFSET</code>, <code>DST_OFFSET</code>, or unknown,
+ * @exception IllegalArgumentException if {@code field} is
+ * {@code ZONE_OFFSET}, {@code DST_OFFSET}, or unknown,
* or if any calendar fields have out-of-range values in
* non-lenient mode.
*/
@@ -548,12 +548,12 @@ class JapaneseImperialCalendar extends Calendar {
* <p>This method calls {@link #complete()} before adding the
* amount so that all the calendar fields are normalized. If there
* is any calendar field having an out-of-range value in non-lenient mode, then an
- * <code>IllegalArgumentException</code> is thrown.
+ * {@code IllegalArgumentException} is thrown.
*
* @param field the calendar field.
- * @param amount the signed amount to add to <code>field</code>.
- * @exception IllegalArgumentException if <code>field</code> is
- * <code>ZONE_OFFSET</code>, <code>DST_OFFSET</code>, or unknown,
+ * @param amount the signed amount to add to {@code field}.
+ * @exception IllegalArgumentException if {@code field} is
+ * {@code ZONE_OFFSET}, {@code DST_OFFSET}, or unknown,
* or if any calendar fields have out-of-range values in
* non-lenient mode.
* @see #roll(int,boolean)
@@ -1055,9 +1055,9 @@ class JapaneseImperialCalendar extends Calendar {
/**
* Returns the minimum value for the given calendar field of this
- * <code>Calendar</code> instance. The minimum value is
- * defined as the smallest value returned by the {@link
- * Calendar#get(int) get} method for any possible time value,
+ * {@code Calendar} instance. The minimum value is
+ * defined as the smallest value returned by the
+ * {@link Calendar#get(int) get} method for any possible time value,
* taking into consideration the current values of the
* {@link Calendar#getFirstDayOfWeek() getFirstDayOfWeek},
* {@link Calendar#getMinimalDaysInFirstWeek() getMinimalDaysInFirstWeek},
@@ -1077,9 +1077,9 @@ class JapaneseImperialCalendar extends Calendar {
/**
* Returns the maximum value for the given calendar field of this
- * <code>GregorianCalendar</code> instance. The maximum value is
- * defined as the largest value returned by the {@link
- * Calendar#get(int) get} method for any possible time value,
+ * {@code GregorianCalendar} instance. The maximum value is
+ * defined as the largest value returned by the
+ * {@link Calendar#get(int) get} method for any possible time value,
* taking into consideration the current values of the
* {@link Calendar#getFirstDayOfWeek() getFirstDayOfWeek},
* {@link Calendar#getMinimalDaysInFirstWeek() getMinimalDaysInFirstWeek},
@@ -1108,7 +1108,7 @@ class JapaneseImperialCalendar extends Calendar {
/**
* Returns the highest minimum value for the given calendar field
- * of this <code>GregorianCalendar</code> instance. The highest
+ * of this {@code GregorianCalendar} instance. The highest
* minimum value is defined as the largest value returned by
* {@link #getActualMinimum(int)} for any possible time value,
* taking into consideration the current values of the
@@ -1130,7 +1130,7 @@ class JapaneseImperialCalendar extends Calendar {
/**
* Returns the lowest maximum value for the given calendar field
- * of this <code>GregorianCalendar</code> instance. The lowest
+ * of this {@code GregorianCalendar} instance. The lowest
* maximum value is defined as the smallest value returned by
* {@link #getActualMaximum(int)} for any possible time value,
* taking into consideration the current values of the
@@ -1166,7 +1166,7 @@ class JapaneseImperialCalendar extends Calendar {
*
* @param field the calendar field
* @return the minimum of the given field for the time value of
- * this <code>JapaneseImperialCalendar</code>
+ * this {@code JapaneseImperialCalendar}
* @see #getMinimum(int)
* @see #getMaximum(int)
* @see #getGreatestMinimum(int)
@@ -1269,13 +1269,13 @@ class JapaneseImperialCalendar extends Calendar {
* and
* {@link Calendar#getTimeZone() getTimeZone} methods.
* For example, if the date of this instance is Heisei 16February 1,
- * the actual maximum value of the <code>DAY_OF_MONTH</code> field
+ * the actual maximum value of the {@code DAY_OF_MONTH} field
* is 29 because Heisei 16 is a leap year, and if the date of this
* instance is Heisei 17 February 1, it's 28.
*
* @param field the calendar field
* @return the maximum of the given field for the time value of
- * this <code>JapaneseImperialCalendar</code>
+ * this {@code JapaneseImperialCalendar}
* @see #getMinimum(int)
* @see #getMaximum(int)
* @see #getGreatestMinimum(int)
@@ -1558,7 +1558,7 @@ class JapaneseImperialCalendar extends Calendar {
* href="Calendar.html#Epoch">Epoch</a>) to calendar field values.
* The time is <em>not</em>
* recomputed first; to recompute the time, then the fields, call the
- * <code>complete</code> method.
+ * {@code complete} method.
*
* @see Calendar#complete
*/
diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java b/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java
index c3ebf04d343..0029322cfc2 100644
--- a/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java
@@ -2411,7 +2411,7 @@ public class ForkJoinPool extends AbstractExecutorService {
int j = ((am & s) << ASHIFT) + ABASE;
U.putOrderedObject(a, j, task);
U.putOrderedInt(q, QTOP, s + 1);
- U.putOrderedInt(q, QLOCK, 0);
+ U.putIntVolatile(q, QLOCK, 0);
if (n <= 1)
signalWork(ws, q);
return;
diff --git a/jdk/src/java.base/share/classes/java/util/spi/LocaleServiceProvider.java b/jdk/src/java.base/share/classes/java/util/spi/LocaleServiceProvider.java
index 3b2cb534bad..1147bf5f63b 100644
--- a/jdk/src/java.base/share/classes/java/util/spi/LocaleServiceProvider.java
+++ b/jdk/src/java.base/share/classes/java/util/spi/LocaleServiceProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, 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
@@ -140,11 +140,24 @@ import java.util.Locale;
*/
public abstract class LocaleServiceProvider {
+ private static Void checkPermission() {
+ SecurityManager sm = System.getSecurityManager();
+ if (sm != null) {
+ sm.checkPermission(new RuntimePermission("localeServiceProvider"));
+ }
+ return null;
+ }
+ private LocaleServiceProvider(Void ignore) { }
+
/**
- * Sole constructor. (For invocation by subclass constructors, typically
- * implicit.)
+ * Initializes a new locale service provider.
+ *
+ * @throws SecurityException
+ * If a security manager has been installed and it denies
+ * {@link RuntimePermission RuntimePermission("localeServiceProvider")}
*/
protected LocaleServiceProvider() {
+ this(checkPermission());
}
/**
diff --git a/jdk/src/java.base/share/classes/javax/crypto/JceSecurity.java b/jdk/src/java.base/share/classes/javax/crypto/JceSecurity.java
index 2aaff7217ec..65fce38f6ca 100644
--- a/jdk/src/java.base/share/classes/javax/crypto/JceSecurity.java
+++ b/jdk/src/java.base/share/classes/javax/crypto/JceSecurity.java
@@ -76,7 +76,7 @@ final class JceSecurity {
static {
try {
AccessController.doPrivileged(
- new PrivilegedExceptionAction<Void> () {
+ new PrivilegedExceptionAction<> () {
@Override
public Void run() throws Exception {
setupJurisdictionPolicies();
@@ -225,7 +225,7 @@ final class JceSecurity {
URL url = codeBaseCacheRef.get(clazz);
if (url == null) {
url = AccessController.doPrivileged(
- new PrivilegedAction<URL>() {
+ new PrivilegedAction<>() {
@Override
public URL run() {
ProtectionDomain pd = clazz.getProtectionDomain();
diff --git a/jdk/src/java.base/share/classes/javax/crypto/JceSecurityManager.java b/jdk/src/java.base/share/classes/javax/crypto/JceSecurityManager.java
index 83f003b4838..a01cf7b29a3 100644
--- a/jdk/src/java.base/share/classes/javax/crypto/JceSecurityManager.java
+++ b/jdk/src/java.base/share/classes/javax/crypto/JceSecurityManager.java
@@ -66,7 +66,7 @@ final class JceSecurityManager extends SecurityManager {
exemptPolicy = JceSecurity.getExemptPolicy();
allPerm = CryptoAllPermission.INSTANCE;
INSTANCE = AccessController.doPrivileged(
- new PrivilegedAction<JceSecurityManager>() {
+ new PrivilegedAction<>() {
public JceSecurityManager run() {
return new JceSecurityManager();
}
diff --git a/jdk/src/java.base/share/classes/javax/net/ssl/KeyManagerFactory.java b/jdk/src/java.base/share/classes/javax/net/ssl/KeyManagerFactory.java
index 31149108c8f..cff1b133cc2 100644
--- a/jdk/src/java.base/share/classes/javax/net/ssl/KeyManagerFactory.java
+++ b/jdk/src/java.base/share/classes/javax/net/ssl/KeyManagerFactory.java
@@ -63,7 +63,7 @@ public class KeyManagerFactory {
*/
public final static String getDefaultAlgorithm() {
String type;
- type = AccessController.doPrivileged(new PrivilegedAction<String>() {
+ type = AccessController.doPrivileged(new PrivilegedAction<>() {
@Override
public String run() {
return Security.getProperty(
diff --git a/jdk/src/java.base/share/classes/javax/net/ssl/SSLSocketFactory.java b/jdk/src/java.base/share/classes/javax/net/ssl/SSLSocketFactory.java
index 5c6fdc0faf8..316016aac35 100644
--- a/jdk/src/java.base/share/classes/javax/net/ssl/SSLSocketFactory.java
+++ b/jdk/src/java.base/share/classes/javax/net/ssl/SSLSocketFactory.java
@@ -126,7 +126,7 @@ public abstract class SSLSocketFactory extends SocketFactory
}
static String getSecurityProperty(final String name) {
- return AccessController.doPrivileged(new PrivilegedAction<String>() {
+ return AccessController.doPrivileged(new PrivilegedAction<>() {
@Override
public String run() {
String s = java.security.Security.getProperty(name);
diff --git a/jdk/src/java.base/share/classes/javax/net/ssl/TrustManagerFactory.java b/jdk/src/java.base/share/classes/javax/net/ssl/TrustManagerFactory.java
index a8a5008cc55..36803cd5578 100644
--- a/jdk/src/java.base/share/classes/javax/net/ssl/TrustManagerFactory.java
+++ b/jdk/src/java.base/share/classes/javax/net/ssl/TrustManagerFactory.java
@@ -63,7 +63,7 @@ public class TrustManagerFactory {
*/
public final static String getDefaultAlgorithm() {
String type;
- type = AccessController.doPrivileged(new PrivilegedAction<String>() {
+ type = AccessController.doPrivileged(new PrivilegedAction<>() {
@Override
public String run() {
return Security.getProperty(
diff --git a/jdk/src/java.base/share/classes/javax/security/auth/Subject.java b/jdk/src/java.base/share/classes/javax/security/auth/Subject.java
index f0ec16ced8f..4e4e61cc0ed 100644
--- a/jdk/src/java.base/share/classes/javax/security/auth/Subject.java
+++ b/jdk/src/java.base/share/classes/javax/security/auth/Subject.java
@@ -154,11 +154,11 @@ public final class Subject implements java.io.Serializable {
public Subject() {
this.principals = Collections.synchronizedSet
- (new SecureSet<Principal>(this, PRINCIPAL_SET));
+ (new SecureSet<>(this, PRINCIPAL_SET));
this.pubCredentials = Collections.synchronizedSet
- (new SecureSet<Object>(this, PUB_CREDENTIAL_SET));
+ (new SecureSet<>(this, PUB_CREDENTIAL_SET));
this.privCredentials = Collections.synchronizedSet
- (new SecureSet<Object>(this, PRIV_CREDENTIAL_SET));
+ (new SecureSet<>(this, PRIV_CREDENTIAL_SET));
}
/**
@@ -206,11 +206,11 @@ public final class Subject implements java.io.Serializable {
collectionNullClean(pubCredentials);
collectionNullClean(privCredentials);
- this.principals = Collections.synchronizedSet(new SecureSet<Principal>
+ this.principals = Collections.synchronizedSet(new SecureSet<>
(this, PRINCIPAL_SET, principals));
- this.pubCredentials = Collections.synchronizedSet(new SecureSet<Object>
+ this.pubCredentials = Collections.synchronizedSet(new SecureSet<>
(this, PUB_CREDENTIAL_SET, pubCredentials));
- this.privCredentials = Collections.synchronizedSet(new SecureSet<Object>
+ this.privCredentials = Collections.synchronizedSet(new SecureSet<>
(this, PRIV_CREDENTIAL_SET, privCredentials));
this.readOnly = readOnly;
}
@@ -292,7 +292,7 @@ public final class Subject implements java.io.Serializable {
// return the Subject from the DomainCombiner of the provided context
return AccessController.doPrivileged
- (new java.security.PrivilegedAction<Subject>() {
+ (new java.security.PrivilegedAction<>() {
public Subject run() {
DomainCombiner dc = acc.getDomainCombiner();
if (!(dc instanceof SubjectDomainCombiner)) {
@@ -555,7 +555,7 @@ public final class Subject implements java.io.Serializable {
return java.security.AccessController.doPrivileged
- (new java.security.PrivilegedAction<AccessControlContext>() {
+ (new java.security.PrivilegedAction<>() {
public AccessControlContext run() {
if (subject == null) {
return new AccessControlContext(acc, null);
@@ -801,7 +801,7 @@ public final class Subject implements java.io.Serializable {
Set<Principal> thatPrincipals;
synchronized(that.principals) {
// avoid deadlock from dual locks
- thatPrincipals = new HashSet<Principal>(that.principals);
+ thatPrincipals = new HashSet<>(that.principals);
}
if (!principals.equals(thatPrincipals)) {
return false;
@@ -810,7 +810,7 @@ public final class Subject implements java.io.Serializable {
Set<Object> thatPubCredentials;
synchronized(that.pubCredentials) {
// avoid deadlock from dual locks
- thatPubCredentials = new HashSet<Object>(that.pubCredentials);
+ thatPubCredentials = new HashSet<>(that.pubCredentials);
}
if (!pubCredentials.equals(thatPubCredentials)) {
return false;
@@ -819,7 +819,7 @@ public final class Subject implements java.io.Serializable {
Set<Object> thatPrivCredentials;
synchronized(that.privCredentials) {
// avoid deadlock from dual locks
- thatPrivCredentials = new HashSet<Object>(that.privCredentials);
+ thatPrivCredentials = new HashSet<>(that.privCredentials);
}
if (!privCredentials.equals(thatPrivCredentials)) {
return false;
@@ -970,21 +970,21 @@ public final class Subject implements java.io.Serializable {
// Rewrap the principals into a SecureSet
try {
- principals = Collections.synchronizedSet(new SecureSet<Principal>
+ principals = Collections.synchronizedSet(new SecureSet<>
(this, PRINCIPAL_SET, inputPrincs));
} catch (NullPointerException npe) {
// Sometimes people deserialize the principals set only.
// Subject is not accessible, so just don't fail.
principals = Collections.synchronizedSet
- (new SecureSet<Principal>(this, PRINCIPAL_SET));
+ (new SecureSet<>(this, PRINCIPAL_SET));
}
// The Credential {@code Set} is not serialized, but we do not
// want the default deserialization routine to set it to null.
this.pubCredentials = Collections.synchronizedSet
- (new SecureSet<Object>(this, PUB_CREDENTIAL_SET));
+ (new SecureSet<>(this, PUB_CREDENTIAL_SET));
this.privCredentials = Collections.synchronizedSet
- (new SecureSet<Object>(this, PRIV_CREDENTIAL_SET));
+ (new SecureSet<>(this, PRIV_CREDENTIAL_SET));
}
/**
@@ -1497,7 +1497,7 @@ public final class Subject implements java.io.Serializable {
Object next;
if (which == Subject.PRIV_CREDENTIAL_SET) {
next = java.security.AccessController.doPrivileged
- (new java.security.PrivilegedAction<Object>() {
+ (new java.security.PrivilegedAction<>() {
public Object run() {
return iterator.next();
}
diff --git a/jdk/src/java.base/share/classes/javax/security/auth/login/Configuration.java b/jdk/src/java.base/share/classes/javax/security/auth/login/Configuration.java
index ac8e301d7e0..c0b1865ee0b 100644
--- a/jdk/src/java.base/share/classes/javax/security/auth/login/Configuration.java
+++ b/jdk/src/java.base/share/classes/javax/security/auth/login/Configuration.java
@@ -229,7 +229,7 @@ public abstract class Configuration {
if (configuration == null) {
String config_class = null;
config_class = AccessController.doPrivileged
- (new PrivilegedAction<String>() {
+ (new PrivilegedAction<>() {
public String run() {
return java.security.Security.getProperty
("login.configuration.provider");
@@ -242,7 +242,7 @@ public abstract class Configuration {
try {
final String finalClass = config_class;
Configuration untrustedImpl = AccessController.doPrivileged(
- new PrivilegedExceptionAction<Configuration>() {
+ new PrivilegedExceptionAction<>() {
public Configuration run() throws ClassNotFoundException,
InstantiationException,
IllegalAccessException {
@@ -254,7 +254,7 @@ public abstract class Configuration {
}
});
AccessController.doPrivileged(
- new PrivilegedExceptionAction<Void>() {
+ new PrivilegedExceptionAction<>() {
public Void run() {
setConfiguration(untrustedImpl);
return null;
diff --git a/jdk/src/java.base/share/classes/javax/security/cert/X509Certificate.java b/jdk/src/java.base/share/classes/javax/security/cert/X509Certificate.java
index 666524a084c..511d6ef601b 100644
--- a/jdk/src/java.base/share/classes/javax/security/cert/X509Certificate.java
+++ b/jdk/src/java.base/share/classes/javax/security/cert/X509Certificate.java
@@ -142,7 +142,7 @@ public abstract class X509Certificate extends Certificate {
static {
X509Provider = AccessController.doPrivileged(
- new PrivilegedAction<String>() {
+ new PrivilegedAction<>() {
public String run() {
return Security.getProperty(X509_PROVIDER);
}
diff --git a/jdk/src/java.base/share/classes/jdk/net/NetworkPermission.java b/jdk/src/java.base/share/classes/jdk/net/NetworkPermission.java
index 01aa1a89653..df740da8488 100644
--- a/jdk/src/java.base/share/classes/jdk/net/NetworkPermission.java
+++ b/jdk/src/java.base/share/classes/jdk/net/NetworkPermission.java
@@ -33,7 +33,7 @@ import java.security.BasicPermission;
* name, but no actions list. Callers either possess the permission or not.
* <p>
* The following targets are defined:
- * <p>
+ *
* <table border=1 cellpadding=5 summary="permission target name,
* what the target allows,and associated risks">
* <tr>
diff --git a/jdk/src/java.base/share/classes/sun/security/pkcs/PKCS7.java b/jdk/src/java.base/share/classes/sun/security/pkcs/PKCS7.java
index 19211ae7b0e..52d7b18bcc4 100644
--- a/jdk/src/java.base/share/classes/sun/security/pkcs/PKCS7.java
+++ b/jdk/src/java.base/share/classes/sun/security/pkcs/PKCS7.java
@@ -530,7 +530,7 @@ public class PKCS7 {
// CRLs (optional)
if (crls != null && crls.length != 0) {
// cast to X509CRLImpl[] since X509CRLImpl implements DerEncoder
- Set<X509CRLImpl> implCRLs = new HashSet<X509CRLImpl>(crls.length);
+ Set<X509CRLImpl> implCRLs = new HashSet<>(crls.length);
for (X509CRL crl: crls) {
if (crl instanceof X509CRLImpl)
implCRLs.add((X509CRLImpl) crl);
@@ -590,7 +590,7 @@ public class PKCS7 {
public SignerInfo[] verify(byte[] bytes)
throws NoSuchAlgorithmException, SignatureException {
- Vector<SignerInfo> intResult = new Vector<SignerInfo>();
+ Vector<SignerInfo> intResult = new Vector<>();
for (int i = 0; i < signerInfos.length; i++) {
SignerInfo signerInfo = verify(signerInfos[i], bytes);
diff --git a/jdk/src/java.base/share/classes/sun/security/pkcs/PKCS9Attributes.java b/jdk/src/java.base/share/classes/sun/security/pkcs/PKCS9Attributes.java
index 9adcbd8b34e..d8a7ba7ffa8 100644
--- a/jdk/src/java.base/share/classes/sun/security/pkcs/PKCS9Attributes.java
+++ b/jdk/src/java.base/share/classes/sun/security/pkcs/PKCS9Attributes.java
@@ -85,8 +85,7 @@ public class PKCS9Attributes {
DerInputStream in) throws IOException {
if (permittedAttributes != null) {
this.permittedAttributes =
- new Hashtable<ObjectIdentifier, ObjectIdentifier>(
- permittedAttributes.length);
+ new Hashtable<>(permittedAttributes.length);
for (int i = 0; i < permittedAttributes.length; i++)
this.permittedAttributes.put(permittedAttributes[i],
diff --git a/jdk/src/java.base/share/classes/sun/security/pkcs/SignerInfo.java b/jdk/src/java.base/share/classes/sun/security/pkcs/SignerInfo.java
index 8650474f1ca..1f310a2d32f 100644
--- a/jdk/src/java.base/share/classes/sun/security/pkcs/SignerInfo.java
+++ b/jdk/src/java.base/share/classes/sun/security/pkcs/SignerInfo.java
@@ -237,7 +237,7 @@ public class SignerInfo implements DerEncoder {
if (userCert == null)
return null;
- ArrayList<X509Certificate> certList = new ArrayList<X509Certificate>();
+ ArrayList<X509Certificate> certList = new ArrayList<>();
certList.add(userCert);
X509Certificate[] pkcsCerts = block.getCertificates();
diff --git a/jdk/src/java.base/share/classes/sun/security/provider/SeedGenerator.java b/jdk/src/java.base/share/classes/sun/security/provider/SeedGenerator.java
index fd08fa3f8ee..acf8b645b62 100644
--- a/jdk/src/java.base/share/classes/sun/security/provider/SeedGenerator.java
+++ b/jdk/src/java.base/share/classes/sun/security/provider/SeedGenerator.java
@@ -165,7 +165,7 @@ abstract class SeedGenerator {
md.update(b);
java.security.AccessController.doPrivileged
- (new java.security.PrivilegedAction<Void>() {
+ (new java.security.PrivilegedAction<>() {
@Override
public Void run() {
try {
@@ -295,7 +295,7 @@ abstract class SeedGenerator {
final ThreadGroup[] finalsg = new ThreadGroup[1];
Thread t = java.security.AccessController.doPrivileged
- (new java.security.PrivilegedAction<Thread>() {
+ (new java.security.PrivilegedAction<>() {
@Override
public Thread run() {
ThreadGroup parent, group =
@@ -501,7 +501,7 @@ abstract class SeedGenerator {
final URL device = new URL(deviceName);
try {
seedStream = java.security.AccessController.doPrivileged
- (new java.security.PrivilegedExceptionAction<InputStream>() {
+ (new java.security.PrivilegedExceptionAction<>() {
@Override
public InputStream run() throws IOException {
/*
diff --git a/jdk/src/java.base/share/classes/sun/security/ssl/SunJSSE.java b/jdk/src/java.base/share/classes/sun/security/ssl/SunJSSE.java
index cfd8e609ae4..7b1a67b4d7d 100644
--- a/jdk/src/java.base/share/classes/sun/security/ssl/SunJSSE.java
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/SunJSSE.java
@@ -148,7 +148,7 @@ public abstract class SunJSSE extends java.security.Provider {
}
private void registerAlgorithms(final boolean isfips) {
- AccessController.doPrivileged(new PrivilegedAction<Object>() {
+ AccessController.doPrivileged(new PrivilegedAction<>() {
@Override
public Object run() {
doRegister(isfips);
diff --git a/jdk/src/java.base/share/classes/sun/security/util/DerInputStream.java b/jdk/src/java.base/share/classes/sun/security/util/DerInputStream.java
index 8d04d5ab9ed..264bfd0e9c7 100644
--- a/jdk/src/java.base/share/classes/sun/security/util/DerInputStream.java
+++ b/jdk/src/java.base/share/classes/sun/security/util/DerInputStream.java
@@ -394,7 +394,7 @@ public class DerInputStream {
/*
* Pull values out of the stream.
*/
- Vector<DerValue> vec = new Vector<DerValue>(startLen);
+ Vector<DerValue> vec = new Vector<>(startLen);
DerValue value;
do {
diff --git a/jdk/src/java.base/share/classes/sun/security/util/ManifestDigester.java b/jdk/src/java.base/share/classes/sun/security/util/ManifestDigester.java
index fc9ccd3d552..5314e69a14e 100644
--- a/jdk/src/java.base/share/classes/sun/security/util/ManifestDigester.java
+++ b/jdk/src/java.base/share/classes/sun/security/util/ManifestDigester.java
@@ -110,7 +110,7 @@ public class ManifestDigester {
public ManifestDigester(byte bytes[])
{
rawBytes = bytes;
- entries = new HashMap<String, Entry>();
+ entries = new HashMap<>();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
diff --git a/jdk/src/java.base/share/classes/sun/security/util/ManifestEntryVerifier.java b/jdk/src/java.base/share/classes/sun/security/util/ManifestEntryVerifier.java
index 39f356eec0f..6fcc26143e2 100644
--- a/jdk/src/java.base/share/classes/sun/security/util/ManifestEntryVerifier.java
+++ b/jdk/src/java.base/share/classes/sun/security/util/ManifestEntryVerifier.java
@@ -77,9 +77,9 @@ public class ManifestEntryVerifier {
*/
public ManifestEntryVerifier(Manifest man)
{
- createdDigests = new HashMap<String, MessageDigest>(11);
- digests = new ArrayList<MessageDigest>();
- manifestHashes = new ArrayList<byte[]>();
+ createdDigests = new HashMap<>(11);
+ digests = new ArrayList<>();
+ manifestHashes = new ArrayList<>();
this.man = man;
}
diff --git a/jdk/src/java.base/share/classes/sun/security/util/SignatureFileVerifier.java b/jdk/src/java.base/share/classes/sun/security/util/SignatureFileVerifier.java
index 0d1e66287c9..51b296544b2 100644
--- a/jdk/src/java.base/share/classes/sun/security/util/SignatureFileVerifier.java
+++ b/jdk/src/java.base/share/classes/sun/security/util/SignatureFileVerifier.java
@@ -203,7 +203,7 @@ public class SignatureFileVerifier {
private MessageDigest getDigest(String algorithm)
{
if (createdDigests == null)
- createdDigests = new HashMap<String, MessageDigest>();
+ createdDigests = new HashMap<>();
MessageDigest digest = createdDigests.get(algorithm);
@@ -523,7 +523,7 @@ public class SignatureFileVerifier {
ArrayList<X509Certificate> chain = info.getCertificateChain(block);
CertPath certChain = certificateFactory.generateCertPath(chain);
if (signers == null) {
- signers = new ArrayList<CodeSigner>();
+ signers = new ArrayList<>();
}
// Append the new code signer
signers.add(new CodeSigner(certChain, info.getTimestamp()));
diff --git a/jdk/src/java.base/share/classes/sun/security/x509/AVA.java b/jdk/src/java.base/share/classes/sun/security/x509/AVA.java
index fd3a3544592..d1f94fb23a4 100644
--- a/jdk/src/java.base/share/classes/sun/security/x509/AVA.java
+++ b/jdk/src/java.base/share/classes/sun/security/x509/AVA.java
@@ -307,7 +307,7 @@ public class AVA implements DerEncoder {
// doublequote.
int c = readChar(in, "Quoted string did not end in quote");
- List<Byte> embeddedHex = new ArrayList<Byte>();
+ List<Byte> embeddedHex = new ArrayList<>();
boolean isPrintableString = true;
while (c != '"') {
if (c == '\\') {
diff --git a/jdk/src/java.base/share/classes/sun/security/x509/AlgorithmId.java b/jdk/src/java.base/share/classes/sun/security/x509/AlgorithmId.java
index 68068e6f3f1..294888bfaf4 100644
--- a/jdk/src/java.base/share/classes/sun/security/x509/AlgorithmId.java
+++ b/jdk/src/java.base/share/classes/sun/security/x509/AlgorithmId.java
@@ -571,7 +571,7 @@ public class AlgorithmId implements Serializable, DerEncoder {
break;
}
if (oidTable == null) {
- oidTable = new HashMap<String,ObjectIdentifier>();
+ oidTable = new HashMap<>();
}
oidString = alias.substring(index);
String stdAlgName = provs[i].getProperty(alias);
@@ -588,7 +588,7 @@ public class AlgorithmId implements Serializable, DerEncoder {
}
if (oidTable == null) {
- oidTable = new HashMap<String,ObjectIdentifier>(1);
+ oidTable = new HashMap<>(1);
}
initOidTable = true;
}
@@ -887,7 +887,7 @@ public class AlgorithmId implements Serializable, DerEncoder {
*/
sha1WithDSA_oid = ObjectIdentifier.newInternal(dsaWithSHA1_PKIX_data);
- nameTable = new HashMap<ObjectIdentifier,String>();
+ nameTable = new HashMap<>();
nameTable.put(MD5_oid, "MD5");
nameTable.put(MD2_oid, "MD2");
nameTable.put(SHA_oid, "SHA-1");
diff --git a/jdk/src/java.base/share/classes/sun/security/x509/CertificatePolicySet.java b/jdk/src/java.base/share/classes/sun/security/x509/CertificatePolicySet.java
index 1bb3aa8de0d..89527d657bd 100644
--- a/jdk/src/java.base/share/classes/sun/security/x509/CertificatePolicySet.java
+++ b/jdk/src/java.base/share/classes/sun/security/x509/CertificatePolicySet.java
@@ -58,7 +58,7 @@ public class CertificatePolicySet {
* @exception IOException on decoding errors.
*/
public CertificatePolicySet(DerInputStream in) throws IOException {
- ids = new Vector<CertificatePolicyId>();
+ ids = new Vector<>();
DerValue[] seq = in.getSequence(5);
for (int i = 0; i < seq.length; i++) {
diff --git a/jdk/src/java.base/share/classes/sun/security/x509/GeneralSubtrees.java b/jdk/src/java.base/share/classes/sun/security/x509/GeneralSubtrees.java
index 9c5e6212c1a..2d6e3a1df21 100644
--- a/jdk/src/java.base/share/classes/sun/security/x509/GeneralSubtrees.java
+++ b/jdk/src/java.base/share/classes/sun/security/x509/GeneralSubtrees.java
@@ -59,11 +59,11 @@ public class GeneralSubtrees implements Cloneable {
* The default constructor for the class.
*/
public GeneralSubtrees() {
- trees = new ArrayList<GeneralSubtree>();
+ trees = new ArrayList<>();
}
private GeneralSubtrees(GeneralSubtrees source) {
- trees = new ArrayList<GeneralSubtree>(source.trees);
+ trees = new ArrayList<>(source.trees);
}
/**
diff --git a/jdk/src/java.base/share/classes/sun/security/x509/RDN.java b/jdk/src/java.base/share/classes/sun/security/x509/RDN.java
index 940c977cc1d..4a59176c3e1 100644
--- a/jdk/src/java.base/share/classes/sun/security/x509/RDN.java
+++ b/jdk/src/java.base/share/classes/sun/security/x509/RDN.java
@@ -102,7 +102,7 @@ public class RDN {
int quoteCount = 0;
int searchOffset = 0;
int avaOffset = 0;
- List<AVA> avaVec = new ArrayList<AVA>(3);
+ List<AVA> avaVec = new ArrayList<>(3);
int nextPlus = name.indexOf('+');
while (nextPlus >= 0) {
quoteCount += X500Name.countQuotes(name, searchOffset, nextPlus);
@@ -182,7 +182,7 @@ public class RDN {
}
int searchOffset = 0;
int avaOffset = 0;
- List<AVA> avaVec = new ArrayList<AVA>(3);
+ List<AVA> avaVec = new ArrayList<>(3);
int nextPlus = name.indexOf('+');
while (nextPlus >= 0) {
/*
@@ -453,7 +453,7 @@ public class RDN {
} else {
// order the string type AVA's alphabetically,
// followed by the oid type AVA's numerically
- List<AVA> avaList = new ArrayList<AVA>(assertion.length);
+ List<AVA> avaList = new ArrayList<>(assertion.length);
for (int i = 0; i < assertion.length; i++) {
avaList.add(assertion[i]);
}
diff --git a/jdk/src/java.base/share/classes/sun/security/x509/X500Name.java b/jdk/src/java.base/share/classes/sun/security/x509/X500Name.java
index 1b786063172..2b35f7a63af 100644
--- a/jdk/src/java.base/share/classes/sun/security/x509/X500Name.java
+++ b/jdk/src/java.base/share/classes/sun/security/x509/X500Name.java
@@ -342,7 +342,7 @@ public class X500Name implements GeneralNameInterface, Principal {
public List<AVA> allAvas() {
List<AVA> list = allAvaList;
if (list == null) {
- list = new ArrayList<AVA>();
+ list = new ArrayList<>();
for (int i = 0; i < names.length; i++) {
list.addAll(names[i].avas());
}
@@ -1382,7 +1382,7 @@ public class X500Name implements GeneralNameInterface, Principal {
*/
static {
PrivilegedExceptionAction<Object[]> pa =
- new PrivilegedExceptionAction<Object[]>() {
+ new PrivilegedExceptionAction<>() {
public Object[] run() throws Exception {
Class<X500Principal> pClass = X500Principal.class;
Class<?>[] args = new Class<?>[] { X500Name.class };
diff --git a/jdk/src/java.base/share/classes/sun/util/locale/provider/AuxLocaleProviderAdapter.java b/jdk/src/java.base/share/classes/sun/util/locale/provider/AuxLocaleProviderAdapter.java
index 7ddcd0e3c61..6b374b998ca 100644
--- a/jdk/src/java.base/share/classes/sun/util/locale/provider/AuxLocaleProviderAdapter.java
+++ b/jdk/src/java.base/share/classes/sun/util/locale/provider/AuxLocaleProviderAdapter.java
@@ -25,6 +25,8 @@
package sun.util.locale.provider;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
import java.text.spi.BreakIteratorProvider;
import java.text.spi.CollatorProvider;
import java.text.spi.DateFormatProvider;
@@ -177,7 +179,9 @@ public abstract class AuxLocaleProviderAdapter extends LocaleProviderAdapter {
* A dummy locale service provider that indicates there is no
* provider available
*/
- private static final NullProvider NULL_PROVIDER = new NullProvider();
+ private static final NullProvider NULL_PROVIDER = AccessController.doPrivileged(
+ (PrivilegedAction<NullProvider>) () -> new NullProvider());
+
private static class NullProvider extends LocaleServiceProvider {
@Override
public Locale[] getAvailableLocales() {
diff --git a/jdk/src/java.base/share/classes/sun/util/locale/provider/JRELocaleProviderAdapter.java b/jdk/src/java.base/share/classes/sun/util/locale/provider/JRELocaleProviderAdapter.java
index efde2013320..3d8e4f6d27c 100644
--- a/jdk/src/java.base/share/classes/sun/util/locale/provider/JRELocaleProviderAdapter.java
+++ b/jdk/src/java.base/share/classes/sun/util/locale/provider/JRELocaleProviderAdapter.java
@@ -26,7 +26,7 @@
package sun.util.locale.provider;
import java.security.AccessController;
-import java.security.PrivilegedActionException;
+import java.security.PrivilegedAction;
import java.security.PrivilegedExceptionAction;
import java.text.spi.BreakIteratorProvider;
import java.text.spi.CollatorProvider;
@@ -133,8 +133,12 @@ public class JRELocaleProviderAdapter extends LocaleProviderAdapter implements R
@Override
public BreakIteratorProvider getBreakIteratorProvider() {
if (breakIteratorProvider == null) {
- BreakIteratorProvider provider = new BreakIteratorProviderImpl(getAdapterType(),
- getLanguageTagSet("FormatData"));
+ BreakIteratorProvider provider = AccessController.doPrivileged(
+ (PrivilegedAction<BreakIteratorProvider>) () ->
+ new BreakIteratorProviderImpl(
+ getAdapterType(),
+ getLanguageTagSet("FormatData")));
+
synchronized (this) {
if (breakIteratorProvider == null) {
breakIteratorProvider = provider;
@@ -147,8 +151,12 @@ public class JRELocaleProviderAdapter extends LocaleProviderAdapter implements R
@Override
public CollatorProvider getCollatorProvider() {
if (collatorProvider == null) {
- CollatorProvider provider = new CollatorProviderImpl(getAdapterType(),
- getLanguageTagSet("CollationData"));
+ CollatorProvider provider = AccessController.doPrivileged(
+ (PrivilegedAction<CollatorProvider>) () ->
+ new CollatorProviderImpl(
+ getAdapterType(),
+ getLanguageTagSet("CollationData")));
+
synchronized (this) {
if (collatorProvider == null) {
collatorProvider = provider;
@@ -161,8 +169,12 @@ public class JRELocaleProviderAdapter extends LocaleProviderAdapter implements R
@Override
public DateFormatProvider getDateFormatProvider() {
if (dateFormatProvider == null) {
- DateFormatProvider provider = new DateFormatProviderImpl(getAdapterType(),
- getLanguageTagSet("FormatData"));
+ DateFormatProvider provider = AccessController.doPrivileged(
+ (PrivilegedAction<DateFormatProvider>) () ->
+ new DateFormatProviderImpl(
+ getAdapterType(),
+ getLanguageTagSet("FormatData")));
+
synchronized (this) {
if (dateFormatProvider == null) {
dateFormatProvider = provider;
@@ -175,8 +187,12 @@ public class JRELocaleProviderAdapter extends LocaleProviderAdapter implements R
@Override
public DateFormatSymbolsProvider getDateFormatSymbolsProvider() {
if (dateFormatSymbolsProvider == null) {
- DateFormatSymbolsProvider provider = new DateFormatSymbolsProviderImpl(getAdapterType(),
- getLanguageTagSet("FormatData"));
+ DateFormatSymbolsProvider provider = AccessController.doPrivileged(
+ (PrivilegedAction<DateFormatSymbolsProvider>) () ->
+ new DateFormatSymbolsProviderImpl(
+ getAdapterType(),
+ getLanguageTagSet("FormatData")));
+
synchronized (this) {
if (dateFormatSymbolsProvider == null) {
dateFormatSymbolsProvider = provider;
@@ -189,7 +205,12 @@ public class JRELocaleProviderAdapter extends LocaleProviderAdapter implements R
@Override
public DecimalFormatSymbolsProvider getDecimalFormatSymbolsProvider() {
if (decimalFormatSymbolsProvider == null) {
- DecimalFormatSymbolsProvider provider = new DecimalFormatSymbolsProviderImpl(getAdapterType(), getLanguageTagSet("FormatData"));
+ DecimalFormatSymbolsProvider provider = AccessController.doPrivileged(
+ (PrivilegedAction<DecimalFormatSymbolsProvider>) () ->
+ new DecimalFormatSymbolsProviderImpl(
+ getAdapterType(),
+ getLanguageTagSet("FormatData")));
+
synchronized (this) {
if (decimalFormatSymbolsProvider == null) {
decimalFormatSymbolsProvider = provider;
@@ -202,8 +223,12 @@ public class JRELocaleProviderAdapter extends LocaleProviderAdapter implements R
@Override
public NumberFormatProvider getNumberFormatProvider() {
if (numberFormatProvider == null) {
- NumberFormatProvider provider = new NumberFormatProviderImpl(getAdapterType(),
- getLanguageTagSet("FormatData"));
+ NumberFormatProvider provider = AccessController.doPrivileged(
+ (PrivilegedAction<NumberFormatProvider>) () ->
+ new NumberFormatProviderImpl(
+ getAdapterType(),
+ getLanguageTagSet("FormatData")));
+
synchronized (this) {
if (numberFormatProvider == null) {
numberFormatProvider = provider;
@@ -219,8 +244,12 @@ public class JRELocaleProviderAdapter extends LocaleProviderAdapter implements R
@Override
public CurrencyNameProvider getCurrencyNameProvider() {
if (currencyNameProvider == null) {
- CurrencyNameProvider provider = new CurrencyNameProviderImpl(getAdapterType(),
- getLanguageTagSet("CurrencyNames"));
+ CurrencyNameProvider provider = AccessController.doPrivileged(
+ (PrivilegedAction<CurrencyNameProvider>) () ->
+ new CurrencyNameProviderImpl(
+ getAdapterType(),
+ getLanguageTagSet("CurrencyNames")));
+
synchronized (this) {
if (currencyNameProvider == null) {
currencyNameProvider = provider;
@@ -233,8 +262,12 @@ public class JRELocaleProviderAdapter extends LocaleProviderAdapter implements R
@Override
public LocaleNameProvider getLocaleNameProvider() {
if (localeNameProvider == null) {
- LocaleNameProvider provider = new LocaleNameProviderImpl(getAdapterType(),
- getLanguageTagSet("LocaleNames"));
+ LocaleNameProvider provider = AccessController.doPrivileged(
+ (PrivilegedAction<LocaleNameProvider>) () ->
+ new LocaleNameProviderImpl(
+ getAdapterType(),
+ getLanguageTagSet("LocaleNames")));
+
synchronized (this) {
if (localeNameProvider == null) {
localeNameProvider = provider;
@@ -247,8 +280,12 @@ public class JRELocaleProviderAdapter extends LocaleProviderAdapter implements R
@Override
public TimeZoneNameProvider getTimeZoneNameProvider() {
if (timeZoneNameProvider == null) {
- TimeZoneNameProvider provider = new TimeZoneNameProviderImpl(getAdapterType(),
- getLanguageTagSet("TimeZoneNames"));
+ TimeZoneNameProvider provider = AccessController.doPrivileged(
+ (PrivilegedAction<TimeZoneNameProvider>) () ->
+ new TimeZoneNameProviderImpl(
+ getAdapterType(),
+ getLanguageTagSet("TimeZoneNames")));
+
synchronized (this) {
if (timeZoneNameProvider == null) {
timeZoneNameProvider = provider;
@@ -261,9 +298,12 @@ public class JRELocaleProviderAdapter extends LocaleProviderAdapter implements R
@Override
public CalendarDataProvider getCalendarDataProvider() {
if (calendarDataProvider == null) {
- CalendarDataProvider provider;
- provider = new CalendarDataProviderImpl(getAdapterType(),
- getLanguageTagSet("CalendarData"));
+ CalendarDataProvider provider = AccessController.doPrivileged(
+ (PrivilegedAction<CalendarDataProvider>) () ->
+ new CalendarDataProviderImpl(
+ getAdapterType(),
+ getLanguageTagSet("CalendarData")));
+
synchronized (this) {
if (calendarDataProvider == null) {
calendarDataProvider = provider;
@@ -276,9 +316,12 @@ public class JRELocaleProviderAdapter extends LocaleProviderAdapter implements R
@Override
public CalendarNameProvider getCalendarNameProvider() {
if (calendarNameProvider == null) {
- CalendarNameProvider provider;
- provider = new CalendarNameProviderImpl(getAdapterType(),
- getLanguageTagSet("FormatData"));
+ CalendarNameProvider provider = AccessController.doPrivileged(
+ (PrivilegedAction<CalendarNameProvider>) () ->
+ new CalendarNameProviderImpl(
+ getAdapterType(),
+ getLanguageTagSet("FormatData")));
+
synchronized (this) {
if (calendarNameProvider == null) {
calendarNameProvider = provider;
@@ -294,8 +337,12 @@ public class JRELocaleProviderAdapter extends LocaleProviderAdapter implements R
@Override
public CalendarProvider getCalendarProvider() {
if (calendarProvider == null) {
- CalendarProvider provider = new CalendarProviderImpl(getAdapterType(),
- getLanguageTagSet("CalendarData"));
+ CalendarProvider provider = AccessController.doPrivileged(
+ (PrivilegedAction<CalendarProvider>) () ->
+ new CalendarProviderImpl(
+ getAdapterType(),
+ getLanguageTagSet("CalendarData")));
+
synchronized (this) {
if (calendarProvider == null) {
calendarProvider = provider;
@@ -319,6 +366,7 @@ public class JRELocaleProviderAdapter extends LocaleProviderAdapter implements R
}
// ResourceBundleBasedAdapter method implementation
+
@Override
public LocaleData getLocaleData() {
if (localeData == null) {
@@ -449,4 +497,4 @@ public class JRELocaleProviderAdapter extends LocaleProviderAdapter implements R
}
return locales;
}
- }
+}
diff --git a/jdk/src/java.base/unix/classes/sun/security/provider/NativePRNG.java b/jdk/src/java.base/unix/classes/sun/security/provider/NativePRNG.java
index ef728aa78eb..200ca9a56b6 100644
--- a/jdk/src/java.base/unix/classes/sun/security/provider/NativePRNG.java
+++ b/jdk/src/java.base/unix/classes/sun/security/provider/NativePRNG.java
@@ -125,7 +125,7 @@ public final class NativePRNG extends SecureRandomSpi {
*/
private static RandomIO initIO(final Variant v) {
return AccessController.doPrivileged(
- new PrivilegedAction<RandomIO>() {
+ new PrivilegedAction<>() {
@Override
public RandomIO run() {
@@ -440,7 +440,7 @@ public final class NativePRNG extends SecureRandomSpi {
if (seedOutInitialized == false) {
seedOutInitialized = true;
seedOut = AccessController.doPrivileged(
- new PrivilegedAction<OutputStream>() {
+ new PrivilegedAction<>() {
@Override
public OutputStream run() {
try {
diff --git a/jdk/src/java.management/share/classes/com/sun/management/DiagnosticCommandMBean.java b/jdk/src/java.management/share/classes/com/sun/management/DiagnosticCommandMBean.java
index 4534acda1e8..1d2a85e62b2 100644
--- a/jdk/src/java.management/share/classes/com/sun/management/DiagnosticCommandMBean.java
+++ b/jdk/src/java.management/share/classes/com/sun/management/DiagnosticCommandMBean.java
@@ -93,7 +93,7 @@ import javax.management.DynamicMBean;
* returns the diagnostic command description
* (the same as the one return in the 'help' command)</li>
* <li>{@link javax.management.MBeanOperationInfo#getImpact() getImpact()}
- * returns <code>ACTION_INFO</code></li>
+ * returns {@code ACTION_INFO}</li>
* <li>{@link javax.management.MBeanOperationInfo#getReturnType() getReturnType()}
* returns {@code java.lang.String}</li>
* <li>{@link javax.management.MBeanOperationInfo#getDescriptor() getDescriptor()}
@@ -105,7 +105,6 @@ import javax.management.DynamicMBean;
* meta-data for a JMX element. A field is a name and an associated value.
* The additional meta-data provided for an operation associated with a
* diagnostic command are described in the table below:
- * <p>
*
* <table border="1" cellpadding="5">
* <tr>
@@ -161,7 +160,6 @@ import javax.management.DynamicMBean;
* arguments supported by the diagnostic command (see below)</td>
* </tr>
* </table>
- * <p>
*
* <p>The description of parameters (options or arguments) of a diagnostic
* command is provided within a Descriptor instance. In this Descriptor,
diff --git a/jdk/src/java.management/share/classes/com/sun/management/GarbageCollectionNotificationInfo.java b/jdk/src/java.management/share/classes/com/sun/management/GarbageCollectionNotificationInfo.java
index 5546f55d05e..68e88b79544 100644
--- a/jdk/src/java.management/share/classes/com/sun/management/GarbageCollectionNotificationInfo.java
+++ b/jdk/src/java.management/share/classes/com/sun/management/GarbageCollectionNotificationInfo.java
@@ -41,14 +41,14 @@ import sun.management.GarbageCollectionNotifInfoCompositeData;
* when the Java virtual machine completes a garbage collection action
* The notification emitted will contain the garbage collection notification
* information about the status of the memory:
- * <u1>
+ * <ul>
* <li>The name of the garbage collector used to perform the collection.</li>
* <li>The action performed by the garbage collector.</li>
* <li>The cause of the garbage collection action.</li>
* <li>A {@link GcInfo} object containing some statistics about the GC cycle
(start time, end time) and the memory usage before and after
the GC cycle.</li>
- * </u1>
+ * </ul>
*
* <p>
* A {@link CompositeData CompositeData} representing
@@ -81,7 +81,7 @@ import sun.management.GarbageCollectionNotifInfoCompositeData;
* <li>A {@linkplain #GARBAGE_COLLECTION_NOTIFICATION garbage collection notification}.
* <br>Used by every notification emitted by the garbage collector, the details about
* the notification are provided in the {@linkplain #getGcAction action} String
- * <p></li>
+ * </li>
* </ul>
**/
diff --git a/jdk/src/java.management/share/classes/com/sun/management/GcInfo.java b/jdk/src/java.management/share/classes/com/sun/management/GcInfo.java
index 7257b6c6f62..5dc732d84f8 100644
--- a/jdk/src/java.management/share/classes/com/sun/management/GcInfo.java
+++ b/jdk/src/java.management/share/classes/com/sun/management/GcInfo.java
@@ -52,13 +52,13 @@ import sun.management.GcInfoBuilder;
* </blockquote>
*
* <p>
- * <tt>GcInfo</tt> is a {@link CompositeData CompositeData}
+ * {@code GcInfo} is a {@link CompositeData CompositeData}
* The GC-specific attributes can be obtained via the CompositeData
* interface. This is a historical relic, and other classes should
* not copy this pattern. Use {@link CompositeDataView} instead.
*
* <h4>MXBean Mapping</h4>
- * <tt>GcInfo</tt> is mapped to a {@link CompositeData CompositeData}
+ * {@code GcInfo} is mapped to a {@link CompositeData CompositeData}
* with attributes as specified in the {@link #from from} method.
*
* @author Mandy Chung
@@ -152,11 +152,11 @@ public class GcInfo implements CompositeData, CompositeDataView {
* Returns the memory usage of all memory pools
* at the beginning of this GC.
* This method returns
- * a <tt>Map</tt> of the name of a memory pool
+ * a {@code Map} of the name of a memory pool
* to the memory usage of the corresponding
* memory pool before GC starts.
*
- * @return a <tt>Map</tt> of memory pool names to the memory
+ * @return a {@code Map} of memory pool names to the memory
* usage of a memory pool before GC starts.
*/
public Map<String, MemoryUsage> getMemoryUsageBeforeGc() {
@@ -167,11 +167,11 @@ public class GcInfo implements CompositeData, CompositeDataView {
* Returns the memory usage of all memory pools
* at the end of this GC.
* This method returns
- * a <tt>Map</tt> of the name of a memory pool
+ * a {@code Map} of the name of a memory pool
* to the memory usage of the corresponding
* memory pool when GC finishes.
*
- * @return a <tt>Map</tt> of memory pool names to the memory
+ * @return a {@code Map} of memory pool names to the memory
* usage of a memory pool when GC finishes.
*/
public Map<String, MemoryUsage> getMemoryUsageAfterGc() {
@@ -179,12 +179,11 @@ public class GcInfo implements CompositeData, CompositeDataView {
}
/**
- * Returns a <tt>GcInfo</tt> object represented by the
- * given <tt>CompositeData</tt>. The given
- * <tt>CompositeData</tt> must contain
+ * Returns a {@code GcInfo} object represented by the
+ * given {@code CompositeData}. The given
+ * {@code CompositeData} must contain
* all the following attributes:
*
- * <p>
* <blockquote>
* <table border>
* <tr>
@@ -193,33 +192,33 @@ public class GcInfo implements CompositeData, CompositeDataView {
* </tr>
* <tr>
* <td>index</td>
- * <td><tt>java.lang.Long</tt></td>
+ * <td>{@code java.lang.Long}</td>
* </tr>
* <tr>
* <td>startTime</td>
- * <td><tt>java.lang.Long</tt></td>
+ * <td>{@code java.lang.Long}</td>
* </tr>
* <tr>
* <td>endTime</td>
- * <td><tt>java.lang.Long</tt></td>
+ * <td>{@code java.lang.Long}</td>
* </tr>
* <tr>
* <td>memoryUsageBeforeGc</td>
- * <td><tt>javax.management.openmbean.TabularData</tt></td>
+ * <td>{@code javax.management.openmbean.TabularData}</td>
* </tr>
* <tr>
* <td>memoryUsageAfterGc</td>
- * <td><tt>javax.management.openmbean.TabularData</tt></td>
+ * <td>{@code javax.management.openmbean.TabularData}</td>
* </tr>
* </table>
* </blockquote>
*
- * @throws IllegalArgumentException if <tt>cd</tt> does not
- * represent a <tt>GcInfo</tt> object with the attributes
+ * @throws IllegalArgumentException if {@code cd} does not
+ * represent a {@code GcInfo} object with the attributes
* described above.
*
- * @return a <tt>GcInfo</tt> object represented by <tt>cd</tt>
- * if <tt>cd</tt> is not <tt>null</tt>; <tt>null</tt> otherwise.
+ * @return a {@code GcInfo} object represented by {@code cd}
+ * if {@code cd} is not {@code null}; {@code null} otherwise.
*/
public static GcInfo from(CompositeData cd) {
if (cd == null) {
@@ -272,7 +271,7 @@ public class GcInfo implements CompositeData, CompositeDataView {
}
/**
- * <p>Return the {@code CompositeData} representation of this
+ * Return the {@code CompositeData} representation of this
* {@code GcInfo}, including any GC-specific attributes. The
* returned value will have at least all the attributes described
* in the {@link #from(CompositeData) from} method, plus optionally
diff --git a/jdk/src/java.management/share/classes/com/sun/management/VMOption.java b/jdk/src/java.management/share/classes/com/sun/management/VMOption.java
index 9c66af1ef5b..b1ba961923d 100644
--- a/jdk/src/java.management/share/classes/com/sun/management/VMOption.java
+++ b/jdk/src/java.management/share/classes/com/sun/management/VMOption.java
@@ -42,10 +42,10 @@ import javax.management.openmbean.CompositeData;
* be set dynamically via a management interface after
* the VM was started.
*
- * A <tt>VMOption</tt> contains the value of a VM option
- * and the origin of that value at the time this <tt>VMOption</tt>
+ * A {@code VMOption} contains the value of a VM option
+ * and the origin of that value at the time this {@code VMOption}
* object was constructed. The value of the VM option
- * may be changed after the <tt>VMOption</tt> object was constructed,
+ * may be changed after the {@code VMOption} object was constructed,
*
* @see <a href="{@docRoot}/../../../../technotes/guides/vm/index.html">
* Java Virtual Machine</a>
@@ -108,15 +108,15 @@ public class VMOption {
}
/**
- * Constructs a <tt>VMOption</tt>.
+ * Constructs a {@code VMOption}.
*
* @param name Name of a VM option.
* @param value Value of a VM option.
- * @param writeable <tt>true</tt> if a VM option can be set dynamically,
- * or <tt>false</tt> otherwise.
+ * @param writeable {@code true} if a VM option can be set dynamically,
+ * or {@code false} otherwise.
* @param origin where the value of a VM option came from.
*
- * @throws NullPointerException if the name or value is <tt>null</tt>
+ * @throws NullPointerException if the name or value is {@code null}
*/
public VMOption(String name, String value, boolean writeable, Origin origin) {
this.name = name;
@@ -126,7 +126,7 @@ public class VMOption {
}
/**
- * Constructs a <tt>VMOption</tt> object from a
+ * Constructs a {@code VMOption} object from a
* {@link CompositeData CompositeData}.
*/
private VMOption(CompositeData cd) {
@@ -150,10 +150,10 @@ public class VMOption {
/**
* Returns the value of this VM option at the time when
- * this <tt>VMOption</tt> was created. The value could have been changed.
+ * this {@code VMOption} was created. The value could have been changed.
*
* @return the value of the VM option at the time when
- * this <tt>VMOption</tt> was created.
+ * this {@code VMOption} was created.
*/
public String getValue() {
return value;
@@ -174,7 +174,7 @@ public class VMOption {
* it can be set by the {@link HotSpotDiagnosticMXBean#setVMOption
* HotSpotDiagnosticMXBean.setVMOption} method.
*
- * @return <tt>true</tt> if this VM option is writeable; <tt>false</tt>
+ * @return {@code true} if this VM option is writeable; {@code false}
* otherwise.
*/
public boolean isWriteable() {
@@ -189,10 +189,10 @@ public class VMOption {
}
/**
- * Returns a <tt>VMOption</tt> object represented by the
- * given <tt>CompositeData</tt>. The given <tt>CompositeData</tt>
+ * Returns a {@code VMOption} object represented by the
+ * given {@code CompositeData}. The given {@code CompositeData}
* must contain the following attributes:
- * <p>
+ *
* <blockquote>
* <table border>
* <tr>
@@ -201,32 +201,32 @@ public class VMOption {
* </tr>
* <tr>
* <td>name</td>
- * <td><tt>java.lang.String</tt></td>
+ * <td>{@code java.lang.String}</td>
* </tr>
* <tr>
* <td>value</td>
- * <td><tt>java.lang.String</tt></td>
+ * <td>{@code java.lang.String}</td>
* </tr>
* <tr>
* <td>origin</td>
- * <td><tt>java.lang.String</tt></td>
+ * <td>{@code java.lang.String}</td>
* </tr>
* <tr>
* <td>writeable</td>
- * <td><tt>java.lang.Boolean</tt></td>
+ * <td>{@code java.lang.Boolean}</td>
* </tr>
* </table>
* </blockquote>
*
- * @param cd <tt>CompositeData</tt> representing a <tt>VMOption</tt>
+ * @param cd {@code CompositeData} representing a {@code VMOption}
*
- * @throws IllegalArgumentException if <tt>cd</tt> does not
- * represent a <tt>VMOption</tt> with the attributes described
+ * @throws IllegalArgumentException if {@code cd} does not
+ * represent a {@code VMOption} with the attributes described
* above.
*
- * @return a <tt>VMOption</tt> object represented by <tt>cd</tt>
- * if <tt>cd</tt> is not <tt>null</tt>;
- * <tt>null</tt> otherwise.
+ * @return a {@code VMOption} object represented by {@code cd}
+ * if {@code cd} is not {@code null};
+ * {@code null} otherwise.
*/
public static VMOption from(CompositeData cd) {
if (cd == null) {
diff --git a/jdk/src/java.prefs/share/classes/java/util/prefs/AbstractPreferences.java b/jdk/src/java.prefs/share/classes/java/util/prefs/AbstractPreferences.java
index fd3ba69902a..970aa19816d 100644
--- a/jdk/src/java.prefs/share/classes/java/util/prefs/AbstractPreferences.java
+++ b/jdk/src/java.prefs/share/classes/java/util/prefs/AbstractPreferences.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015, 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
@@ -78,10 +78,9 @@ import java.lang.Double;
* under which these calls cannot even enqueue the requested operation for
* later processing. Even under these circumstances it is generally better to
* simply ignore the invocation and return, rather than throwing an
- * exception. Under these circumstances, however, all subsequent invocations
- * of <tt>flush()</tt> and <tt>sync</tt> should return <tt>false</tt>, as
- * returning <tt>true</tt> would imply that all previous operations had
- * successfully been made permanent.
+ * exception. Under these circumstances, however, subsequently invoking
+ * <tt>flush()</tt> or <tt>sync</tt> would not imply that all previous
+ * operations had successfully been made permanent.
*
* <p>There is one circumstance under which <tt>putSpi, removeSpi and
* childSpi</tt> <i>should</i> throw an exception: if the caller lacks
@@ -123,6 +122,13 @@ import java.lang.Double;
*/
public abstract class AbstractPreferences extends Preferences {
/**
+ * The code point U+0000, assigned to the null control character, is the
+ * only character encoded in Unicode and ISO/IEC 10646 that is always
+ * invalid in any XML 1.0 and 1.1 document.
+ */
+ static final int CODE_POINT_U0000 = '\u0000';
+
+ /**
* Our name relative to parent.
*/
private final String name;
@@ -234,6 +240,8 @@ public abstract class AbstractPreferences extends Preferences {
* @throws IllegalArgumentException if <tt>key.length()</tt> exceeds
* <tt>MAX_KEY_LENGTH</tt> or if <tt>value.length</tt> exceeds
* <tt>MAX_VALUE_LENGTH</tt>.
+ * @throws IllegalArgumentException if either key or value contain
+ * the null control character, code point U+0000.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
*/
@@ -244,6 +252,10 @@ public abstract class AbstractPreferences extends Preferences {
throw new IllegalArgumentException("Key too long: "+key);
if (value.length() > MAX_VALUE_LENGTH)
throw new IllegalArgumentException("Value too long: "+value);
+ if (key.indexOf(CODE_POINT_U0000) != -1)
+ throw new IllegalArgumentException("Key contains code point U+0000");
+ if (value.indexOf(CODE_POINT_U0000) != -1)
+ throw new IllegalArgumentException("Value contains code point U+0000");
synchronized(lock) {
if (removed)
@@ -275,10 +287,14 @@ public abstract class AbstractPreferences extends Preferences {
* removed with the {@link #removeNode()} method.
* @throws NullPointerException if key is <tt>null</tt>. (A
* <tt>null</tt> default <i>is</i> permitted.)
+ * @throws IllegalArgumentException if key contains the null control
+ * character, code point U+0000.
*/
public String get(String key, String def) {
if (key==null)
throw new NullPointerException("Null key");
+ if (key.indexOf(CODE_POINT_U0000) != -1)
+ throw new IllegalArgumentException("Key contains code point U+0000");
synchronized(lock) {
if (removed)
throw new IllegalStateException("Node has been removed.");
@@ -306,10 +322,14 @@ public abstract class AbstractPreferences extends Preferences {
* @param key key whose mapping is to be removed from the preference node.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
+ * @throws IllegalArgumentException if key contains the null control
+ * character, code point U+0000.
* @throws NullPointerException {@inheritDoc}.
*/
public void remove(String key) {
Objects.requireNonNull(key, "Specified key cannot be null");
+ if (key.indexOf(CODE_POINT_U0000) != -1)
+ throw new IllegalArgumentException("Key contains code point U+0000");
synchronized(lock) {
if (removed)
throw new IllegalStateException("Node has been removed.");
@@ -353,6 +373,8 @@ public abstract class AbstractPreferences extends Preferences {
* @throws NullPointerException if key is <tt>null</tt>.
* @throws IllegalArgumentException if <tt>key.length()</tt> exceeds
* <tt>MAX_KEY_LENGTH</tt>.
+ * @throws IllegalArgumentException if key contains
+ * the null control character, code point U+0000.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
*/
@@ -381,6 +403,8 @@ public abstract class AbstractPreferences extends Preferences {
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
* @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.
+ * @throws IllegalArgumentException if key contains the null control
+ * character, code point U+0000.
*/
public int getInt(String key, int def) {
int result = def;
@@ -408,6 +432,8 @@ public abstract class AbstractPreferences extends Preferences {
* @throws NullPointerException if key is <tt>null</tt>.
* @throws IllegalArgumentException if <tt>key.length()</tt> exceeds
* <tt>MAX_KEY_LENGTH</tt>.
+ * @throws IllegalArgumentException if key contains
+ * the null control character, code point U+0000.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
*/
@@ -436,6 +462,8 @@ public abstract class AbstractPreferences extends Preferences {
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
* @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.
+ * @throws IllegalArgumentException if key contains the null control
+ * character, code point U+0000.
*/
public long getLong(String key, long def) {
long result = def;
@@ -463,6 +491,8 @@ public abstract class AbstractPreferences extends Preferences {
* @throws NullPointerException if key is <tt>null</tt>.
* @throws IllegalArgumentException if <tt>key.length()</tt> exceeds
* <tt>MAX_KEY_LENGTH</tt>.
+ * @throws IllegalArgumentException if key contains
+ * the null control character, code point U+0000.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
*/
@@ -494,6 +524,8 @@ public abstract class AbstractPreferences extends Preferences {
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
* @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.
+ * @throws IllegalArgumentException if key contains the null control
+ * character, code point U+0000.
*/
public boolean getBoolean(String key, boolean def) {
boolean result = def;
@@ -521,6 +553,8 @@ public abstract class AbstractPreferences extends Preferences {
* @throws NullPointerException if key is <tt>null</tt>.
* @throws IllegalArgumentException if <tt>key.length()</tt> exceeds
* <tt>MAX_KEY_LENGTH</tt>.
+ * @throws IllegalArgumentException if key contains
+ * the null control character, code point U+0000.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
*/
@@ -549,6 +583,8 @@ public abstract class AbstractPreferences extends Preferences {
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
* @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.
+ * @throws IllegalArgumentException if key contains the null control
+ * character, code point U+0000.
*/
public float getFloat(String key, float def) {
float result = def;
@@ -576,6 +612,8 @@ public abstract class AbstractPreferences extends Preferences {
* @throws NullPointerException if key is <tt>null</tt>.
* @throws IllegalArgumentException if <tt>key.length()</tt> exceeds
* <tt>MAX_KEY_LENGTH</tt>.
+ * @throws IllegalArgumentException if key contains
+ * the null control character, code point U+0000.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
*/
@@ -604,6 +642,8 @@ public abstract class AbstractPreferences extends Preferences {
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
* @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.
+ * @throws IllegalArgumentException if key contains the null control
+ * character, code point U+0000.
*/
public double getDouble(String key, double def) {
double result = def;
@@ -627,6 +667,8 @@ public abstract class AbstractPreferences extends Preferences {
* @throws NullPointerException if key or value is <tt>null</tt>.
* @throws IllegalArgumentException if key.length() exceeds MAX_KEY_LENGTH
* or if value.length exceeds MAX_VALUE_LENGTH*3/4.
+ * @throws IllegalArgumentException if key contains
+ * the null control character, code point U+0000.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
*/
@@ -650,6 +692,8 @@ public abstract class AbstractPreferences extends Preferences {
* removed with the {@link #removeNode()} method.
* @throws NullPointerException if <tt>key</tt> is <tt>null</tt>. (A
* <tt>null</tt> value for <tt>def</tt> <i>is</i> permitted.)
+ * @throws IllegalArgumentException if key contains the null control
+ * character, code point U+0000.
*/
public byte[] getByteArray(String key, byte[] def) {
byte[] result = def;
diff --git a/jdk/src/java.prefs/share/classes/java/util/prefs/Preferences.java b/jdk/src/java.prefs/share/classes/java/util/prefs/Preferences.java
index beb0b0fa1a9..9edefc5affb 100644
--- a/jdk/src/java.prefs/share/classes/java/util/prefs/Preferences.java
+++ b/jdk/src/java.prefs/share/classes/java/util/prefs/Preferences.java
@@ -489,7 +489,7 @@ public abstract class Preferences {
* <tt>MAX_VALUE_LENGTH</tt>.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
- * @throws IllegalArgumentException if either the key or the value contain
+ * @throws IllegalArgumentException if either key or value contain
* the null control character, code point U+0000.
*/
public abstract void put(String key, String value);
@@ -514,6 +514,8 @@ public abstract class Preferences {
* removed with the {@link #removeNode()} method.
* @throws NullPointerException if <tt>key</tt> is <tt>null</tt>. (A
* <tt>null</tt> value for <tt>def</tt> <i>is</i> permitted.)
+ * @throws IllegalArgumentException if key contains the null control
+ * character, code point U+0000.
*/
public abstract String get(String key, String def);
@@ -530,6 +532,8 @@ public abstract class Preferences {
* @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
+ * @throws IllegalArgumentException if key contains the null control
+ * character, code point U+0000.
*/
public abstract void remove(String key);
@@ -566,6 +570,8 @@ public abstract class Preferences {
* <tt>MAX_KEY_LENGTH</tt>.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
+ * @throws IllegalArgumentException if key contains
+ * the null control character, code point U+0000.
* @see #getInt(String,int)
*/
public abstract void putInt(String key, int value);
@@ -597,6 +603,8 @@ public abstract class Preferences {
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
* @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.
+ * @throws IllegalArgumentException if key contains the null control
+ * character, code point U+0000.
* @see #putInt(String,int)
* @see #get(String,String)
*/
@@ -616,6 +624,8 @@ public abstract class Preferences {
* <tt>MAX_KEY_LENGTH</tt>.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
+ * @throws IllegalArgumentException if key contains
+ * the null control character, code point U+0000.
* @see #getLong(String,long)
*/
public abstract void putLong(String key, long value);
@@ -647,6 +657,8 @@ public abstract class Preferences {
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
* @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.
+ * @throws IllegalArgumentException if key contains the null control
+ * character, code point U+0000.
* @see #putLong(String,long)
* @see #get(String,String)
*/
@@ -666,6 +678,8 @@ public abstract class Preferences {
* <tt>MAX_KEY_LENGTH</tt>.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
+ * @throws IllegalArgumentException if key contains
+ * the null control character, code point U+0000.
* @see #getBoolean(String,boolean)
* @see #get(String,String)
*/
@@ -702,6 +716,8 @@ public abstract class Preferences {
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
* @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.
+ * @throws IllegalArgumentException if key contains the null control
+ * character, code point U+0000.
* @see #get(String,String)
* @see #putBoolean(String,boolean)
*/
@@ -721,6 +737,8 @@ public abstract class Preferences {
* <tt>MAX_KEY_LENGTH</tt>.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
+ * @throws IllegalArgumentException if key contains
+ * the null control character, code point U+0000.
* @see #getFloat(String,float)
*/
public abstract void putFloat(String key, float value);
@@ -751,6 +769,8 @@ public abstract class Preferences {
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
* @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.
+ * @throws IllegalArgumentException if key contains the null control
+ * character, code point U+0000.
* @see #putFloat(String,float)
* @see #get(String,String)
*/
@@ -770,6 +790,8 @@ public abstract class Preferences {
* <tt>MAX_KEY_LENGTH</tt>.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
+ * @throws IllegalArgumentException if key contains
+ * the null control character, code point U+0000.
* @see #getDouble(String,double)
*/
public abstract void putDouble(String key, double value);
@@ -800,6 +822,8 @@ public abstract class Preferences {
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
* @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.
+ * @throws IllegalArgumentException if key contains the null control
+ * character, code point U+0000.
* @see #putDouble(String,double)
* @see #get(String,String)
*/
@@ -825,6 +849,8 @@ public abstract class Preferences {
* or if value.length exceeds MAX_VALUE_LENGTH*3/4.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
+ * @throws IllegalArgumentException if key contains
+ * the null control character, code point U+0000.
* @see #getByteArray(String,byte[])
* @see #get(String,String)
*/
@@ -864,6 +890,8 @@ public abstract class Preferences {
* removed with the {@link #removeNode()} method.
* @throws NullPointerException if <tt>key</tt> is <tt>null</tt>. (A
* <tt>null</tt> value for <tt>def</tt> <i>is</i> permitted.)
+ * @throws IllegalArgumentException if key contains the null control
+ * character, code point U+0000.
* @see #get(String,String)
* @see #putByteArray(String,byte[])
*/
diff --git a/jdk/src/java.prefs/unix/classes/java/util/prefs/FileSystemPreferences.java b/jdk/src/java.prefs/unix/classes/java/util/prefs/FileSystemPreferences.java
index 9d412ed7f67..10188cc98c5 100644
--- a/jdk/src/java.prefs/unix/classes/java/util/prefs/FileSystemPreferences.java
+++ b/jdk/src/java.prefs/unix/classes/java/util/prefs/FileSystemPreferences.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2011, 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
@@ -49,13 +49,6 @@ import sun.util.logging.PlatformLogger;
*/
class FileSystemPreferences extends AbstractPreferences {
- /**
- * The code point U+0000, assigned to the null control character, is the
- * only character encoded in Unicode and ISO/IEC 10646 that is always
- * invalid in any XML 1.0 and 1.1 document.
- */
- private static final String CODE_POINT_U0000 = String.valueOf('\u0000');
-
static {
PrivilegedAction<Void> load = () -> {
System.loadLibrary("prefs");
@@ -532,11 +525,6 @@ class FileSystemPreferences extends AbstractPreferences {
}
protected void putSpi(String key, String value) {
- if (key.indexOf(CODE_POINT_U0000) != -1) {
- throw new IllegalArgumentException("Key contains code point U+0000");
- } else if (value.indexOf(CODE_POINT_U0000) != -1) {
- throw new IllegalArgumentException("Value contains code point U+0000");
- }
initCacheIfNecessary();
changeLog.add(new Put(key, value));
prefsCache.put(key, value);
diff --git a/jdk/src/java.prefs/windows/classes/java/util/prefs/WindowsPreferences.java b/jdk/src/java.prefs/windows/classes/java/util/prefs/WindowsPreferences.java
index 6844234d39d..ec5b492ba9d 100644
--- a/jdk/src/java.prefs/windows/classes/java/util/prefs/WindowsPreferences.java
+++ b/jdk/src/java.prefs/windows/classes/java/util/prefs/WindowsPreferences.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015, 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
@@ -25,8 +25,6 @@
package java.util.prefs;
-import java.util.Map;
-import java.util.TreeMap;
import java.util.StringTokenizer;
import java.io.ByteArrayOutputStream;
import java.security.AccessController;
@@ -46,7 +44,7 @@ import sun.util.logging.PlatformLogger;
* @since 1.4
*/
-class WindowsPreferences extends AbstractPreferences{
+class WindowsPreferences extends AbstractPreferences {
static {
PrivilegedAction<Void> load = () -> {
@@ -620,22 +618,22 @@ class WindowsPreferences extends AbstractPreferences{
* @see #getSpi(String)
*/
protected void putSpi(String javaName, String value) {
- int nativeHandle = openKey(KEY_SET_VALUE);
- if (nativeHandle == NULL_NATIVE_HANDLE) {
- isBackingStoreAvailable = false;
- return;
- }
- int result = WindowsRegSetValueEx1(nativeHandle,
- toWindowsName(javaName), toWindowsValueString(value));
- if (result != ERROR_SUCCESS) {
- logger().warning("Could not assign value to key " +
- byteArrayToString(toWindowsName(javaName))+ " at Windows registry node "
- + byteArrayToString(windowsAbsolutePath()) + " at root 0x"
- + Integer.toHexString(rootNativeHandle()) +
- ". Windows RegSetValueEx(...) returned error code " + result + ".");
- isBackingStoreAvailable = false;
+ int nativeHandle = openKey(KEY_SET_VALUE);
+ if (nativeHandle == NULL_NATIVE_HANDLE) {
+ isBackingStoreAvailable = false;
+ return;
}
- closeKey(nativeHandle);
+ int result = WindowsRegSetValueEx1(nativeHandle,
+ toWindowsName(javaName), toWindowsValueString(value));
+ if (result != ERROR_SUCCESS) {
+ logger().warning("Could not assign value to key " +
+ byteArrayToString(toWindowsName(javaName))+ " at Windows registry node "
+ + byteArrayToString(windowsAbsolutePath()) + " at root 0x"
+ + Integer.toHexString(rootNativeHandle()) +
+ ". Windows RegSetValueEx(...) returned error code " + result + ".");
+ isBackingStoreAvailable = false;
+ }
+ closeKey(nativeHandle);
}
/**
@@ -645,18 +643,18 @@ class WindowsPreferences extends AbstractPreferences{
* @see #putSpi(String, String)
*/
protected String getSpi(String javaName) {
- int nativeHandle = openKey(KEY_QUERY_VALUE);
- if (nativeHandle == NULL_NATIVE_HANDLE) {
- return null;
- }
- Object resultObject = WindowsRegQueryValueEx(nativeHandle,
- toWindowsName(javaName));
- if (resultObject == null) {
+ int nativeHandle = openKey(KEY_QUERY_VALUE);
+ if (nativeHandle == NULL_NATIVE_HANDLE) {
+ return null;
+ }
+ Object resultObject = WindowsRegQueryValueEx(nativeHandle,
+ toWindowsName(javaName));
+ if (resultObject == null) {
+ closeKey(nativeHandle);
+ return null;
+ }
closeKey(nativeHandle);
- return null;
- }
- closeKey(nativeHandle);
- return toJavaValueString((byte[]) resultObject);
+ return toJavaValueString((byte[]) resultObject);
}
/**
diff --git a/jdk/src/java.smartcardio/share/classes/javax/smartcardio/package.html b/jdk/src/java.smartcardio/share/classes/javax/smartcardio/package.html
index e7d5f435001..6686916e6f8 100644
--- a/jdk/src/java.smartcardio/share/classes/javax/smartcardio/package.html
+++ b/jdk/src/java.smartcardio/share/classes/javax/smartcardio/package.html
@@ -46,27 +46,23 @@ The API is defined by classes in the package
<a href="CommandAPDU.html">CommandAPDU</a>,
<a href="ResponseAPDU.html">ResponseAPDU</a>
-<p>
<dt>Factory to obtain implementations
<dd>
<a href="TerminalFactory.html">TerminalFactory</a>
-<p>
<dt>Main classes for card and terminal functions
<dd>
-<a href="CardTerminals.html">CardTerminals</a>,
-<a href="CardTerminal.html">CardTerminal</a>,
+<a href="CardTerminals.html">CardTerminals</a>,
+<a href="CardTerminal.html">CardTerminal</a>,
<a href="Card.html">Card</a>,
<a href="CardChannel.html">CardChannel</a>
-<p>
<dt>Supporting permission and exception classes
<dd>
-<a href="CardPermission.html">CardPermission</a>,
-<a href="CardException.html">CardException</a>,
+<a href="CardPermission.html">CardPermission</a>,
+<a href="CardException.html">CardException</a>,
<a href="CardNotPresentException.html">CardNotPresentException</a>
-<p>
<dt>Service provider interface, not accessed directly by applications
<dd>
<a href="TerminalFactorySpi.html">TerminalFactorySpi</a>
@@ -94,7 +90,6 @@ A simple example of using the API is:
card.disconnect(false);
</pre>
-<P>
@since 1.6
@author Andreas Sterbenz
@author JSR 268 Expert Group
diff --git a/jdk/src/jdk.attach/share/classes/com/sun/tools/attach/AgentInitializationException.java b/jdk/src/jdk.attach/share/classes/com/sun/tools/attach/AgentInitializationException.java
index b747a73eabe..058b0f0048f 100644
--- a/jdk/src/jdk.attach/share/classes/com/sun/tools/attach/AgentInitializationException.java
+++ b/jdk/src/jdk.attach/share/classes/com/sun/tools/attach/AgentInitializationException.java
@@ -29,15 +29,15 @@ package com.sun.tools.attach;
* The exception thrown when an agent fails to initialize in the target
* Java virtual machine.
*
- * <p> This exception is thrown by {@link
- * com.sun.tools.attach.VirtualMachine#loadAgent VirtualMachine.loadAgent},
+ * <p> This exception is thrown by
+ * {@link com.sun.tools.attach.VirtualMachine#loadAgent VirtualMachine.loadAgent},
* {@link com.sun.tools.attach.VirtualMachine#loadAgentLibrary
- * VirtualMachine.loadAgentLibrary}, {@link
- * com.sun.tools.attach.VirtualMachine#loadAgentPath VirtualMachine.loadAgentPath}
+ * VirtualMachine.loadAgentLibrary},
+ * {@link com.sun.tools.attach.VirtualMachine#loadAgentPath VirtualMachine.loadAgentPath}
* methods if an agent, or agent library, cannot be initialized.
- * When thrown by <tt>VirtualMachine.loadAgentLibrary</tt>, or
- * <tt>VirtualMachine.loadAgentPath</tt> then the exception encapsulates
- * the error returned by the agent's <code>Agent_OnAttach</code> function.
+ * When thrown by {@code VirtualMachine.loadAgentLibrary}, or
+ * {@code VirtualMachine.loadAgentPath} then the exception encapsulates
+ * the error returned by the agent's {@code Agent_OnAttach} function.
* This error code can be obtained by invoking the {@link #returnValue() returnValue} method.
*/
@jdk.Exported
@@ -49,7 +49,7 @@ public class AgentInitializationException extends Exception {
private int returnValue;
/**
- * Constructs an <code>AgentInitializationException</code> with
+ * Constructs an {@code AgentInitializationException} with
* no detail message.
*/
public AgentInitializationException() {
@@ -58,7 +58,7 @@ public class AgentInitializationException extends Exception {
}
/**
- * Constructs an <code>AgentInitializationException</code> with
+ * Constructs an {@code AgentInitializationException} with
* the specified detail message.
*
* @param s the detail message.
@@ -69,9 +69,9 @@ public class AgentInitializationException extends Exception {
}
/**
- * Constructs an <code>AgentInitializationException</code> with
+ * Constructs an {@code AgentInitializationException} with
* the specified detail message and the return value from the
- * execution of the agent's <code>Agent_OnAttach</code> function.
+ * execution of the agent's {@code Agent_OnAttach} function.
*
* @param s the detail message.
* @param returnValue the return value
@@ -83,8 +83,8 @@ public class AgentInitializationException extends Exception {
/**
* If the exception was created with the return value from the agent
- * <code>Agent_OnAttach</code> function then this returns that value,
- * otherwise returns <code>0</code>. </p>
+ * {@code Agent_OnAttach} function then this returns that value,
+ * otherwise returns {@code 0}.
*
* @return the return value
*/
diff --git a/jdk/src/jdk.attach/share/classes/com/sun/tools/attach/spi/AttachProvider.java b/jdk/src/jdk.attach/share/classes/com/sun/tools/attach/spi/AttachProvider.java
index aa4a521ffae..4948be78031 100644
--- a/jdk/src/jdk.attach/share/classes/com/sun/tools/attach/spi/AttachProvider.java
+++ b/jdk/src/jdk.attach/share/classes/com/sun/tools/attach/spi/AttachProvider.java
@@ -41,7 +41,7 @@ import java.util.ServiceLoader;
*
* <p> An attach provider is a concrete subclass of this class that has a
* zero-argument constructor and implements the abstract methods specified
- * below. </p>
+ * below.
*
* <p> An attach provider implementation is typically tied to a Java virtual
* machine implementation, version, or even mode of operation. That is, a specific
@@ -51,7 +51,7 @@ import java.util.ServiceLoader;
* Sun's <i>HotSpot</i> virtual machine. In general, if an environment
* consists of Java virtual machines of different versions and from different
* vendors then there will be an attach provider implementation for each
- * <i>family</i> of implementations or versions. </p>
+ * <i>family</i> of implementations or versions.
*
* <p> An attach provider is identified by its {@link #name <i>name</i>} and
* {@link #type <i>type</i>}. The <i>name</i> is typically, but not required to
@@ -61,15 +61,15 @@ import java.util.ServiceLoader;
* implementation that uses the Doors inter-process communication mechanism
* might use the type <i>"doors"</i>. The purpose of the name and type is to
* identify providers in environments where there are multiple providers
- * installed. </p>
+ * installed.
*
* <p> AttachProvider implementations are loaded and instantiated at the first
* invocation of the {@link #providers() providers} method. This method
* attempts to load all provider implementations that are installed on the
- * platform. </p>
+ * platform.
*
* <p> All of the methods in this class are safe for use by multiple
- * concurrent threads. </p>
+ * concurrent threads.
*
* @since 1.6
*/
@@ -81,12 +81,12 @@ public abstract class AttachProvider {
private static List<AttachProvider> providers = null;
/**
- * Initializes a new instance of this class. </p>
+ * Initializes a new instance of this class.
*
* @throws SecurityException
* If a security manager has been installed and it denies
* {@link com.sun.tools.attach.AttachPermission AttachPermission}
- * <tt>("createAttachProvider")</tt>
+ * ("{@code createAttachProvider}")
*/
protected AttachProvider() {
SecurityManager sm = System.getSecurityManager();
@@ -95,14 +95,14 @@ public abstract class AttachProvider {
}
/**
- * Return this provider's name. </p>
+ * Return this provider's name.
*
* @return The name of this provider
*/
public abstract String name();
/**
- * Return this provider's type. </p>
+ * Return this provider's type.
*
* @return The type of this provider
*/
@@ -113,18 +113,18 @@ public abstract class AttachProvider {
*
* <p> A Java virtual machine is identified by an abstract identifier. The
* nature of this identifier is platform dependent but in many cases it will be the
- * string representation of the process identifier (or pid). </p>
+ * string representation of the process identifier (or pid).
*
* <p> This method parses the identifier and maps the identifier to a Java
* virtual machine (in an implementation dependent manner). If the identifier
- * cannot be parsed by the provider then an {@link
- * com.sun.tools.attach.AttachNotSupportedException AttachNotSupportedException}
+ * cannot be parsed by the provider then an
+ * {@link com.sun.tools.attach.AttachNotSupportedException AttachNotSupportedException}
* is thrown. Once parsed this method attempts to attach to the Java virtual machine.
* If the provider detects that the identifier corresponds to a Java virtual machine
* that does not exist, or it corresponds to a Java virtual machine that does not support
* the attach mechanism implemented by this provider, or it detects that the
* Java virtual machine is a version to which this provider cannot attach, then
- * an <code>AttachNotSupportedException</code> is thrown. </p>
+ * an {@code AttachNotSupportedException} is thrown.
*
* @param id
* The abstract identifier that identifies the Java virtual machine.
@@ -134,7 +134,7 @@ public abstract class AttachProvider {
* @throws SecurityException
* If a security manager has been installed and it denies
* {@link com.sun.tools.attach.AttachPermission AttachPermission}
- * <tt>("attachVirtualMachine")</tt>, or other permission
+ * ("{@code attachVirtualMachine}"), or other permission
* required by the implementation.
*
* @throws AttachNotSupportedException
@@ -147,7 +147,7 @@ public abstract class AttachProvider {
* If some other I/O error occurs
*
* @throws NullPointerException
- * If <code>id</code> is <code>null</code>
+ * If {@code id} is {@code null}
*/
public abstract VirtualMachine attachVirtualMachine(String id)
throws AttachNotSupportedException, IOException;
@@ -155,10 +155,10 @@ public abstract class AttachProvider {
/**
* Attaches to a Java virtual machine.
*
- * <p> A Java virtual machine can be described using a {@link
- * com.sun.tools.attach.VirtualMachineDescriptor VirtualMachineDescriptor}.
- * This method invokes the descriptor's {@link
- * com.sun.tools.attach.VirtualMachineDescriptor#provider() provider()} method
+ * <p> A Java virtual machine can be described using a
+ * {@link com.sun.tools.attach.VirtualMachineDescriptor VirtualMachineDescriptor}.
+ * This method invokes the descriptor's
+ * {@link com.sun.tools.attach.VirtualMachineDescriptor#provider() provider()} method
* to check that it is equal to this provider. It then attempts to attach to the
* Java virtual machine.
*
@@ -170,20 +170,20 @@ public abstract class AttachProvider {
* @throws SecurityException
* If a security manager has been installed and it denies
* {@link com.sun.tools.attach.AttachPermission AttachPermission}
- * <tt>("attachVirtualMachine")</tt>, or other permission
+ * ("{@code attachVirtualMachine}"), or other permission
* required by the implementation.
*
* @throws AttachNotSupportedException
- * If the descriptor's {@link
- * com.sun.tools.attach.VirtualMachineDescriptor#provider() provider()} method
- * returns a provider that is not this provider, or it does not correspond
- * to a Java virtual machine to which this provider can attach.
+ * If the descriptor's
+ * {@link com.sun.tools.attach.VirtualMachineDescriptor#provider() provider()}
+ * method returns a provider that is not this provider, or it does not
+ * correspond to a Java virtual machine to which this provider can attach.
*
* @throws IOException
* If some other I/O error occurs
*
* @throws NullPointerException
- * If <code>vmd</code> is <code>null</code>
+ * If {@code vmd} is {@code null}
*/
public VirtualMachine attachVirtualMachine(VirtualMachineDescriptor vmd)
throws AttachNotSupportedException, IOException
@@ -197,12 +197,13 @@ public abstract class AttachProvider {
/**
* Lists the Java virtual machines known to this provider.
*
- * <p> This method returns a list of {@link
- * com.sun.tools.attach.VirtualMachineDescriptor} elements. Each
- * <code>VirtualMachineDescriptor</code> describes a Java virtual machine
+ * <p> This method returns a list of
+ * {@link com.sun.tools.attach.VirtualMachineDescriptor} elements. Each
+ * {@code VirtualMachineDescriptor} describes a Java virtual machine
* to which this provider can <i>potentially</i> attach. There isn't any
- * guarantee that invoking {@link #attachVirtualMachine(VirtualMachineDescriptor)
- * attachVirtualMachine} on each descriptor in the list will succeed.
+ * guarantee that invoking
+ * {@link #attachVirtualMachine(VirtualMachineDescriptor) attachVirtualMachine}
+ * on each descriptor in the list will succeed.
*
* @return The list of virtual machine descriptors which describe the
* Java virtual machines known to this provider (may be empty).
@@ -216,31 +217,31 @@ public abstract class AttachProvider {
* <p> An AttachProvider is installed on the platform if:
*
* <ul>
- * <li><p>It is installed in a JAR file that is visible to the defining
+ * <li>It is installed in a JAR file that is visible to the defining
* class loader of the AttachProvider type (usually, but not required
* to be, the {@link java.lang.ClassLoader#getSystemClassLoader system
- * class loader}).</p></li>
+ * class loader}).</li>
*
- * <li><p>The JAR file contains a provider configuration named
- * <tt>com.sun.tools.attach.spi.AttachProvider</tt> in the resource directory
- * <tt>META-INF/services</tt>. </p></li>
+ * <li>The JAR file contains a provider configuration named
+ * {@code com.sun.tools.attach.spi.AttachProvider} in the resource directory
+ * {@code META-INF/services}.</li>
*
- * <li><p>The provider configuration file lists the full-qualified class
- * name of the AttachProvider implementation. </p></li>
+ * <li>The provider configuration file lists the full-qualified class
+ * name of the AttachProvider implementation.</li>
* </ul>
*
* <p> The format of the provider configuration file is one fully-qualified
* class name per line. Space and tab characters surrounding each class name,
* as well as blank lines are ignored. The comment character is
- * <tt>'#'</tt> (<tt>0x23</tt>), and on each line all characters following
+ * {@code '#'} ({@code 0x23}), and on each line all characters following
* the first comment character are ignored. The file must be encoded in
- * UTF-8. </p>
+ * UTF-8.
*
* <p> AttachProvider implementations are loaded and instantiated
* (using the zero-arg constructor) at the first invocation of this method.
* The list returned by the first invocation of this method is the list
* of providers. Subsequent invocations of this method return a list of the same
- * providers. The list is unmodifable.</p>
+ * providers. The list is unmodifable.
*
* @return A list of the installed attach providers.
*/
diff --git a/jdk/src/jdk.httpserver/share/classes/com/sun/net/httpserver/Filter.java b/jdk/src/jdk.httpserver/share/classes/com/sun/net/httpserver/Filter.java
index e28bdc6299a..ac5d6fe718b 100644
--- a/jdk/src/jdk.httpserver/share/classes/com/sun/net/httpserver/Filter.java
+++ b/jdk/src/jdk.httpserver/share/classes/com/sun/net/httpserver/Filter.java
@@ -72,7 +72,7 @@ public abstract class Filter {
* exchange handler will not be invoked.
* @param exchange the HttpExchange
* @throws IOException let exceptions pass up the stack
- * @throws NullPointerException if exchange is <code>null</code>
+ * @throws NullPointerException if exchange is {@code null}
*/
public void doFilter (HttpExchange exchange) throws IOException {
if (!iter.hasNext()) {
@@ -86,14 +86,14 @@ public abstract class Filter {
/**
* Asks this filter to pre/post-process the given exchange. The filter
- * can :-
+ * can:
* <ul><li>examine or modify the request headers</li>
* <li>filter the request body or the response body, by creating suitable
* filter streams and calling
* {@link HttpExchange#setStreams(InputStream,OutputStream)}</li>
* <li>set attribute Objects in the exchange, which other filters or the
* exchange handler can access.</li>
- * <li>decide to either :-<ol>
+ * <li>decide to either<ol>
* <li>invoke the next filter in the chain, by calling
* {@link Filter.Chain#doFilter(HttpExchange)}</li>
* <li>terminate the chain of invocation, by <b>not</b> calling
@@ -102,12 +102,13 @@ public abstract class Filter {
* filters in the Chain have been called, and the response headers can be
* examined or modified.</li>
* <li>if option 2. above taken, then this Filter must use the HttpExchange
- * to send back an appropriate response</li></ul><p>
- * @param exchange the <code>HttpExchange</code> to be filtered.
+ * to send back an appropriate response</li></ul>
+ *
+ * @param exchange the {@code HttpExchange} to be filtered.
* @param chain the Chain which allows the next filter to be invoked.
* @throws IOException may be thrown by any filter module, and if
* caught, must be rethrown again.
- * @throws NullPointerException if either exchange or chain are <code>null</code>
+ * @throws NullPointerException if either exchange or chain are {@code null}
*/
public abstract void doFilter (HttpExchange exchange, Chain chain)
throws IOException;
diff --git a/jdk/src/jdk.httpserver/share/classes/com/sun/net/httpserver/Headers.java b/jdk/src/jdk.httpserver/share/classes/com/sun/net/httpserver/Headers.java
index 0ca7d39d420..5c0608b84fa 100644
--- a/jdk/src/jdk.httpserver/share/classes/com/sun/net/httpserver/Headers.java
+++ b/jdk/src/jdk.httpserver/share/classes/com/sun/net/httpserver/Headers.java
@@ -29,18 +29,21 @@ import java.util.*;
/**
* HTTP request and response headers are represented by this class which implements
- * the interface {@link java.util.Map}&lt;
- * {@link java.lang.String},{@link java.util.List}&lt;{@link java.lang.String}&gt;&gt;.
+ * the interface
+ * {@link java.util.Map}{@literal <}{@link java.lang.String}, {@link java.util.List}
+ * {@literal <}{@link java.lang.String}{@literal >>}.
* The keys are case-insensitive Strings representing the header names and
- * the value associated with each key is a {@link List}&lt;{@link String}&gt; with one
+ * the value associated with each key is
+ * a {@link List}{@literal <}{@link String}{@literal >} with one
* element for each occurrence of the header name in the request or response.
* <p>
- * For example, if a response header instance contains one key "HeaderName" with two values "value1 and value2"
+ * For example, if a response header instance contains
+ * one key "HeaderName" with two values "value1 and value2"
* then this object is output as two header lines:
* <blockquote><pre>
* HeaderName: value1
* HeaderName: value2
- * </blockquote></pre>
+ * </pre></blockquote>
* <p>
* All the normal {@link java.util.Map} methods are provided, but the following
* additional convenience methods are most likely to be used:
diff --git a/jdk/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpExchange.java b/jdk/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpExchange.java
index 73d7a0e5f5c..757f067451b 100644
--- a/jdk/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpExchange.java
+++ b/jdk/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpExchange.java
@@ -116,9 +116,9 @@ public abstract class HttpExchange {
public abstract HttpContext getHttpContext ();
/**
- * Ends this exchange by doing the following in sequence:<p><ol>
- * <li>close the request InputStream, if not already closed<p></li>
- * <li>close the response OutputStream, if not already closed. </li>
+ * Ends this exchange by doing the following in sequence:<ol>
+ * <li>close the request InputStream, if not already closed;</li>
+ * <li>close the response OutputStream, if not already closed.</li>
* </ol>
*/
public abstract void close () ;
@@ -163,9 +163,9 @@ public abstract class HttpExchange {
* and the numeric response code as specified in this method. The response body length is also specified
* as follows. If the response length parameter is greater than zero, this specifies an exact
* number of bytes to send and the application must send that exact amount of data.
- * If the response length parameter is <code>zero</code>, then chunked transfer encoding is
+ * If the response length parameter is {@code zero}, then chunked transfer encoding is
* used and an arbitrary amount of data may be sent. The application terminates the
- * response body by closing the OutputStream. If response length has the value <code>-1</code>
+ * response body by closing the OutputStream. If response length has the value {@code -1}
* then no response body is being sent.
* <p>
* If the content-length response header has not already been set then
@@ -192,7 +192,7 @@ public abstract class HttpExchange {
/**
* Returns the response code, if it has already been set
- * @return the response code, if available. <code>-1</code> if not available yet.
+ * @return the response code, if available. {@code -1} if not available yet.
*/
public abstract int getResponseCode ();
@@ -219,7 +219,7 @@ public abstract class HttpExchange {
* available.
* @param name the name of the attribute to retrieve
* @return the attribute object, or null if it does not exist
- * @throws NullPointerException if name is <code>null</code>
+ * @throws NullPointerException if name is {@code null}
*/
public abstract Object getAttribute (String name) ;
@@ -231,9 +231,9 @@ public abstract class HttpExchange {
* Each Filter class will document the attributes which they make
* available.
* @param name the name to associate with the attribute value
- * @param value the object to store as the attribute value. <code>null</code>
+ * @param value the object to store as the attribute value. {@code null}
* value is permitted.
- * @throws NullPointerException if name is <code>null</code>
+ * @throws NullPointerException if name is {@code null}
*/
public abstract void setAttribute (String name, Object value) ;
@@ -248,9 +248,9 @@ public abstract class HttpExchange {
* required to be) sub-classes of {@link java.io.FilterInputStream}
* and {@link java.io.FilterOutputStream}.
* @param i the filtered input stream to set as this object's inputstream,
- * or <code>null</code> if no change.
+ * or {@code null} if no change.
* @param o the filtered output stream to set as this object's outputstream,
- * or <code>null</code> if no change.
+ * or {@code null} if no change.
*/
public abstract void setStreams (InputStream i, OutputStream o);
@@ -259,7 +259,7 @@ public abstract class HttpExchange {
* If an authenticator is set on the HttpContext that owns this exchange,
* then this method will return the {@link HttpPrincipal} that represents
* the authenticated user for this HttpExchange.
- * @return the HttpPrincipal, or <code>null</code> if no authenticator is set.
+ * @return the HttpPrincipal, or {@code null} if no authenticator is set.
*/
public abstract HttpPrincipal getPrincipal ();
}
diff --git a/jdk/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpServer.java b/jdk/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpServer.java
index 02e9994ea71..f26dc1d65df 100644
--- a/jdk/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpServer.java
+++ b/jdk/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpServer.java
@@ -58,8 +58,8 @@ import com.sun.net.httpserver.spi.HttpServerProvider;
* whose path is the longest matching prefix of the request URI's path.
* Paths are matched literally, which means that the strings are compared
* case sensitively, and with no conversion to or from any encoded forms.
- * For example. Given a HttpServer with the following HttpContexts configured.<p>
- * <table >
+ * For example. Given a HttpServer with the following HttpContexts configured.
+ * <table>
* <tr><td><i>Context</i></td><td><i>Context path</i></td></tr>
* <tr><td>ctx1</td><td>"/"</td></tr>
* <tr><td>ctx2</td><td>"/apps/"</td></tr>
@@ -67,7 +67,7 @@ import com.sun.net.httpserver.spi.HttpServerProvider;
* </table>
* <p>
* the following table shows some request URIs and which, if any context they would
- * match with.<p>
+ * match with.
* <table>
* <tr><td><i>Request URI</i></td><td><i>Matches context</i></td></tr>
* <tr><td>"http://foo.com/apps/foo/bar"</td><td>ctx3</td></tr>
@@ -181,7 +181,7 @@ public abstract class HttpServer {
* approximately <i>delay</i> seconds have elapsed (whichever happens
* sooner). Then, all open TCP connections are closed, the background
* thread created by start() exits, and the method returns.
- * Once stopped, a HttpServer cannot be re-used. <p>
+ * Once stopped, a HttpServer cannot be re-used.
*
* @param delay the maximum time in seconds to wait until exchanges have finished.
* @throws IllegalArgumentException if delay is less than zero.
diff --git a/jdk/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpsConfigurator.java b/jdk/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpsConfigurator.java
index eda0e8b5f3d..22bca16346d 100644
--- a/jdk/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpsConfigurator.java
+++ b/jdk/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpsConfigurator.java
@@ -42,8 +42,8 @@ import javax.net.ssl.*;
* the default configuration.
* <p>
* The following <a name="example">example</a> shows how this may be done:
- * <p>
- * <pre><blockquote>
+ *
+ * <blockquote><pre>
* SSLContext sslContext = SSLContext.getInstance (....);
* HttpsServer server = HttpsServer.create();
*
@@ -64,7 +64,7 @@ import javax.net.ssl.*;
* params.setSSLParameters(sslparams);
* }
* });
- * </blockquote></pre>
+ * </pre></blockquote>
* @since 1.6
*/
@jdk.Exported
@@ -102,7 +102,7 @@ public class HttpsConfigurator {
* <p>
* The default implementation of this method uses the
* SSLParameters returned from <p>
- * <code>getSSLContext().getDefaultSSLParameters()</code>
+ * {@code getSSLContext().getDefaultSSLParameters()}
* <p>
* configure() may be overridden in order to modify this behavior.
* See, the example <a href="#example">above</a>.
diff --git a/jdk/src/jdk.httpserver/share/classes/com/sun/net/httpserver/package-info.java b/jdk/src/jdk.httpserver/share/classes/com/sun/net/httpserver/package-info.java
index 9fc1b7bd13b..84f13d61226 100644
--- a/jdk/src/jdk.httpserver/share/classes/com/sun/net/httpserver/package-info.java
+++ b/jdk/src/jdk.httpserver/share/classes/com/sun/net/httpserver/package-info.java
@@ -58,7 +58,7 @@
server.createContext("/applications/myapp", new MyHandler());
server.setExecutor(null); // creates a default executor
server.start();
- </blockquote></pre>
+ </pre></blockquote>
<p>The example above creates a simple HttpServer which uses the calling
application thread to invoke the handle() method for incoming http
requests directed to port 8000, and to the path /applications/myapp/.
@@ -92,7 +92,7 @@
SSLContext ssl = SSLContext.getInstance("TLS");
ssl.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
- </blockquote></pre>
+ </pre></blockquote>
<p>
In the example above, a keystore file called "testkeys", created with the keytool utility
is used as a certificate store for client and server certificates.
@@ -119,8 +119,8 @@
}
});
- </blockquote></pre>
- <p>
+ </pre></blockquote>
+
@since 1.6
*/
@jdk.Exported
diff --git a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/Bootstrap.java b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/Bootstrap.java
index 8ab09545e0d..623a7a4d5a9 100644
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/Bootstrap.java
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/Bootstrap.java
@@ -43,13 +43,12 @@ public class Bootstrap extends Object {
* <p> May throw an unspecified error if initialization of the
* {@link com.sun.jdi.VirtualMachineManager} fails or if
* the virtual machine manager is unable to locate or create
- * any {@link com.sun.jdi.connect.Connector Connectors}. </p>
- * <p>
+ * any {@link com.sun.jdi.connect.Connector Connectors}.
+ *
* @throws java.lang.SecurityException if a security manager has been
* installed and it denies {@link JDIPermission}
- * <tt>("virtualMachineManager")</tt> or other unspecified
+ * ("{@code virtualMachineManager}") or other unspecified
* permissions required by the implementation.
- * </p>
*/
static public synchronized VirtualMachineManager virtualMachineManager() {
return com.sun.tools.jdi.VirtualMachineManagerImpl.virtualMachineManager();
diff --git a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/Field.java b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/Field.java
index 00e2b75a196..6842a81fa78 100644
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/Field.java
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/Field.java
@@ -65,22 +65,22 @@ public interface Field extends TypeComponent, Comparable<Field> {
* short s;
* Date d;
* byte[] ba;</PRE>
- * And the JDI client defines these <CODE>Field</CODE> objects:
+ * And the JDI client defines these {@code Field} objects:
* <PRE>
* Field sField = targetClass.fieldByName("s");
* Field dField = targetClass.fieldByName("d");
* Field baField = targetClass.fieldByName("ba");</PRE>
- * to mirror the corresponding fields, then <CODE>sField.type()</CODE>
- * is a {@link ShortType}, <CODE>dField.type()</CODE> is the
- * {@link ReferenceType} for <CODE>java.util.Date</CODE> and
- * <CODE>((ArrayType)(baField.type())).componentType()</CODE> is a
+ * to mirror the corresponding fields, then {@code sField.type()}
+ * is a {@link ShortType}, {@code dField.type()} is the
+ * {@link ReferenceType} for {@code java.util.Date} and
+ * {@code ((ArrayType)(baField.type())).componentType()} is a
* {@link ByteType}.
* <P>
* Note: if the type of this field is a reference type (class,
* interface, or array) and it has not been created or loaded
* by the declaring type's class loader - that is,
- * {@link TypeComponent#declaringType <CODE>declaringType()</CODE>}
- * <CODE>.classLoader()</CODE>,
+ * {@link TypeComponent#declaringType declaringType()}
+ * {@code .classLoader()},
* then ClassNotLoadedException will be thrown.
* Also, a reference type may have been loaded but not yet prepared,
* in which case the type will be returned
@@ -100,28 +100,28 @@ public interface Field extends TypeComponent, Comparable<Field> {
/**
* Determine if this is a transient field.
*
- * @return <code>true</code> if this field is transient; false otherwise.
+ * @return {@code true} if this field is transient; {@code false} otherwise.
*/
boolean isTransient();
/**
* Determine if this is a volatile field.
*
- * @return <code>true</code> if this field is volatile; false otherwise.
+ * @return {@code true} if this field is volatile; {@code false} otherwise.
*/
boolean isVolatile();
/**
* Determine if this is a field that represents an enum constant.
- * @return <code>true</code> if this field represents an enum constant;
- * false otherwise.
+ * @return {@code true} if this field represents an enum constant;
+ * {@code false} otherwise.
*/
boolean isEnumConstant();
/**
* Compares the specified Object with this field for equality.
*
- * @return true if the Object is a Field and if both
+ * @return {@code true} if the Object is a Field and if both
* mirror the same field (declared in the same class or interface, in
* the same VM).
*/
@@ -130,7 +130,7 @@ public interface Field extends TypeComponent, Comparable<Field> {
/**
* Returns the hash code value for this Field.
*
- * @return the integer hash code
+ * @return the integer hash code.
*/
int hashCode();
}
diff --git a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/JDIPermission.java b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/JDIPermission.java
index 7c3fad78845..0f4abb258a8 100644
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/JDIPermission.java
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/JDIPermission.java
@@ -26,20 +26,20 @@
package com.sun.jdi;
/**
- * The <code>JDIPermission</code> class represents access rights to
- * the <code>VirtualMachineManager</code>. This is the permission
+ * The {@code JDIPermission} class represents access rights to
+ * the {@code VirtualMachineManager}. This is the permission
* which the SecurityManager will check when code that is running with
* a SecurityManager requests access to the VirtualMachineManager, as
* defined in the Java Debug Interface (JDI) for the Java platform.
* <P>
- * A <code>JDIPermission</code> object contains a name (also referred
+ * A {@code JDIPermission} object contains a name (also referred
* to as a "target name") but no actions list; you either have the
* named permission or you don't.
* <P>
* The following table provides a summary description of what the
* permission allows, and discusses the risks of granting code the
* permission.
- * <P>
+ *
* <table border=1 cellpadding=5 summary="Table shows permission
* target name, what the permission allows, and associated risks">
* <tr>
@@ -51,10 +51,10 @@ package com.sun.jdi;
* <tr>
* <td>virtualMachineManager</td>
* <td>Ability to inspect and modify the JDI objects in the
- * <code>VirtualMachineManager</code>
+ * {@code VirtualMachineManager}
* </td>
* <td>This allows an attacker to control the
- * <code>VirtualMachineManager</code> and cause the system to
+ * {@code VirtualMachineManager} and cause the system to
* misbehave.
* </td>
* </tr>
@@ -82,8 +82,8 @@ package com.sun.jdi;
public final class JDIPermission extends java.security.BasicPermission {
private static final long serialVersionUID = -6988461416938786271L;
/**
- * The <code>JDIPermission</code> class represents access rights to the
- * <code>VirtualMachineManager</code>
+ * The {@code JDIPermission} class represents access rights to the
+ * {@code VirtualMachineManager}
* @param name Permission name. Must be "virtualMachineManager".
* @throws IllegalArgumentException if the name argument is invalid.
*/
diff --git a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/Method.java b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/Method.java
index eb81b058c89..39cde3ea73c 100644
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/Method.java
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/Method.java
@@ -49,7 +49,7 @@ public interface Method extends TypeComponent, Locatable, Comparable<Method> {
* This type name is always available even if
* the type has not yet been created or loaded.
*
- * @return a String containing the return type name.
+ * @return a {@code String} containing the return type name.
*/
String returnTypeName();
@@ -60,8 +60,8 @@ public interface Method extends TypeComponent, Locatable, Comparable<Method> {
* Note: if the return type of this method is a reference type (class,
* interface, or array) and it has not been created or loaded
* by the declaring type's class loader - that is,
- * {@link TypeComponent#declaringType <CODE>declaringType()</CODE>}
- * <CODE>.classLoader()</CODE>,
+ * {@link TypeComponent#declaringType declaringType()}
+ * {@code .classLoader()},
* then ClassNotLoadedException will be thrown.
* Also, a reference type may have been loaded but not yet prepared,
* in which case the type will be returned
@@ -93,7 +93,6 @@ public interface Method extends TypeComponent, Locatable, Comparable<Method> {
* as specified at compile-time.
* If the formal parameter was declared with an ellipsis, then
* it is represented as an array of the type before the ellipsis.
- *
*/
List<String> argumentTypeNames();
@@ -105,8 +104,8 @@ public interface Method extends TypeComponent, Locatable, Comparable<Method> {
* is a reference type (class, interface, or array)
* and it has not been created or loaded
* by the declaring type's class loader - that is,
- * {@link TypeComponent#declaringType <CODE>declaringType()</CODE>}
- * <CODE>.classLoader()</CODE>,
+ * {@link TypeComponent#declaringType declaringType()}
+ * {@code .classLoader()},
* then ClassNotLoadedException will be thrown.
* Also, a reference type may have been loaded but not yet prepared,
* in which case the list will be returned
@@ -132,16 +131,16 @@ public interface Method extends TypeComponent, Locatable, Comparable<Method> {
/**
* Determine if this method is abstract.
*
- * @return <code>true</code> if the method is declared abstract;
- * false otherwise.
+ * @return {@code true} if the method is declared abstract;
+ * {@code false} otherwise.
*/
boolean isAbstract();
/**
* Determine if this method is a default method
*
- * @return <code>true</code> if the method is declared default;
- * false otherwise
+ * @return {@code true} if the method is declared default;
+ * {@code false} otherwise.
*
* @since 1.8
*/
@@ -152,24 +151,24 @@ public interface Method extends TypeComponent, Locatable, Comparable<Method> {
/**
* Determine if this method is synchronized.
*
- * @return <code>true</code> if the method is declared synchronized;
- * false otherwise.
+ * @return {@code true} if the method is declared synchronized;
+ * {@code false} otherwise.
*/
boolean isSynchronized();
/**
* Determine if this method is native.
*
- * @return <code>true</code> if the method is declared native;
- * false otherwise.
+ * @return {@code true} if the method is declared native;
+ * {@code false} otherwise.
*/
boolean isNative();
/**
* Determine if this method accepts a variable number of arguments.
*
- * @return <code>true</code> if the method accepts a variable number
- * of arguments, false otherwise.
+ * @return {@code true} if the method accepts a variable number
+ * of arguments, {@code false} otherwise.
*
* @since 1.5
*/
@@ -180,8 +179,8 @@ public interface Method extends TypeComponent, Locatable, Comparable<Method> {
* methods are defined in
* <cite>The Java&trade; Language Specification</cite>.
*
- * @return <code>true</code> if the method is a bridge method,
- * false otherwise.
+ * @return {@code true} if the method is a bridge method,
+ * {@code false} otherwise.
*
* @since 1.5
*/
@@ -190,23 +189,23 @@ public interface Method extends TypeComponent, Locatable, Comparable<Method> {
/**
* Determine if this method is a constructor.
*
- * @return <code>true</code> if the method is a constructor;
- * false otherwise.
+ * @return {@code true} if the method is a constructor;
+ * {@code false} otherwise.
*/
boolean isConstructor();
/**
* Determine if this method is a static initializer.
*
- * @return <code>true</code> if the method is a static initializer;
- * false otherwise.
+ * @return {@code true} if the method is a static initializer;
+ * {@code false} otherwise.
*/
boolean isStaticInitializer();
/**
* Determine if this method is obsolete.
*
- * @return <code>true</code> if this method has been made obsolete by a
+ * @return {@code true} if this method has been made obsolete by a
* {@link VirtualMachine#redefineClasses} operation.
*
* @since 1.4
@@ -218,7 +217,7 @@ public interface Method extends TypeComponent, Locatable, Comparable<Method> {
* each executable source line in this method.
* <P>
* This method is equivalent to
- * <code>allLineLocations(vm.getDefaultStratum(),null)</code> -
+ * {@code allLineLocations(vm.getDefaultStratum(),null)} -
* see {@link #allLineLocations(String,String)}
* for more information.
*
@@ -252,16 +251,16 @@ public interface Method extends TypeComponent, Locatable, Comparable<Method> {
* (see {@link Location} for a description of strata).
*
* @param stratum The stratum to retrieve information from
- * or <code>null</code> for the {@link ReferenceType#defaultStratum()}
+ * or {@code null} for the {@link ReferenceType#defaultStratum()}
*
* @param sourceName Return locations only within this
- * source file or <code>null</code> to return locations.
+ * source file or {@code null} to return locations.
*
* @return a List of all source line {@link Location} objects.
*
* @throws AbsentInformationException if there is no line
* number information for this (non-native, non-abstract)
- * method. Or if <i>sourceName</i> is non-<code>null</code>
+ * method. Or if <i>sourceName</i> is non-{@code null}
* and source name information is not present.
*
* @since 1.4
@@ -274,8 +273,8 @@ public interface Method extends TypeComponent, Locatable, Comparable<Method> {
* that map to the given line number.
* <P>
* This method is equivalent to
- * <code>locationsOfLine(vm.getDefaultStratum(), null,
- * lineNumber)</code> -
+ * {@code locationsOfLine(vm.getDefaultStratum(), null,
+ * lineNumber)} -
* see {@link
* #locationsOfLine(java.lang.String,java.lang.String,int)}
* for more information.
@@ -320,7 +319,7 @@ public interface Method extends TypeComponent, Locatable, Comparable<Method> {
*
* @throws AbsentInformationException if there is no line
* number information for this method.
- * Or if <i>sourceName</i> is non-<code>null</code>
+ * Or if <i>sourceName</i> is non-{@code null}
* and source name information is not present.
*
* @since 1.4
@@ -436,7 +435,7 @@ public interface Method extends TypeComponent, Locatable, Comparable<Method> {
/**
* Returns the hash code value for this Method.
*
- * @return the integer hash code
+ * @return the integer hash code.
*/
int hashCode();
}
diff --git a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/Value.java b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/Value.java
index 4957b02407b..01d869b2ce3 100644
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/Value.java
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/Value.java
@@ -63,47 +63,47 @@ package com.sun.jdi;
* <TH id="type" align="left">{@link Type} of value<br>{@link #type() Value.type()}</TH>
* <TR>
* <TD headers="primval kind"> a boolean</TD>
- * <TD headers="primval example"> <CODE>true</CODE></TD>
+ * <TD headers="primval example"> {@code true}</TD>
* <TD headers="primval mirrored"> {@link BooleanValue}</TD>
* <TD headers="primval type"> {@link BooleanType}</TD>
* <TR>
* <TD headers="primval kind"> a byte</TD>
- * <TD headers="primval example"> <CODE>(byte)4</CODE></TD>
+ * <TD headers="primval example"> {@code (byte)4}</TD>
* <TD headers="primval mirrored"> {@link ByteValue}</TD>
* <TD headers="primval type"> {@link ByteType}</TD>
* <TR>
* <TD headers="primval kind"> a char</TD>
- * <TD headers="primval example"> <CODE>'a'</CODE></TD>
+ * <TD headers="primval example"> {@code 'a'}</TD>
* <TD headers="primval mirrored"> {@link CharValue}</TD>
* <TD headers="primval type"> {@link CharType}</TD>
* <TR>
* <TD headers="primval kind"> a double</TD>
- * <TD headers="primval example"> <CODE>3.1415926</CODE></TD>
+ * <TD headers="primval example"> {@code 3.1415926}</TD>
* <TD headers="primval mirrored"> {@link DoubleValue}</TD>
* <TD headers="primval type"> {@link DoubleType}</TD>
* <TR>
* <TD headers="primval kind"> a float</TD>
- * <TD headers="primval example"> <CODE>2.5f</CODE></TD>
+ * <TD headers="primval example"> {@code 2.5f}</TD>
* <TD headers="primval mirrored"> {@link FloatValue}</TD>
* <TD headers="primval type"> {@link FloatType}</TD>
* <TR>
* <TD headers="primval kind"> an int</TD>
- * <TD headers="primval example"> <CODE>22</CODE></TD>
+ * <TD headers="primval example"> {@code 22}</TD>
* <TD headers="primval mirrored"> {@link IntegerValue}</TD>
* <TD headers="primval type"> {@link IntegerType}</TD>
* <TR>
* <TD headers="primval kind"> a long</TD>
- * <TD headers="primval example"> <CODE>1024L</CODE></TD>
+ * <TD headers="primval example"> {@code 1024L}</TD>
* <TD headers="primval mirrored"> {@link LongValue}</TD>
* <TD headers="primval type"> {@link LongType}</TD>
* <TR>
* <TD headers="primval kind"> a short</TD>
- * <TD headers="primval example"> <CODE>(short)12</CODE></TD>
+ * <TD headers="primval example"> {@code (short)12}</TD>
* <TD headers="primval mirrored"> {@link ShortValue}</TD>
* <TD headers="primval type"> {@link ShortType}</TD>
* <TR>
* <TD headers="primval kind"> a void</TD>
- * <TD headers="primval example"> <CODE>&nbsp;</CODE></TD>
+ * <TD headers="primval example"> </TD>
* <TD headers="primval mirrored"> {@link VoidValue}</TD>
* <TD headers="primval type"> {@link VoidType}</TD>
* <TR BGCOLOR="#EEEEFF">
@@ -115,50 +115,50 @@ package com.sun.jdi;
* <TH id="type2" align="left">{@link Type} of value<br>{@link #type() Value.type()}</TH>
* <TR>
* <TD headers="objref kind2"> a class instance</TD>
- * <TD headers="objref example2"> <CODE>this</CODE></TD>
+ * <TD headers="objref example2"> {@code this}</TD>
* <TD headers="objref mirrored2"> {@link ObjectReference}</TD>
* <TD headers="objref type2"> {@link ClassType}</TD>
* <TR>
* <TD headers="objref kind2"> an array</TD>
- * <TD headers="objref example2"> <CODE>new int[5]</CODE></TD>
+ * <TD headers="objref example2"> {@code new int[5]}</TD>
* <TD headers="objref mirrored2"> {@link ArrayReference}</TD>
* <TD headers="objref type2"> {@link ArrayType}</TD>
* <TR>
* <TD headers="objref kind2"> a string</TD>
- * <TD headers="objref example2"> <CODE>"hello"</CODE></TD>
+ * <TD headers="objref example2"> {@code "hello"}</TD>
* <TD headers="objref mirrored2"> {@link StringReference}</TD>
* <TD headers="objref type2"> {@link ClassType}</TD>
* <TR>
* <TD headers="objref kind2"> a thread</TD>
- * <TD headers="objref example2"> <CODE>Thread.currentThread()</CODE></TD>
+ * <TD headers="objref example2"> {@code Thread.currentThread()}</TD>
* <TD headers="objref mirrored2"> {@link ThreadReference}</TD>
* <TD headers="objref type2"> {@link ClassType}</TD>
* <TR>
* <TD headers="objref kind2"> a thread group</TD>
- * <TD headers="objref example2"> <CODE>Thread.currentThread()<br>&nbsp;&nbsp;.getThreadGroup()</CODE></TD>
+ * <TD headers="objref example2"> {@code Thread.currentThread()}<br>&nbsp;&nbsp;{@code .getThreadGroup()}</TD>
* <TD headers="objref mirrored2"> {@link ThreadGroupReference}</TD>
* <TD headers="objref type2"> {@link ClassType}</TD>
* <TR>
- * <TD headers="objref kind2"> a <CODE>java.lang.Class</CODE><br>instance</TD>
- * <TD headers="objref example2"> <CODE>this.getClass()</CODE></TD>
+ * <TD headers="objref kind2"> a {@code java.lang.Class}<br>instance</TD>
+ * <TD headers="objref example2"> {@code this.getClass()}</TD>
* <TD headers="objref mirrored2"> {@link ClassObjectReference}</TD>
* <TD headers="objref type2"> {@link ClassType}</TD>
* <TR>
* <TD headers="objref kind2"> a class loader</TD>
- * <TD headers="objref example2"> <CODE>this.getClass()<br>&nbsp;&nbsp;.getClassLoader() </CODE></TD>
+ * <TD headers="objref example2"> {@code this.getClass()}<br>&nbsp;&nbsp;{@code .getClassLoader()}</TD>
* <TD headers="objref mirrored2"> {@link ClassLoaderReference}</TD>
* <TD headers="objref type2"> {@link ClassType}</TD>
* <TR BGCOLOR="#EEEEFF">
* <TH id="other" colspan=4>Other</TH>
* <TR BGCOLOR="#EEEEFF">
- * <TH id="kind3" align="left">Kind of value</TD>
- * <TH id="example3" align="left">For example -<br>expression in target</TD>
- * <TH id="mirrored3" align="left">Is mirrored as</TD>
- * <TH id="type3" align="left">{@link Type} of value</TD>
+ * <TD id="kind3" align="left">Kind of value</TD>
+ * <TD id="example3" align="left">For example -<br>expression in target</TD>
+ * <TD id="mirrored3" align="left">Is mirrored as</TD>
+ * <TD id="type3" align="left">{@link Type} of value</TD>
* <TR>
* <TD headers="other kind3"> null</TD>
- * <TD headers="other example3"> <CODE>null</CODE></TD>
- * <TD headers="other mirrored3"> <CODE>null</CODE></TD>
+ * <TD headers="other example3"> {@code null}</TD>
+ * <TD headers="other mirrored3"> {@code null}</TD>
* <TD headers="other type3"> n/a</TD>
* </TABLE>
*
diff --git a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/VirtualMachineManager.java b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/VirtualMachineManager.java
index bb24b72faf8..55eb042fefc 100644
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/VirtualMachineManager.java
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/VirtualMachineManager.java
@@ -50,7 +50,7 @@ import java.io.IOException;
* examples use the command line syntax in Sun's implementation.
* Some {@link com.sun.jdi.connect.Connector} implementations may require slightly
* different handling than presented below.
- * <p>
+ *
* <TABLE BORDER WIDTH="75%" SUMMARY="Four scenarios for connecting a debugger
* to a virtual machine">
* <TR>
@@ -85,7 +85,7 @@ import java.io.IOException;
* <UL>
* <LI>
* Target VM is launched using the options
- * <code>-agentlib:jdwp=transport=xxx,server=y</code>
+ * {@code -agentlib:jdwp=transport=xxx,server=y}
* </LI>
* <LI>
* Target VM generates and outputs the tranport-specific address at which it will
@@ -110,6 +110,7 @@ import java.io.IOException;
* <TR>
* <TD>Target VM attaches to previously-running debugger</TD>
* <TD>
+ * <UL>
* <LI>
* At startup, debugger selects one or more connectors from
* the list returned by {@link #listeningConnectors} for one or more
@@ -126,7 +127,7 @@ import java.io.IOException;
* a target VM to connect.</LI>
* <LI>
* Later, target VM is launched by end user with the options
- * <code>-agentlib:jdwp=transport=xxx,address=yyy</code>
+ * {@code -agentlib:jdwp=transport=xxx,address=yyy}
* where "xxx" the transport for one of the connectors selected by the
* the debugger and "yyy"
* is the address generated by
@@ -135,15 +136,17 @@ import java.io.IOException;
* <LI>
* Debugger's call to {@link com.sun.jdi.connect.ListeningConnector#accept(java.util.Map)} returns
* a {@link VirtualMachine} mirror.</LI>
+ * </UL>
* </TD>
* </TR>
*
* <TR>
* <TD>Target VM launches debugger (sometimes called "Just-In-Time" debugging)</TD>
* <TD>
+ * <UL>
* <LI>
* Target VM is launched with the options
- * <code>-agentlib:jdwp=launch=cmdline,onuncaught=y,transport=xxx,server=y</code>
+ * {@code -agentlib:jdwp=launch=cmdline,onuncaught=y,transport=xxx,server=y}
* </LI>
* <LI>
* Later, an uncaught exception is thrown in the target VM. The target
@@ -171,6 +174,7 @@ import java.io.IOException;
* {@link com.sun.jdi.connect.AttachingConnector#attach(java.util.Map)} method
* of the selected to attach to the target VM. A {@link VirtualMachine}
* mirror is returned.
+ * </UL>
* </TD>
* </TR>
* </TABLE>
@@ -380,7 +384,7 @@ public interface VirtualMachineManager {
* a virtual machine mirror when a connection is established
* to a target VM. Only developers creating new Connector
* implementations should need to make direct use of this
- * method. </p>
+ * method.
*
* @param connection
* The open connection to the target VM.
@@ -415,7 +419,7 @@ public interface VirtualMachineManager {
* a virtual machine mirror when a connection is established
* to a target VM. Only developers creating new Connector
* implementations should need to make direct use of this
- * method. </p>
+ * method.
*
* @return the new virtual machine
*
diff --git a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/connect/spi/Connection.java b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/connect/spi/Connection.java
index 36df964839a..31e1ca5870f 100644
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/connect/spi/Connection.java
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/connect/spi/Connection.java
@@ -51,7 +51,7 @@ import java.io.IOException;
*
* <p> A Connection is safe for access by multiple concurrent threads,
* although at most one thread may be reading and at most one thread may
- * be writing at any given time. </p>
+ * be writing at any given time.
*
* @since 1.5
*/
@@ -70,18 +70,18 @@ public abstract class Connection {
*
* <p> Reading a packet does not do any integrity checking on
* the packet aside from a check that the length of the packet
- * (as indicated by the value of the <tt>length</tt> field, the
+ * (as indicated by the value of the {@code length} field, the
* first four bytes of the packet) is 11 or more bytes.
- * If the value of the <tt>length</tt> value is less then 11
- * then an <tt>IOException</tt> is thrown.
+ * If the value of the {@code length} value is less then 11
+ * then an {@code IOException} is thrown.
*
* <p> Returns a byte array of a length equal to the length
* of the received packet, or a byte array of length 0 when an
* end of stream is encountered. If end of stream is encountered
* after some, but not all bytes of a packet, are read then it
- * is considered an I/O error and an <tt>IOException</tt> is
+ * is considered an I/O error and an {@code IOException} is
* thrown. The first byte of the packet is stored in element
- * <tt>0</tt> of the byte array, the second in element <tt>1</tt>,
+ * {@code 0} of the byte array, the second in element {@code 1},
* and so on. The bytes in the byte array are laid out as per the
* <a href="../../../../../../../../../technotes/guides/jpda/jdwp-spec.html">
* JDWP specification</a>. That is, all fields in the packet
@@ -90,7 +90,7 @@ public abstract class Connection {
* <p> This method may be invoked at any time. If another thread has
* already initiated a {@link #readPacket readPacket} on this
* connection then the invocation of this method will block until the
- * first operation is complete. </p>
+ * first operation is complete.
*
* @return the packet read from the target VM
*
@@ -123,21 +123,21 @@ public abstract class Connection {
* href="../../../../../../../../../technotes/guides/jpda/jdwp-spec.html">
* JDWP specification</a>. That is, all fields in the packet
* are in big endian order. The first byte, that is element
- * <tt>pkt[0]</tt>, is the first byte of the <tt>length</tt> field.
- * <tt>pkt[1]</tt> is the second byte of the <tt>length</tt> field,
+ * {@code pkt[0]}, is the first byte of the {@code length} field.
+ * {@code pkt[1]} is the second byte of the {@code length} field,
* and so on.
*
* <p> Writing a packet does not do any integrity checking on
* the packet aside from checking the packet length. Checking
* the packet length requires checking that the value of the
- * <tt>length</tt> field (as indicated by the first four bytes
+ * {@code length} field (as indicated by the first four bytes
* of the packet) is 11 or greater. Consequently the length of
* the byte array provided to this method, that is
- * <tt>pkt.length</tt>, must be 11 or more, and must be equal
- * or greater than the value of the <tt>length</tt> field. If the
+ * {@code pkt.length}, must be 11 or more, and must be equal
+ * or greater than the value of the {@code length} field. If the
* length of the byte array is greater than the value of
- * the <tt>length</tt> field then all bytes from element
- * <tt>pkt[length]</tt> onwards are ignored. In other words,
+ * the {@code length} field then all bytes from element
+ * {@code pkt[length]} onwards are ignored. In other words,
* any additional bytes that follow the packet in the byte
* array are ignored and will not be transmitted to the target
* VM.
@@ -152,7 +152,7 @@ public abstract class Connection {
* <p> This method may be invoked at any time. If another thread has
* already initiated a write operation upon this Connection then
* a subsequent invocation of this method will block until the first
- * operation is complete. </p>
+ * operation is complete.
*
* @param pkt
* The packet to write to the target VM.
@@ -165,7 +165,7 @@ public abstract class Connection {
* If an I/O error occurs.
*
* @throws IllegalArgumentException
- * If the value of the <tt>length</tt> field is invalid,
+ * If the value of the {@code length} field is invalid,
* or the byte array is of insufficient length.
*/
public abstract void writePacket(byte pkt[]) throws IOException;
@@ -185,7 +185,7 @@ public abstract class Connection {
* <p> This method may be invoked at any time. If some other thread has
* already invoked it, however, then another invocation will block until
* the first invocation is complete, after which it will return without
- * effect. </p>
+ * effect.
*
* @throws java.io.IOException
* If an I/O error occurs
@@ -193,9 +193,9 @@ public abstract class Connection {
public abstract void close() throws IOException;
/**
- * Tells whether or not this connection is open. </p>
+ * Tells whether or not this connection is open.
*
- * @return <tt>true</tt> if, and only if, this connection is open
+ * @return {@code true} if and only if this connection is open
*/
public abstract boolean isOpen();
}
diff --git a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/doc-files/signature.html b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/doc-files/signature.html
index f7bdd8d2f86..b6b8d5ce666 100644
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/doc-files/signature.html
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/doc-files/signature.html
@@ -7,7 +7,7 @@ JDI Type Signatures
<BODY BGCOLOR="white">
<dl><dd>
<Table Border="0">
-<caption><h2>JDI Type Signatures</h2></caption>
+<caption><font size=5><b>JDI Type Signatures</b></font></caption>
<tr><th>Type Signature
<th>Java Type
<tr><td>Z<td>boolean
@@ -31,9 +31,9 @@ JDI Type Signatures
</Table>
</dd></dl>
<p>For example, the Java method:
-<p><pre> long f (int n, String s, int[] arr);
+<pre> long f (int n, String s, int[] arr);
</pre>has the following type signature:
-<p><pre> (ILjava/lang/String;[I)J
+<pre> (ILjava/lang/String;[I)J
</pre>
</BODY>
</HTML>
diff --git a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/EventSet.java b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/EventSet.java
index bba0573ebaa..640dacd0113 100644
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/EventSet.java
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/EventSet.java
@@ -51,7 +51,6 @@ import java.util.Set;
* <P>
* The events that are grouped in an EventSet are restricted in the
* following ways:
- * <P>
* <UL>
* <LI>Always singleton sets:
* <UL>
diff --git a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorContendedEnterEvent.java b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorContendedEnterEvent.java
index 0890d12d39b..8e7cbaac8ae 100644
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorContendedEnterEvent.java
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorContendedEnterEvent.java
@@ -29,9 +29,8 @@ import com.sun.jdi.*;
/**
*
- * Notification that a thread in the target VM is attempting
- * to enter a monitor that is already acquired by another thread.
- * <P>
+ * Notification that a thread in the target VM is attempting
+ * to enter a monitor that is already acquired by another thread.
*
* @see EventQueue
* @see MonitorContendedEnteredEvent
@@ -45,7 +44,6 @@ public interface MonitorContendedEnterEvent extends LocatableEvent {
/**
* Returns the thread in which this event has occurred.
- * <p>
*
* @return a {@link ThreadReference} which mirrors the event's thread in
* the target VM.
diff --git a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorContendedEnteredEvent.java b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorContendedEnteredEvent.java
index f249c180b15..8b4ca48a917 100644
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorContendedEnteredEvent.java
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorContendedEnteredEvent.java
@@ -31,7 +31,6 @@ import com.sun.jdi.*;
*
* Notification that a thread in the target VM is entering a monitor
* after waiting for it to be released by another thread.
- * <P>
*
* @see EventQueue
* @see MonitorContendedEnterEvent
@@ -44,7 +43,6 @@ public interface MonitorContendedEnteredEvent extends LocatableEvent {
/**
* Returns the thread in which this event has occurred.
- * <p>
*
* @return a {@link ThreadReference} which mirrors the event's thread in
* the target VM.
diff --git a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorWaitEvent.java b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorWaitEvent.java
index 6cd32a6b8d5..9a064356ba5 100644
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorWaitEvent.java
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorWaitEvent.java
@@ -30,7 +30,6 @@ import com.sun.jdi.*;
/**
* Notification that a thread in the target VM is about to
* wait on a monitor object.
- * <P>
*
* @see EventQueue
* @see MonitorWaitedEvent
@@ -43,7 +42,6 @@ public interface MonitorWaitEvent extends LocatableEvent {
/**
* Returns the thread in which monitor wait event has occurred.
- * <p>
*
* @return a {@link ThreadReference} which mirrors the event's thread in
* the target VM.
@@ -60,7 +58,7 @@ public interface MonitorWaitEvent extends LocatableEvent {
/**
* Returns the number of millisecond the thread will wait.
*
- * @return a <code>jlong</code> containing monitor wait time in milliseconds.
+ * @return a {@code jlong} containing monitor wait time in milliseconds.
*/
public long timeout();
}
diff --git a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorWaitedEvent.java b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorWaitedEvent.java
index f79cf03c22c..f29bed152d9 100644
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorWaitedEvent.java
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorWaitedEvent.java
@@ -30,7 +30,6 @@ import com.sun.jdi.*;
/**
* Notification that a thread in the target VM has finished
* waiting on an monitor object.
- * <P>
*
* @see EventQueue
* @see MonitorWaitEvent
@@ -43,7 +42,6 @@ public interface MonitorWaitedEvent extends LocatableEvent {
/**
* Returns the thread in which this event has occurred.
- * <p>
*
* @return a {@link ThreadReference} which mirrors the event's thread in
* the target VM.
@@ -60,7 +58,7 @@ public interface MonitorWaitedEvent extends LocatableEvent {
/**
* Returns whether the wait has timed out or been interrupted.
*
- * @return <code>true</code> if the wait is timed out.
+ * @return {@code true} if the wait is timed out.
*/
public boolean timedout();
diff --git a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/EventRequest.java b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/EventRequest.java
index 111963edc1b..137fdbb1c3f 100644
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/EventRequest.java
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/EventRequest.java
@@ -61,14 +61,14 @@ import com.sun.jdi.*;
* Filters can dramatically improve debugger performance by reducing the
* amount of event traffic sent from the target VM to the debugger VM.
* <p>
- * Any method on <code>EventRequest</code> which
- * takes <code>EventRequest</code> as an parameter may throw
+ * Any method on {@code EventRequest} which
+ * takes {@code EventRequest} as an parameter may throw
* {@link com.sun.jdi.VMDisconnectedException} if the target VM is
* disconnected and the {@link com.sun.jdi.event.VMDisconnectEvent} has been or is
* available to be read from the {@link com.sun.jdi.event.EventQueue}.
* <p>
- * Any method on <code>EventRequest</code> which
- * takes <code>EventRequest</code> as an parameter may throw
+ * Any method on {@code EventRequest} which
+ * takes {@code EventRequest} as an parameter may throw
* {@link com.sun.jdi.VMOutOfMemoryException} if the target VM has run out of memory.
*
* @see com.sun.jdi.event.BreakpointEvent
@@ -84,8 +84,8 @@ public interface EventRequest extends Mirror {
/**
* Determines if this event request is currently enabled.
*
- * @return <code>true</code> if enabled;
- * <code>false</code> otherwise.
+ * @return {@code true} if enabled;
+ * {@code false} otherwise.
*/
boolean isEnabled();
@@ -97,18 +97,18 @@ public interface EventRequest extends Mirror {
* and are included in event request lists such as
* {@link EventRequestManager#breakpointRequests()}.
*
- * @param val <code>true</code> if the event request is to be enabled;
- * <code>false</code> otherwise.
+ * @param val {@code true} if the event request is to be enabled;
+ * {@code false} otherwise.
* @throws InvalidRequestStateException if this request
* has been deleted.
* @throws IllegalThreadStateException if this is a StepRequest,
- * <code>val</code> is <code>true</code>, and the
+ * {@code val} is {@code true}, and the
* thread named in the request has died or is not yet started.
*/
void setEnabled(boolean val);
/**
- * Same as {@link #setEnabled <CODE>setEnabled(true)</CODE>}.
+ * Same as {@link #setEnabled setEnabled(true)}.
* @throws InvalidRequestStateException if this request
* has been deleted.
* @throws IllegalThreadStateException if this is a StepRequest
@@ -117,7 +117,7 @@ public interface EventRequest extends Mirror {
void enable();
/**
- * Same as {@link #setEnabled <CODE>setEnabled(false)</CODE>}.
+ * Same as {@link #setEnabled setEnabled(false)}.
* @throws InvalidRequestStateException if this request
* has been deleted.
*/
@@ -126,7 +126,7 @@ public interface EventRequest extends Mirror {
/**
* Limit the requested event to be reported at most once after a
* given number of occurrences. The event is not reported
- * the first <code>count - 1</code> times this filter is reached.
+ * the first {@code count - 1} times this filter is reached.
* To request a one-off event, call this method with a count of 1.
* <p>
* Once the count reaches 0, any subsequent filters in this request
@@ -139,7 +139,7 @@ public interface EventRequest extends Mirror {
* @throws InvalidRequestStateException if this request is currently
* enabled or has been deleted.
* Filters may be added only to disabled requests.
- * @throws IllegalArgumentException if <CODE>count</CODE>
+ * @throws IllegalArgumentException if {@code count}
* is less than one.
*/
void addCountFilter(int count);
@@ -189,7 +189,7 @@ public interface EventRequest extends Mirror {
* These client-set properties are not used internally
* by the JDI.
* <p>
- * The <code>get/putProperty</code> methods provide access to
+ * The {@code get/putProperty} methods provide access to
* a small per-instance map. This is <b>not</b> to be confused
* with {@link java.util.Properties}.
* <p>
diff --git a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/EventRequestManager.java b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/EventRequestManager.java
index 3664c84f1b6..e3b421ab897 100644
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/EventRequestManager.java
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/EventRequestManager.java
@@ -217,20 +217,20 @@ public interface EventRequestManager extends Mirror {
* activate this event request.
* <p>
* The returned request will control stepping only in the specified
- * <code>thread</code>; all other threads will be unaffected.
- * A <code>size</code>value of {@link com.sun.jdi.request.StepRequest#STEP_MIN} will generate a
+ * {@code thread}; all other threads will be unaffected.
+ * A {@code size} value of {@link com.sun.jdi.request.StepRequest#STEP_MIN} will generate a
* step event each time the code index changes. It represents the
* smallest step size available and often maps to the instruction
* level.
- * A <code>size</code> value of {@link com.sun.jdi.request.StepRequest#STEP_LINE} will generate a
+ * A {@code size} value of {@link com.sun.jdi.request.StepRequest#STEP_LINE} will generate a
* step event each time the source line changes unless line number information is not available,
* in which case a STEP_MIN will be done instead. For example, no line number information is
* available during the execution of a method that has been rendered obsolete by
* by a {@link com.sun.jdi.VirtualMachine#redefineClasses} operation.
- * A <code>depth</code> value of {@link com.sun.jdi.request.StepRequest#STEP_INTO} will generate
- * step events in any called methods. A <code>depth</code> value
+ * A {@code depth} value of {@link com.sun.jdi.request.StepRequest#STEP_INTO} will generate
+ * step events in any called methods. A {@code depth} value
* of {@link com.sun.jdi.request.StepRequest#STEP_OVER} restricts step events to the current frame
- * or caller frames. A <code>depth</code> value of {@link com.sun.jdi.request.StepRequest#STEP_OUT}
+ * or caller frames. A {@code depth} value of {@link com.sun.jdi.request.StepRequest#STEP_OUT}
* restricts step events to caller frames only. All depth
* restrictions are relative to the call stack immediately before the
* step takes place.
@@ -240,8 +240,7 @@ public interface EventRequestManager extends Mirror {
* Note that a typical debugger will want to cancel stepping
* after the first step is detected. Thus a next line method
* would do the following:
- * <code>
- * <pre>
+ * <pre>{@code
* EventRequestManager mgr = myVM.{@link VirtualMachine#eventRequestManager eventRequestManager}();
* StepRequest request = mgr.createStepRequest(myThread,
* StepRequest.{@link StepRequest#STEP_LINE STEP_LINE},
@@ -249,8 +248,7 @@ public interface EventRequestManager extends Mirror {
* request.{@link EventRequest#addCountFilter addCountFilter}(1); // next step only
* request.enable();
* myVM.{@link VirtualMachine#resume resume}();
- * </pre>
- * </code>
+ * }</pre>
*
* @param thread the thread in which to step
* @param depth the step depth
diff --git a/jdk/src/jdk.jdi/share/classes/jdi-overview.html b/jdk/src/jdk.jdi/share/classes/jdi-overview.html
index 579bd85b674..0a407f33868 100644
--- a/jdk/src/jdk.jdi/share/classes/jdi-overview.html
+++ b/jdk/src/jdk.jdi/share/classes/jdi-overview.html
@@ -49,7 +49,6 @@ not documented on individual methods.
Any method which takes a {@link java.lang.Object} as an parameter will throw
{@link java.lang.NullPointerException} if null is passed directly or indirectly
-- unless null is explicitly mentioned as a valid parameter.
- <p>
</blockquote>
NOTE: The exceptions below may be thrown whenever the specified
conditions are met but a guarantee that they are thrown only
diff --git a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTDomainPrincipal.java b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTDomainPrincipal.java
index e3a46debeed..995732efa16 100644
--- a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTDomainPrincipal.java
+++ b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTDomainPrincipal.java
@@ -28,19 +28,19 @@ package com.sun.security.auth;
import java.security.Principal;
/**
- * <p> This class implements the <code>Principal</code> interface
+ * This class implements the {@code Principal} interface
* and represents the name of the Windows NT domain into which the
* user authenticated. This will be a domain name if the user logged
* into a Windows NT domain, a workgroup name if the user logged into
* a workgroup, or a machine name if the user logged into a standalone
* configuration.
*
- * <p> Principals such as this <code>NTDomainPrincipal</code>
- * may be associated with a particular <code>Subject</code>
- * to augment that <code>Subject</code> with an additional
- * identity. Refer to the <code>Subject</code> class for more information
+ * <p> Principals such as this {@code NTDomainPrincipal}
+ * may be associated with a particular {@code Subject}
+ * to augment that {@code Subject} with an additional
+ * identity. Refer to the {@code Subject} class for more information
* on how to achieve this. Authorization decisions can then be based upon
- * the Principals associated with a <code>Subject</code>.
+ * the Principals associated with a {@code Subject}.
*
* @see java.security.Principal
* @see javax.security.auth.Subject
@@ -56,14 +56,12 @@ public class NTDomainPrincipal implements Principal, java.io.Serializable {
private String name;
/**
- * Create an <code>NTDomainPrincipal</code> with a Windows NT domain name.
+ * Create an {@code NTDomainPrincipal} with a Windows NT domain name.
*
- * <p>
+ * @param name the Windows NT domain name for this user.
*
- * @param name the Windows NT domain name for this user. <p>
- *
- * @exception NullPointerException if the <code>name</code>
- * is <code>null</code>.
+ * @exception NullPointerException if the {@code name}
+ * is {@code null}.
*/
public NTDomainPrincipal(String name) {
if (name == null) {
@@ -79,23 +77,19 @@ public class NTDomainPrincipal implements Principal, java.io.Serializable {
/**
* Return the Windows NT domain name for this
- * <code>NTDomainPrincipal</code>.
- *
- * <p>
+ * {@code NTDomainPrincipal}.
*
* @return the Windows NT domain name for this
- * <code>NTDomainPrincipal</code>
+ * {@code NTDomainPrincipal}
*/
public String getName() {
return name;
}
/**
- * Return a string representation of this <code>NTDomainPrincipal</code>.
- *
- * <p>
+ * Return a string representation of this {@code NTDomainPrincipal}.
*
- * @return a string representation of this <code>NTDomainPrincipal</code>.
+ * @return a string representation of this {@code NTDomainPrincipal}.
*/
public String toString() {
java.text.MessageFormat form = new java.text.MessageFormat
@@ -107,18 +101,16 @@ public class NTDomainPrincipal implements Principal, java.io.Serializable {
}
/**
- * Compares the specified Object with this <code>NTDomainPrincipal</code>
+ * Compares the specified Object with this {@code NTDomainPrincipal}
* for equality. Returns true if the given object is also a
- * <code>NTDomainPrincipal</code> and the two NTDomainPrincipals
+ * {@code NTDomainPrincipal} and the two NTDomainPrincipals
* have the same name.
*
- * <p>
- *
* @param o Object to be compared for equality with this
- * <code>NTDomainPrincipal</code>.
+ * {@code NTDomainPrincipal}.
*
* @return true if the specified Object is equal to this
- * <code>NTDomainPrincipal</code>.
+ * {@code NTDomainPrincipal}.
*/
public boolean equals(Object o) {
if (o == null)
@@ -137,11 +129,9 @@ public class NTDomainPrincipal implements Principal, java.io.Serializable {
}
/**
- * Return a hash code for this <code>NTDomainPrincipal</code>.
- *
- * <p>
+ * Return a hash code for this {@code NTDomainPrincipal}.
*
- * @return a hash code for this <code>NTDomainPrincipal</code>.
+ * @return a hash code for this {@code NTDomainPrincipal}.
*/
public int hashCode() {
return this.getName().hashCode();
diff --git a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTNumericCredential.java b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTNumericCredential.java
index 59208603c19..eca81587468 100644
--- a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTNumericCredential.java
+++ b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTNumericCredential.java
@@ -26,9 +26,8 @@
package com.sun.security.auth;
/**
- * <p> This class abstracts an NT security token
+ * This class abstracts an NT security token
* and provides a mechanism to do same-process security impersonation.
- *
*/
@jdk.Exported
@@ -37,12 +36,9 @@ public class NTNumericCredential {
private long impersonationToken;
/**
- * Create an <code>NTNumericCredential</code> with an integer value.
- *
- * <p>
- *
- * @param token the Windows NT security token for this user. <p>
+ * Create an {@code NTNumericCredential} with an integer value.
*
+ * @param token the Windows NT security token for this user.
*/
public NTNumericCredential(long token) {
this.impersonationToken = token;
@@ -50,23 +46,19 @@ public class NTNumericCredential {
/**
* Return an integer representation of this
- * <code>NTNumericCredential</code>.
- *
- * <p>
+ * {@code NTNumericCredential}.
*
* @return an integer representation of this
- * <code>NTNumericCredential</code>.
+ * {@code NTNumericCredential}.
*/
public long getToken() {
return impersonationToken;
}
/**
- * Return a string representation of this <code>NTNumericCredential</code>.
+ * Return a string representation of this {@code NTNumericCredential}.
*
- * <p>
- *
- * @return a string representation of this <code>NTNumericCredential</code>.
+ * @return a string representation of this {@code NTNumericCredential}.
*/
public String toString() {
java.text.MessageFormat form = new java.text.MessageFormat
@@ -78,18 +70,16 @@ public class NTNumericCredential {
}
/**
- * Compares the specified Object with this <code>NTNumericCredential</code>
+ * Compares the specified Object with this {@code NTNumericCredential}
* for equality. Returns true if the given object is also a
- * <code>NTNumericCredential</code> and the two NTNumericCredentials
+ * {@code NTNumericCredential} and the two NTNumericCredentials
* represent the same NT security token.
*
- * <p>
- *
* @param o Object to be compared for equality with this
- * <code>NTNumericCredential</code>.
+ * {@code NTNumericCredential}.
*
* @return true if the specified Object is equal to this
- * <code>NTNumericCredential</code>.
+ * {@code NTNumericCredential}.
*/
public boolean equals(Object o) {
if (o == null)
@@ -108,11 +98,9 @@ public class NTNumericCredential {
}
/**
- * Return a hash code for this <code>NTNumericCredential</code>.
- *
- * <p>
+ * Return a hash code for this {@code NTNumericCredential}.
*
- * @return a hash code for this <code>NTNumericCredential</code>.
+ * @return a hash code for this {@code NTNumericCredential}.
*/
public int hashCode() {
return (int)this.impersonationToken;
diff --git a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSid.java b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSid.java
index 28b40b9302f..a304eeb148d 100644
--- a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSid.java
+++ b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSid.java
@@ -28,7 +28,7 @@ package com.sun.security.auth;
import java.security.Principal;
/**
- * <p> This class implements the <code>Principal</code> interface
+ * This class implements the {@code Principal} interface
* and represents information about a Windows NT user, group or realm.
*
* <p> Windows NT chooses to represent users, groups and realms (or domains)
@@ -37,12 +37,12 @@ import java.security.Principal;
* also provides services that render these SIDs into string forms.
* This class represents these string forms.
*
- * <p> Principals such as this <code>NTSid</code>
- * may be associated with a particular <code>Subject</code>
- * to augment that <code>Subject</code> with an additional
- * identity. Refer to the <code>Subject</code> class for more information
+ * <p> Principals such as this {@code NTSid}
+ * may be associated with a particular {@code Subject}
+ * to augment that {@code Subject} with an additional
+ * identity. Refer to the {@code Subject} class for more information
* on how to achieve this. Authorization decisions can then be based upon
- * the Principals associated with a <code>Subject</code>.
+ * the Principals associated with a {@code Subject}.
*
* @see java.security.Principal
* @see javax.security.auth.Subject
@@ -58,16 +58,14 @@ public class NTSid implements Principal, java.io.Serializable {
private String sid;
/**
- * Create an <code>NTSid</code> with a Windows NT SID.
+ * Create an {@code NTSid} with a Windows NT SID.
*
- * <p>
+ * @param stringSid the Windows NT SID.
*
- * @param stringSid the Windows NT SID. <p>
+ * @exception NullPointerException if the {@code String}
+ * is {@code null}.
*
- * @exception NullPointerException if the <code>String</code>
- * is <code>null</code>.
- *
- * @exception IllegalArgumentException if the <code>String</code>
+ * @exception IllegalArgumentException if the {@code String}
* has zero length.
*/
public NTSid (String stringSid) {
@@ -89,22 +87,18 @@ public class NTSid implements Principal, java.io.Serializable {
}
/**
- * Return a string version of this <code>NTSid</code>.
- *
- * <p>
+ * Return a string version of this {@code NTSid}.
*
- * @return a string version of this <code>NTSid</code>
+ * @return a string version of this {@code NTSid}
*/
public String getName() {
return sid;
}
/**
- * Return a string representation of this <code>NTSid</code>.
- *
- * <p>
+ * Return a string representation of this {@code NTSid}.
*
- * @return a string representation of this <code>NTSid</code>.
+ * @return a string representation of this {@code NTSid}.
*/
public String toString() {
java.text.MessageFormat form = new java.text.MessageFormat
@@ -116,18 +110,16 @@ public class NTSid implements Principal, java.io.Serializable {
}
/**
- * Compares the specified Object with this <code>NTSid</code>
+ * Compares the specified Object with this {@code NTSid}
* for equality. Returns true if the given object is also a
- * <code>NTSid</code> and the two NTSids have the same String
+ * {@code NTSid} and the two NTSids have the same String
* representation.
*
- * <p>
- *
* @param o Object to be compared for equality with this
- * <code>NTSid</code>.
+ * {@code NTSid}.
*
* @return true if the specified Object is equal to this
- * <code>NTSid</code>.
+ * {@code NTSid}.
*/
public boolean equals(Object o) {
if (o == null)
@@ -147,11 +139,9 @@ public class NTSid implements Principal, java.io.Serializable {
}
/**
- * Return a hash code for this <code>NTSid</code>.
- *
- * <p>
+ * Return a hash code for this {@code NTSid}.
*
- * @return a hash code for this <code>NTSid</code>.
+ * @return a hash code for this {@code NTSid}.
*/
public int hashCode() {
return sid.hashCode();
diff --git a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSidDomainPrincipal.java b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSidDomainPrincipal.java
index e065ea49a08..0911f797efe 100644
--- a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSidDomainPrincipal.java
+++ b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSidDomainPrincipal.java
@@ -26,19 +26,19 @@
package com.sun.security.auth;
/**
- * <p> This class extends <code>NTSid</code>
+ * This class extends {@code NTSid}
* and represents a Windows NT user's domain SID.
*
* <p> An NT user only has a domain SID if in fact they are logged
* into an NT domain. If the user is logged into a workgroup or
* just a standalone configuration, they will NOT have a domain SID.
*
- * <p> Principals such as this <code>NTSidDomainPrincipal</code>
- * may be associated with a particular <code>Subject</code>
- * to augment that <code>Subject</code> with an additional
- * identity. Refer to the <code>Subject</code> class for more information
+ * <p> Principals such as this {@code NTSidDomainPrincipal}
+ * may be associated with a particular {@code Subject}
+ * to augment that {@code Subject} with an additional
+ * identity. Refer to the {@code Subject} class for more information
* on how to achieve this. Authorization decisions can then be based upon
- * the Principals associated with a <code>Subject</code>.
+ * the Principals associated with a {@code Subject}.
*
* @see java.security.Principal
* @see javax.security.auth.Subject
@@ -49,27 +49,23 @@ public class NTSidDomainPrincipal extends NTSid {
private static final long serialVersionUID = 5247810785821650912L;
/**
- * Create an <code>NTSidDomainPrincipal</code> with a Windows NT SID.
- *
- * <p>
+ * Create an {@code NTSidDomainPrincipal} with a Windows NT SID.
*
* @param name a string version of the Windows NT SID for this
- * user's domain.<p>
+ * user's domain.
*
- * @exception NullPointerException if the <code>name</code>
- * is <code>null</code>.
+ * @exception NullPointerException if the {@code name}
+ * is {@code null}.
*/
public NTSidDomainPrincipal(String name) {
super(name);
}
/**
- * Return a string representation of this <code>NTSidDomainPrincipal</code>.
- *
- * <p>
+ * Return a string representation of this {@code NTSidDomainPrincipal}.
*
* @return a string representation of this
- * <code>NTSidDomainPrincipal</code>.
+ * {@code NTSidDomainPrincipal}.
*/
public String toString() {
java.text.MessageFormat form = new java.text.MessageFormat
@@ -81,18 +77,16 @@ public class NTSidDomainPrincipal extends NTSid {
}
/**
- * Compares the specified Object with this <code>NTSidDomainPrincipal</code>
+ * Compares the specified Object with this {@code NTSidDomainPrincipal}
* for equality. Returns true if the given object is also a
- * <code>NTSidDomainPrincipal</code> and the two NTSidDomainPrincipals
+ * {@code NTSidDomainPrincipal} and the two NTSidDomainPrincipals
* have the same SID.
*
- * <p>
- *
* @param o Object to be compared for equality with this
- * <code>NTSidDomainPrincipal</code>.
+ * {@code NTSidDomainPrincipal}.
*
* @return true if the specified Object is equal to this
- * <code>NTSidDomainPrincipal</code>.
+ * {@code NTSidDomainPrincipal}.
*/
public boolean equals(Object o) {
if (o == null)
diff --git a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSidGroupPrincipal.java b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSidGroupPrincipal.java
index 5f509e22ec3..9bdc87b9dc5 100644
--- a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSidGroupPrincipal.java
+++ b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSidGroupPrincipal.java
@@ -26,15 +26,15 @@
package com.sun.security.auth;
/**
- * <p> This class extends <code>NTSid</code>
+ * This class extends {@code NTSid}
* and represents one of the groups to which a Windows NT user belongs.
*
- * <p> Principals such as this <code>NTSidGroupPrincipal</code>
- * may be associated with a particular <code>Subject</code>
- * to augment that <code>Subject</code> with an additional
- * identity. Refer to the <code>Subject</code> class for more information
+ * <p> Principals such as this {@code NTSidGroupPrincipal}
+ * may be associated with a particular {@code Subject}
+ * to augment that {@code Subject} with an additional
+ * identity. Refer to the {@code Subject} class for more information
* on how to achieve this. Authorization decisions can then be based upon
- * the Principals associated with a <code>Subject</code>.
+ * the Principals associated with a {@code Subject}.
*
* @see java.security.Principal
* @see javax.security.auth.Subject
@@ -46,25 +46,21 @@ public class NTSidGroupPrincipal extends NTSid {
private static final long serialVersionUID = -1373347438636198229L;
/**
- * Create an <code>NTSidGroupPrincipal</code> with a Windows NT group name.
+ * Create an {@code NTSidGroupPrincipal} with a Windows NT group name.
*
- * <p>
+ * @param name the Windows NT group SID for this user.
*
- * @param name the Windows NT group SID for this user. <p>
- *
- * @exception NullPointerException if the <code>name</code>
- * is <code>null</code>.
+ * @exception NullPointerException if the {@code name}
+ * is {@code null}.
*/
public NTSidGroupPrincipal(String name) {
super(name);
}
/**
- * Return a string representation of this <code>NTSidGroupPrincipal</code>.
- *
- * <p>
+ * Return a string representation of this {@code NTSidGroupPrincipal}.
*
- * @return a string representation of this <code>NTSidGroupPrincipal</code>.
+ * @return a string representation of this {@code NTSidGroupPrincipal}.
*/
public String toString() {
java.text.MessageFormat form = new java.text.MessageFormat
@@ -76,18 +72,16 @@ public class NTSidGroupPrincipal extends NTSid {
}
/**
- * Compares the specified Object with this <code>NTSidGroupPrincipal</code>
+ * Compares the specified Object with this {@code NTSidGroupPrincipal}
* for equality. Returns true if the given object is also a
- * <code>NTSidGroupPrincipal</code> and the two NTSidGroupPrincipals
+ * {@code NTSidGroupPrincipal} and the two NTSidGroupPrincipals
* have the same SID.
*
- * <p>
- *
* @param o Object to be compared for equality with this
- * <code>NTSidGroupPrincipal</code>.
+ * {@code NTSidGroupPrincipal}.
*
* @return true if the specified Object is equal to this
- * <code>NTSidGroupPrincipal</code>.
+ * {@code NTSidGroupPrincipal}.
*/
public boolean equals(Object o) {
if (o == null)
diff --git a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSidPrimaryGroupPrincipal.java b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSidPrimaryGroupPrincipal.java
index 4578f271df6..1d33ee3909a 100644
--- a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSidPrimaryGroupPrincipal.java
+++ b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSidPrimaryGroupPrincipal.java
@@ -26,15 +26,15 @@
package com.sun.security.auth;
/**
- * <p> This class extends <code>NTSid</code>
+ * This class extends {@code NTSid}
* and represents a Windows NT user's primary group SID.
*
- * <p> Principals such as this <code>NTSidPrimaryGroupPrincipal</code>
- * may be associated with a particular <code>Subject</code>
- * to augment that <code>Subject</code> with an additional
- * identity. Refer to the <code>Subject</code> class for more information
+ * <p> Principals such as this {@code NTSidPrimaryGroupPrincipal}
+ * may be associated with a particular {@code Subject}
+ * to augment that {@code Subject} with an additional
+ * identity. Refer to the {@code Subject} class for more information
* on how to achieve this. Authorization decisions can then be based upon
- * the Principals associated with a <code>Subject</code>.
+ * the Principals associated with a {@code Subject}.
*
* @see java.security.Principal
* @see javax.security.auth.Subject
@@ -45,15 +45,13 @@ public class NTSidPrimaryGroupPrincipal extends NTSid {
private static final long serialVersionUID = 8011978367305190527L;
/**
- * Create an <code>NTSidPrimaryGroupPrincipal</code> with a Windows NT
+ * Create an {@code NTSidPrimaryGroupPrincipal} with a Windows NT
* group SID.
*
- * <p>
+ * @param name the primary Windows NT group SID for this user.
*
- * @param name the primary Windows NT group SID for this user. <p>
- *
- * @exception NullPointerException if the <code>name</code>
- * is <code>null</code>.
+ * @exception NullPointerException if the {@code name}
+ * is {@code null}.
*/
public NTSidPrimaryGroupPrincipal(String name) {
super(name);
@@ -61,12 +59,10 @@ public class NTSidPrimaryGroupPrincipal extends NTSid {
/**
* Return a string representation of this
- * <code>NTSidPrimaryGroupPrincipal</code>.
- *
- * <p>
+ * {@code NTSidPrimaryGroupPrincipal}.
*
* @return a string representation of this
- * <code>NTSidPrimaryGroupPrincipal</code>.
+ * {@code NTSidPrimaryGroupPrincipal}.
*/
public String toString() {
java.text.MessageFormat form = new java.text.MessageFormat
@@ -79,18 +75,16 @@ public class NTSidPrimaryGroupPrincipal extends NTSid {
/**
* Compares the specified Object with this
- * <code>NTSidPrimaryGroupPrincipal</code>
+ * {@code NTSidPrimaryGroupPrincipal}
* for equality. Returns true if the given object is also a
- * <code>NTSidPrimaryGroupPrincipal</code> and the two
+ * {@code NTSidPrimaryGroupPrincipal} and the two
* NTSidPrimaryGroupPrincipals have the same SID.
*
- * <p>
- *
* @param o Object to be compared for equality with this
- * <code>NTSidPrimaryGroupPrincipal</code>.
+ * {@code NTSidPrimaryGroupPrincipal}.
*
* @return true if the specified Object is equal to this
- * <code>NTSidPrimaryGroupPrincipal</code>.
+ * {@code NTSidPrimaryGroupPrincipal}.
*/
public boolean equals(Object o) {
if (o == null)
diff --git a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSidUserPrincipal.java b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSidUserPrincipal.java
index 98b318d4f4a..c95d82a4d0a 100644
--- a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSidUserPrincipal.java
+++ b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSidUserPrincipal.java
@@ -26,15 +26,15 @@
package com.sun.security.auth;
/**
- * <p> This class extends <code>NTSid</code>
+ * This class extends {@code NTSid}
* and represents a Windows NT user's SID.
*
- * <p> Principals such as this <code>NTSidUserPrincipal</code>
- * may be associated with a particular <code>Subject</code>
- * to augment that <code>Subject</code> with an additional
- * identity. Refer to the <code>Subject</code> class for more information
+ * <p> Principals such as this {@code NTSidUserPrincipal}
+ * may be associated with a particular {@code Subject}
+ * to augment that {@code Subject} with an additional
+ * identity. Refer to the {@code Subject} class for more information
* on how to achieve this. Authorization decisions can then be based upon
- * the Principals associated with a <code>Subject</code>.
+ * the Principals associated with a {@code Subject}.
*
* @see java.security.Principal
* @see javax.security.auth.Subject
@@ -45,25 +45,21 @@ public class NTSidUserPrincipal extends NTSid {
private static final long serialVersionUID = -5573239889517749525L;
/**
- * Create an <code>NTSidUserPrincipal</code> with a Windows NT SID.
+ * Create an {@code NTSidUserPrincipal} with a Windows NT SID.
*
- * <p>
+ * @param name a string version of the Windows NT SID for this user.
*
- * @param name a string version of the Windows NT SID for this user.<p>
- *
- * @exception NullPointerException if the <code>name</code>
- * is <code>null</code>.
+ * @exception NullPointerException if the {@code name}
+ * is {@code null}.
*/
public NTSidUserPrincipal(String name) {
super(name);
}
/**
- * Return a string representation of this <code>NTSidUserPrincipal</code>.
- *
- * <p>
+ * Return a string representation of this {@code NTSidUserPrincipal}.
*
- * @return a string representation of this <code>NTSidUserPrincipal</code>.
+ * @return a string representation of this {@code NTSidUserPrincipal}.
*/
public String toString() {
java.text.MessageFormat form = new java.text.MessageFormat
@@ -75,18 +71,16 @@ public class NTSidUserPrincipal extends NTSid {
}
/**
- * Compares the specified Object with this <code>NTSidUserPrincipal</code>
+ * Compares the specified Object with this {@code NTSidUserPrincipal}
* for equality. Returns true if the given object is also a
- * <code>NTSidUserPrincipal</code> and the two NTSidUserPrincipals
+ * {@code NTSidUserPrincipal} and the two NTSidUserPrincipals
* have the same SID.
*
- * <p>
- *
* @param o Object to be compared for equality with this
- * <code>NTSidUserPrincipal</code>.
+ * {@code NTSidUserPrincipal}.
*
* @return true if the specified Object is equal to this
- * <code>NTSidUserPrincipal</code>.
+ * {@code NTSidUserPrincipal}.
*/
public boolean equals(Object o) {
if (o == null)
diff --git a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTUserPrincipal.java b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTUserPrincipal.java
index 55e88e17625..1005793f737 100644
--- a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTUserPrincipal.java
+++ b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/NTUserPrincipal.java
@@ -28,15 +28,15 @@ package com.sun.security.auth;
import java.security.Principal;
/**
- * <p> This class implements the <code>Principal</code> interface
+ * This class implements the {@code Principal} interface
* and represents a Windows NT user.
*
- * <p> Principals such as this <code>NTUserPrincipal</code>
- * may be associated with a particular <code>Subject</code>
- * to augment that <code>Subject</code> with an additional
- * identity. Refer to the <code>Subject</code> class for more information
+ * <p> Principals such as this {@code NTUserPrincipal}
+ * may be associated with a particular {@code Subject}
+ * to augment that {@code Subject} with an additional
+ * identity. Refer to the {@code Subject} class for more information
* on how to achieve this. Authorization decisions can then be based upon
- * the Principals associated with a <code>Subject</code>.
+ * the Principals associated with a {@code Subject}.
*
* @see java.security.Principal
* @see javax.security.auth.Subject
@@ -52,14 +52,12 @@ public class NTUserPrincipal implements Principal, java.io.Serializable {
private String name;
/**
- * Create an <code>NTUserPrincipal</code> with a Windows NT username.
+ * Create an {@code NTUserPrincipal} with a Windows NT username.
*
- * <p>
+ * @param name the Windows NT username for this user.
*
- * @param name the Windows NT username for this user. <p>
- *
- * @exception NullPointerException if the <code>name</code>
- * is <code>null</code>.
+ * @exception NullPointerException if the {@code name}
+ * is {@code null}.
*/
public NTUserPrincipal(String name) {
if (name == null) {
@@ -74,22 +72,18 @@ public class NTUserPrincipal implements Principal, java.io.Serializable {
}
/**
- * Return the Windows NT username for this <code>NTPrincipal</code>.
- *
- * <p>
+ * Return the Windows NT username for this {@code NTPrincipal}.
*
- * @return the Windows NT username for this <code>NTPrincipal</code>
+ * @return the Windows NT username for this {@code NTPrincipal}
*/
public String getName() {
return name;
}
/**
- * Return a string representation of this <code>NTPrincipal</code>.
- *
- * <p>
+ * Return a string representation of this {@code NTPrincipal}.
*
- * @return a string representation of this <code>NTPrincipal</code>.
+ * @return a string representation of this {@code NTPrincipal}.
*/
public String toString() {
java.text.MessageFormat form = new java.text.MessageFormat
@@ -101,18 +95,16 @@ public class NTUserPrincipal implements Principal, java.io.Serializable {
}
/**
- * Compares the specified Object with this <code>NTUserPrincipal</code>
+ * Compares the specified Object with this {@code NTUserPrincipal}
* for equality. Returns true if the given object is also a
- * <code>NTUserPrincipal</code> and the two NTUserPrincipals
+ * {@code NTUserPrincipal} and the two NTUserPrincipals
* have the same name.
*
- * <p>
- *
* @param o Object to be compared for equality with this
- * <code>NTPrincipal</code>.
+ * {@code NTPrincipal}.
*
* @return true if the specified Object is equal to this
- * <code>NTPrincipal</code>.
+ * {@code NTPrincipal}.
*/
public boolean equals(Object o) {
if (o == null)
@@ -131,11 +123,9 @@ public class NTUserPrincipal implements Principal, java.io.Serializable {
}
/**
- * Return a hash code for this <code>NTUserPrincipal</code>.
- *
- * <p>
+ * Return a hash code for this {@code NTUserPrincipal}.
*
- * @return a hash code for this <code>NTUserPrincipal</code>.
+ * @return a hash code for this {@code NTUserPrincipal}.
*/
public int hashCode() {
return this.getName().hashCode();
diff --git a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/PolicyFile.java b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/PolicyFile.java
index a6402eb68ee..e61e821eca0 100644
--- a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/PolicyFile.java
+++ b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/PolicyFile.java
@@ -31,25 +31,25 @@ import javax.security.auth.Subject;
/**
* This class represents a default implementation for
- * <code>javax.security.auth.Policy</code>.
+ * {@code javax.security.auth.Policy}.
*
* <p> This object stores the policy for entire Java runtime,
* and is the amalgamation of multiple static policy
* configurations that resides in files.
* The algorithm for locating the policy file(s) and reading their
- * information into this <code>Policy</code> object is:
+ * information into this {@code Policy} object is:
*
* <ol>
* <li>
* Loop through the security properties,
* <i>auth.policy.url.1</i>, <i>auth.policy.url.2</i>, ...,
* <i>auth.policy.url.X</i>".
- * Each property value specifies a <code>URL</code> pointing to a
+ * Each property value specifies a {@code URL} pointing to a
* policy file to be loaded. Read in and load each policy.
*
* <li>
- * The <code>java.lang.System</code> property <i>java.security.auth.policy</i>
- * may also be set to a <code>URL</code> pointing to another policy file
+ * The {@code java.lang.System} property <i>java.security.auth.policy</i>
+ * may also be set to a {@code URL} pointing to another policy file
* (which is the case when a user uses the -D switch at runtime).
* If this property is defined, and its use is allowed by the
* security property file (the Security property,
@@ -83,35 +83,35 @@ import javax.security.auth.Subject;
* doesn't matter and some are optional, as noted below).
* Italicized items represent variable values.
*
- * <p> A grant entry must begin with the word <code>grant</code>.
- * The <code>signedBy</code> and <code>codeBase</code>
+ * <p> A grant entry must begin with the word {@code grant}.
+ * The {@code signedBy} and {@code codeBase}
* name/value pairs are optional.
* If they are not present, then any signer (including unsigned code)
* will match, and any codeBase will match. Note that the
- * <code>principal</code> name/value pair is not optional.
- * This <code>Policy</code> implementation only permits
+ * {@code principal} name/value pair is not optional.
+ * This {@code Policy} implementation only permits
* Principal-based grant entries. Note that the <i>principalClass</i>
* may be set to the wildcard value, *, which allows it to match
- * any <code>Principal</code> class. In addition, the <i>principalName</i>
+ * any {@code Principal} class. In addition, the <i>principalName</i>
* may also be set to the wildcard value, *, allowing it to match
- * any <code>Principal</code> name. When setting the <i>principalName</i>
+ * any {@code Principal} name. When setting the <i>principalName</i>
* to the *, do not surround the * with quotes.
*
- * <p> A permission entry must begin with the word <code>permission</code>.
- * The word <code><i>Type</i></code> in the template above is
- * a specific permission type, such as <code>java.io.FilePermission</code>
- * or <code>java.lang.RuntimePermission</code>.
+ * <p> A permission entry must begin with the word {@code permission}.
+ * The word <i>{@code Type}</i> in the template above is
+ * a specific permission type, such as {@code java.io.FilePermission}
+ * or {@code java.lang.RuntimePermission}.
*
* <p> The "<i>action</i>" is required for
- * many permission types, such as <code>java.io.FilePermission</code>
+ * many permission types, such as {@code java.io.FilePermission}
* (where it specifies what type of file access that is permitted).
* It is not required for categories such as
- * <code>java.lang.RuntimePermission</code>
+ * {@code java.lang.RuntimePermission}
* where it is not necessary - you either have the
- * permission specified by the <code>"<i>name</i>"</code>
+ * permission specified by the "<i>{@code name}</i>"
* value following the type name or you don't.
*
- * <p> The <code>signedBy</code> name/value pair for a permission entry
+ * <p> The {@code signedBy} name/value pair for a permission entry
* is optional. If present, it indicates a signed permission. That is,
* the permission class itself must be signed by the given alias in
* order for it to be granted. For example,
@@ -124,18 +124,18 @@ import javax.security.auth.Subject;
* </pre>
*
* <p> Then this permission of type <i>Foo</i> is granted if the
- * <code>Foo.class</code> permission has been signed by the
- * "FooSoft" alias, or if <code>Foo.class</code> is a
+ * {@code Foo.class} permission has been signed by the
+ * "FooSoft" alias, or if {@code Foo.class} is a
* system class (i.e., is found on the CLASSPATH).
*
* <p> Items that appear in an entry must appear in the specified order
- * (<code>permission</code>, <i>Type</i>, "<i>name</i>", and
+ * ({@code permission}, <i>Type</i>, "<i>name</i>", and
* "<i>action</i>"). An entry is terminated with a semicolon.
*
- * <p> Case is unimportant for the identifiers (<code>permission</code>,
- * <code>signedBy</code>, <code>codeBase</code>, etc.) but is
+ * <p> Case is unimportant for the identifiers ({@code permission},
+ * {@code signedBy}, {@code codeBase}, etc.) but is
* significant for the <i>Type</i>
- * or for any string that is passed in as a value. <p>
+ * or for any string that is passed in as a value.
*
* <p> An example of two entries in a policy configuration file is
* <pre>
@@ -153,15 +153,15 @@ import javax.security.auth.Subject;
* permission java.util.PropertyPermission "java.vendor";
* </pre>
*
- * <p> This <code>Policy</code> implementation supports
+ * <p> This {@code Policy} implementation supports
* special handling for PrivateCredentialPermissions.
* If a grant entry is configured with a
- * <code>PrivateCredentialPermission</code>,
+ * {@code PrivateCredentialPermission},
* and the "Principal Class/Principal Name" for that
- * <code>PrivateCredentialPermission</code> is "self",
- * then the entry grants the specified <code>Subject</code> permission to
+ * {@code PrivateCredentialPermission} is "self",
+ * then the entry grants the specified {@code Subject} permission to
* access its own private Credential. For example,
- * the following grants the <code>Subject</code> "Duke"
+ * the following grants the {@code Subject} "Duke"
* access to its own a.b.Credential.
*
* <pre>
@@ -172,7 +172,7 @@ import javax.security.auth.Subject;
* };
* </pre>
*
- * The following grants the <code>Subject</code> "Duke"
+ * The following grants the {@code Subject} "Duke"
* access to all of its own private Credentials:
*
* <pre>
@@ -184,7 +184,7 @@ import javax.security.auth.Subject;
* </pre>
*
* The following grants all Subjects authenticated as a
- * <code>SolarisPrincipal</code> (regardless of their respective names)
+ * {@code SolarisPrincipal} (regardless of their respective names)
* permission to access their own private Credentials:
*
* <pre>
@@ -207,7 +207,7 @@ import javax.security.auth.Subject;
* </pre>
* @deprecated As of JDK&nbsp;1.4, replaced by
- * <code>sun.security.provider.PolicyFile</code>.
+ * {@code sun.security.provider.PolicyFile}.
* This class is entirely deprecated.
*
* @see java.security.CodeSource
@@ -232,10 +232,8 @@ public class PolicyFile extends javax.security.auth.Policy {
/**
* Refreshes the policy object by re-reading all the policy files.
*
- * <p>
- *
* @exception SecurityException if the caller doesn't have permission
- * to refresh the <code>Policy</code>.
+ * to refresh the {@code Policy}.
*/
@Override
public void refresh() {
@@ -243,59 +241,56 @@ public class PolicyFile extends javax.security.auth.Policy {
}
/**
- * Examines this <code>Policy</code> and returns the Permissions granted
- * to the specified <code>Subject</code> and <code>CodeSource</code>.
+ * Examines this {@code Policy} and returns the Permissions granted
+ * to the specified {@code Subject} and {@code CodeSource}.
*
* <p> Permissions for a particular <i>grant</i> entry are returned
- * if the <code>CodeSource</code> constructed using the codebase and
- * signedby values specified in the entry <code>implies</code>
- * the <code>CodeSource</code> provided to this method, and if the
- * <code>Subject</code> provided to this method contains all of the
+ * if the {@code CodeSource} constructed using the codebase and
+ * signedby values specified in the entry {@code implies}
+ * the {@code CodeSource} provided to this method, and if the
+ * {@code Subject} provided to this method contains all of the
* Principals specified in the entry.
*
- * <p> The <code>Subject</code> provided to this method contains all
+ * <p> The {@code Subject} provided to this method contains all
* of the Principals specified in the entry if, for each
- * <code>Principal</code>, "P1", specified in the <i>grant</i> entry
+ * {@code Principal}, "P1", specified in the <i>grant</i> entry
* one of the following two conditions is met:
*
- * <p>
* <ol>
- * <li> the <code>Subject</code> has a
- * <code>Principal</code>, "P2", where
- * <code>P2.getClass().getName()</code> equals the
+ * <li> the {@code Subject} has a
+ * {@code Principal}, "P2", where
+ * {@code P2.getClass().getName()} equals the
* P1's class name, and where
- * <code>P2.getName()</code> equals the P1's name.
+ * {@code P2.getName()} equals the P1's name.
*
* <li> P1 implements
- * <code>com.sun.security.auth.PrincipalComparator</code>,
- * and <code>P1.implies</code> the provided <code>Subject</code>.
+ * {@code com.sun.security.auth.PrincipalComparator},
+ * and {@code P1.implies} the provided {@code Subject}.
* </ol>
*
- * <p> Note that this <code>Policy</code> implementation has
+ * <p> Note that this {@code Policy} implementation has
* special handling for PrivateCredentialPermissions.
- * When this method encounters a <code>PrivateCredentialPermission</code>
- * which specifies "self" as the <code>Principal</code> class and name,
- * it does not add that <code>Permission</code> to the returned
- * <code>PermissionCollection</code>. Instead, it builds
- * a new <code>PrivateCredentialPermission</code>
- * for each <code>Principal</code> associated with the provided
- * <code>Subject</code>. Each new <code>PrivateCredentialPermission</code>
+ * When this method encounters a {@code PrivateCredentialPermission}
+ * which specifies "self" as the {@code Principal} class and name,
+ * it does not add that {@code Permission} to the returned
+ * {@code PermissionCollection}. Instead, it builds
+ * a new {@code PrivateCredentialPermission}
+ * for each {@code Principal} associated with the provided
+ * {@code Subject}. Each new {@code PrivateCredentialPermission}
* contains the same Credential class as specified in the
* originally granted permission, as well as the Class and name
- * for the respective <code>Principal</code>.
- *
- * <p>
+ * for the respective {@code Principal}.
*
- * @param subject the Permissions granted to this <code>Subject</code>
- * and the additionally provided <code>CodeSource</code>
- * are returned. <p>
+ * @param subject the Permissions granted to this {@code Subject}
+ * and the additionally provided {@code CodeSource}
+ * are returned.
*
- * @param codesource the Permissions granted to this <code>CodeSource</code>
- * and the additionally provided <code>Subject</code>
+ * @param codesource the Permissions granted to this {@code CodeSource}
+ * and the additionally provided {@code Subject}
* are returned.
*
- * @return the Permissions granted to the provided <code>Subject</code>
- * <code>CodeSource</code>.
+ * @return the Permissions granted to the provided {@code Subject}
+ * {@code CodeSource}.
*/
@Override
public PermissionCollection getPermissions(final Subject subject,
diff --git a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/PrincipalComparator.java b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/PrincipalComparator.java
index 8d8e12424a5..bb0aab1f2f2 100644
--- a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/PrincipalComparator.java
+++ b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/PrincipalComparator.java
@@ -26,25 +26,25 @@
package com.sun.security.auth;
/**
- * An object that implements the <code>java.security.Principal</code>
+ * An object that implements the {@code java.security.Principal}
* interface typically also implements this interface to provide
- * a means for comparing that object to a specified <code>Subject</code>.
+ * a means for comparing that object to a specified {@code Subject}.
*
- * <p> The comparison is achieved via the <code>implies</code> method.
- * The implementation of the <code>implies</code> method determines
- * whether this object "implies" the specified <code>Subject</code>.
+ * <p> The comparison is achieved via the {@code implies} method.
+ * The implementation of the {@code implies} method determines
+ * whether this object "implies" the specified {@code Subject}.
* One example application of this method may be for
- * a "group" object to imply a particular <code>Subject</code>
- * if that <code>Subject</code> belongs to the group.
+ * a "group" object to imply a particular {@code Subject}
+ * if that {@code Subject} belongs to the group.
* Another example application of this method would be for
- * "role" object to imply a particular <code>Subject</code>
- * if that <code>Subject</code> is currently acting in that role.
+ * "role" object to imply a particular {@code Subject}
+ * if that {@code Subject} is currently acting in that role.
*
* <p> Although classes that implement this interface typically
- * also implement the <code>java.security.Principal</code> interface,
+ * also implement the {@code java.security.Principal} interface,
* it is not required. In other words, classes may implement the
- * <code>java.security.Principal</code> interface by itself,
- * the <code>PrincipalComparator</code> interface by itself,
+ * {@code java.security.Principal} interface by itself,
+ * the {@code PrincipalComparator} interface by itself,
* or both at the same time.
*
* @see java.security.Principal
@@ -53,12 +53,10 @@ package com.sun.security.auth;
@jdk.Exported
public interface PrincipalComparator {
/**
- * Check if the specified <code>Subject</code> is implied by
+ * Check if the specified {@code Subject} is implied by
* this object.
*
- * <p>
- *
- * @return true if the specified <code>Subject</code> is implied by
+ * @return true if the specified {@code Subject} is implied by
* this object, or false otherwise.
*/
boolean implies(javax.security.auth.Subject subject);
diff --git a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/SolarisNumericGroupPrincipal.java b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/SolarisNumericGroupPrincipal.java
index 27e77307703..377e6165fcd 100644
--- a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/SolarisNumericGroupPrincipal.java
+++ b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/SolarisNumericGroupPrincipal.java
@@ -28,15 +28,15 @@ package com.sun.security.auth;
import java.security.Principal;
/**
- * <p> This class implements the <code>Principal</code> interface
+ * This class implements the {@code Principal} interface
* and represents a user's Solaris group identification number (GID).
*
- * <p> Principals such as this <code>SolarisNumericGroupPrincipal</code>
- * may be associated with a particular <code>Subject</code>
- * to augment that <code>Subject</code> with an additional
- * identity. Refer to the <code>Subject</code> class for more information
+ * <p> Principals such as this {@code SolarisNumericGroupPrincipal}
+ * may be associated with a particular {@code Subject}
+ * to augment that {@code Subject} with an additional
+ * identity. Refer to the {@code Subject} class for more information
* on how to achieve this. Authorization decisions can then be based upon
- * the Principals associated with a <code>Subject</code>.
+ * the Principals associated with a {@code Subject}.
* @deprecated As of JDK&nbsp;1.4, replaced by
* {@link UnixNumericGroupPrincipal}.
@@ -73,20 +73,18 @@ public class SolarisNumericGroupPrincipal implements
private boolean primaryGroup;
/**
- * Create a <code>SolarisNumericGroupPrincipal</code> using a
- * <code>String</code> representation of the user's
+ * Create a {@code SolarisNumericGroupPrincipal} using a
+ * {@code String} representation of the user's
* group identification number (GID).
*
- * <p>
- *
* @param name the user's group identification number (GID)
- * for this user. <p>
+ * for this user.
*
* @param primaryGroup true if the specified GID represents the
* primary group to which this user belongs.
*
- * @exception NullPointerException if the <code>name</code>
- * is <code>null</code>.
+ * @exception NullPointerException if the {@code name}
+ * is {@code null}.
*/
public SolarisNumericGroupPrincipal(String name, boolean primaryGroup) {
if (name == null)
@@ -97,13 +95,11 @@ public class SolarisNumericGroupPrincipal implements
}
/**
- * Create a <code>SolarisNumericGroupPrincipal</code> using a
+ * Create a {@code SolarisNumericGroupPrincipal} using a
* long representation of the user's group identification number (GID).
*
- * <p>
- *
* @param name the user's group identification number (GID) for this user
- * represented as a long. <p>
+ * represented as a long.
*
* @param primaryGroup true if the specified GID represents the
* primary group to which this user belongs.
@@ -116,12 +112,10 @@ public class SolarisNumericGroupPrincipal implements
/**
* Return the user's group identification number (GID) for this
- * <code>SolarisNumericGroupPrincipal</code>.
- *
- * <p>
+ * {@code SolarisNumericGroupPrincipal}.
*
* @return the user's group identification number (GID) for this
- * <code>SolarisNumericGroupPrincipal</code>
+ * {@code SolarisNumericGroupPrincipal}
*/
public String getName() {
return name;
@@ -129,12 +123,10 @@ public class SolarisNumericGroupPrincipal implements
/**
* Return the user's group identification number (GID) for this
- * <code>SolarisNumericGroupPrincipal</code> as a long.
- *
- * <p>
+ * {@code SolarisNumericGroupPrincipal} as a long.
*
* @return the user's group identification number (GID) for this
- * <code>SolarisNumericGroupPrincipal</code> as a long.
+ * {@code SolarisNumericGroupPrincipal} as a long.
*/
public long longValue() {
return Long.parseLong(name);
@@ -144,8 +136,6 @@ public class SolarisNumericGroupPrincipal implements
* Return whether this group identification number (GID) represents
* the primary group to which this user belongs.
*
- * <p>
- *
* @return true if this group identification number (GID) represents
* the primary group to which this user belongs,
* or false otherwise.
@@ -156,12 +146,10 @@ public class SolarisNumericGroupPrincipal implements
/**
* Return a string representation of this
- * <code>SolarisNumericGroupPrincipal</code>.
- *
- * <p>
+ * {@code SolarisNumericGroupPrincipal}.
*
* @return a string representation of this
- * <code>SolarisNumericGroupPrincipal</code>.
+ * {@code SolarisNumericGroupPrincipal}.
*/
public String toString() {
return((primaryGroup ?
@@ -173,19 +161,17 @@ public class SolarisNumericGroupPrincipal implements
/**
* Compares the specified Object with this
- * <code>SolarisNumericGroupPrincipal</code>
+ * {@code SolarisNumericGroupPrincipal}
* for equality. Returns true if the given object is also a
- * <code>SolarisNumericGroupPrincipal</code> and the two
+ * {@code SolarisNumericGroupPrincipal} and the two
* SolarisNumericGroupPrincipals
* have the same group identification number (GID).
*
- * <p>
- *
* @param o Object to be compared for equality with this
- * <code>SolarisNumericGroupPrincipal</code>.
+ * {@code SolarisNumericGroupPrincipal}.
*
* @return true if the specified Object is equal to this
- * <code>SolarisNumericGroupPrincipal</code>.
+ * {@code SolarisNumericGroupPrincipal}.
*/
public boolean equals(Object o) {
if (o == null)
@@ -205,11 +191,9 @@ public class SolarisNumericGroupPrincipal implements
}
/**
- * Return a hash code for this <code>SolarisNumericGroupPrincipal</code>.
- *
- * <p>
+ * Return a hash code for this {@code SolarisNumericGroupPrincipal}.
*
- * @return a hash code for this <code>SolarisNumericGroupPrincipal</code>.
+ * @return a hash code for this {@code SolarisNumericGroupPrincipal}.
*/
public int hashCode() {
return toString().hashCode();
diff --git a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/SolarisNumericUserPrincipal.java b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/SolarisNumericUserPrincipal.java
index 0369a7830f6..5497856f28a 100644
--- a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/SolarisNumericUserPrincipal.java
+++ b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/SolarisNumericUserPrincipal.java
@@ -28,15 +28,15 @@ package com.sun.security.auth;
import java.security.Principal;
/**
- * <p> This class implements the <code>Principal</code> interface
+ * This class implements the {@code Principal} interface
* and represents a user's Solaris identification number (UID).
*
- * <p> Principals such as this <code>SolarisNumericUserPrincipal</code>
- * may be associated with a particular <code>Subject</code>
- * to augment that <code>Subject</code> with an additional
- * identity. Refer to the <code>Subject</code> class for more information
+ * <p> Principals such as this {@code SolarisNumericUserPrincipal}
+ * may be associated with a particular {@code Subject}
+ * to augment that {@code Subject} with an additional
+ * identity. Refer to the {@code Subject} class for more information
* on how to achieve this. Authorization decisions can then be based upon
- * the Principals associated with a <code>Subject</code>.
+ * the Principals associated with a {@code Subject}.
* @deprecated As of JDK&nbsp;1.4, replaced by
* {@link UnixNumericUserPrincipal}.
* This class is entirely deprecated.
@@ -68,16 +68,14 @@ public class SolarisNumericUserPrincipal implements
private String name;
/**
- * Create a <code>SolarisNumericUserPrincipal</code> using a
- * <code>String</code> representation of the
+ * Create a {@code SolarisNumericUserPrincipal} using a
+ * {@code String} representation of the
* user's identification number (UID).
*
- * <p>
- *
* @param name the user identification number (UID) for this user.
*
- * @exception NullPointerException if the <code>name</code>
- * is <code>null</code>.
+ * @exception NullPointerException if the {@code name}
+ * is {@code null}.
*/
public SolarisNumericUserPrincipal(String name) {
if (name == null)
@@ -87,11 +85,9 @@ public class SolarisNumericUserPrincipal implements
}
/**
- * Create a <code>SolarisNumericUserPrincipal</code> using a
+ * Create a {@code SolarisNumericUserPrincipal} using a
* long representation of the user's identification number (UID).
*
- * <p>
- *
* @param name the user identification number (UID) for this user
* represented as a long.
*/
@@ -101,12 +97,10 @@ public class SolarisNumericUserPrincipal implements
/**
* Return the user identification number (UID) for this
- * <code>SolarisNumericUserPrincipal</code>.
- *
- * <p>
+ * {@code SolarisNumericUserPrincipal}.
*
* @return the user identification number (UID) for this
- * <code>SolarisNumericUserPrincipal</code>
+ * {@code SolarisNumericUserPrincipal}
*/
public String getName() {
return name;
@@ -114,12 +108,10 @@ public class SolarisNumericUserPrincipal implements
/**
* Return the user identification number (UID) for this
- * <code>SolarisNumericUserPrincipal</code> as a long.
- *
- * <p>
+ * {@code SolarisNumericUserPrincipal} as a long.
*
* @return the user identification number (UID) for this
- * <code>SolarisNumericUserPrincipal</code> as a long.
+ * {@code SolarisNumericUserPrincipal} as a long.
*/
public long longValue() {
return Long.parseLong(name);
@@ -127,12 +119,10 @@ public class SolarisNumericUserPrincipal implements
/**
* Return a string representation of this
- * <code>SolarisNumericUserPrincipal</code>.
- *
- * <p>
+ * {@code SolarisNumericUserPrincipal}.
*
* @return a string representation of this
- * <code>SolarisNumericUserPrincipal</code>.
+ * {@code SolarisNumericUserPrincipal}.
*/
public String toString() {
return(rb.getString("SolarisNumericUserPrincipal.") + name);
@@ -140,19 +130,17 @@ public class SolarisNumericUserPrincipal implements
/**
* Compares the specified Object with this
- * <code>SolarisNumericUserPrincipal</code>
+ * {@code SolarisNumericUserPrincipal}
* for equality. Returns true if the given object is also a
- * <code>SolarisNumericUserPrincipal</code> and the two
+ * {@code SolarisNumericUserPrincipal} and the two
* SolarisNumericUserPrincipals
* have the same user identification number (UID).
*
- * <p>
- *
* @param o Object to be compared for equality with this
- * <code>SolarisNumericUserPrincipal</code>.
+ * {@code SolarisNumericUserPrincipal}.
*
* @return true if the specified Object is equal to this
- * <code>SolarisNumericUserPrincipal</code>.
+ * {@code SolarisNumericUserPrincipal}.
*/
public boolean equals(Object o) {
if (o == null)
@@ -167,15 +155,14 @@ public class SolarisNumericUserPrincipal implements
if (this.getName().equals(that.getName()))
return true;
- return false;
+
+ return false;
}
/**
- * Return a hash code for this <code>SolarisNumericUserPrincipal</code>.
- *
- * <p>
+ * Return a hash code for this {@code SolarisNumericUserPrincipal}.
*
- * @return a hash code for this <code>SolarisNumericUserPrincipal</code>.
+ * @return a hash code for this {@code SolarisNumericUserPrincipal}.
*/
public int hashCode() {
return name.hashCode();
diff --git a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/SolarisPrincipal.java b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/SolarisPrincipal.java
index 6fd78fa5cb1..4aef765e813 100644
--- a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/SolarisPrincipal.java
+++ b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/SolarisPrincipal.java
@@ -28,15 +28,15 @@ package com.sun.security.auth;
import java.security.Principal;
/**
- * <p> This class implements the <code>Principal</code> interface
+ * This class implements the {@code Principal} interface
* and represents a Solaris user.
*
- * <p> Principals such as this <code>SolarisPrincipal</code>
- * may be associated with a particular <code>Subject</code>
- * to augment that <code>Subject</code> with an additional
- * identity. Refer to the <code>Subject</code> class for more information
+ * <p> Principals such as this {@code SolarisPrincipal}
+ * may be associated with a particular {@code Subject}
+ * to augment that {@code Subject} with an additional
+ * identity. Refer to the {@code Subject} class for more information
* on how to achieve this. Authorization decisions can then be based upon
- * the Principals associated with a <code>Subject</code>.
+ * the Principals associated with a {@code Subject}.
*
* @deprecated As of JDK&nbsp;1.4, replaced by
* {@link UnixPrincipal}.
@@ -68,12 +68,10 @@ public class SolarisPrincipal implements Principal, java.io.Serializable {
/**
* Create a SolarisPrincipal with a Solaris username.
*
- * <p>
- *
* @param name the Unix username for this user.
*
- * @exception NullPointerException if the <code>name</code>
- * is <code>null</code>.
+ * @exception NullPointerException if the {@code name}
+ * is {@code null}.
*/
public SolarisPrincipal(String name) {
if (name == null)
@@ -83,40 +81,34 @@ public class SolarisPrincipal implements Principal, java.io.Serializable {
}
/**
- * Return the Unix username for this <code>SolarisPrincipal</code>.
- *
- * <p>
+ * Return the Unix username for this {@code SolarisPrincipal}.
*
- * @return the Unix username for this <code>SolarisPrincipal</code>
+ * @return the Unix username for this {@code SolarisPrincipal}
*/
public String getName() {
return name;
}
/**
- * Return a string representation of this <code>SolarisPrincipal</code>.
- *
- * <p>
+ * Return a string representation of this {@code SolarisPrincipal}.
*
- * @return a string representation of this <code>SolarisPrincipal</code>.
+ * @return a string representation of this {@code SolarisPrincipal}.
*/
public String toString() {
return(rb.getString("SolarisPrincipal.") + name);
}
/**
- * Compares the specified Object with this <code>SolarisPrincipal</code>
+ * Compares the specified Object with this {@code SolarisPrincipal}
* for equality. Returns true if the given object is also a
- * <code>SolarisPrincipal</code> and the two SolarisPrincipals
+ * {@code SolarisPrincipal} and the two SolarisPrincipals
* have the same username.
*
- * <p>
- *
* @param o Object to be compared for equality with this
- * <code>SolarisPrincipal</code>.
+ * {@code SolarisPrincipal}.
*
* @return true if the specified Object is equal to this
- * <code>SolarisPrincipal</code>.
+ * {@code SolarisPrincipal}.
*/
public boolean equals(Object o) {
if (o == null)
@@ -135,11 +127,9 @@ public class SolarisPrincipal implements Principal, java.io.Serializable {
}
/**
- * Return a hash code for this <code>SolarisPrincipal</code>.
- *
- * <p>
+ * Return a hash code for this {@code SolarisPrincipal}.
*
- * @return a hash code for this <code>SolarisPrincipal</code>.
+ * @return a hash code for this {@code SolarisPrincipal}.
*/
public int hashCode() {
return name.hashCode();
diff --git a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/UnixNumericGroupPrincipal.java b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/UnixNumericGroupPrincipal.java
index 5edb8d2a4ec..4a96480db01 100644
--- a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/UnixNumericGroupPrincipal.java
+++ b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/UnixNumericGroupPrincipal.java
@@ -28,15 +28,15 @@ package com.sun.security.auth;
import java.security.Principal;
/**
- * <p> This class implements the <code>Principal</code> interface
+ * This class implements the {@code Principal} interface
* and represents a user's Unix group identification number (GID).
*
- * <p> Principals such as this <code>UnixNumericGroupPrincipal</code>
- * may be associated with a particular <code>Subject</code>
- * to augment that <code>Subject</code> with an additional
- * identity. Refer to the <code>Subject</code> class for more information
+ * <p> Principals such as this {@code UnixNumericGroupPrincipal}
+ * may be associated with a particular {@code Subject}
+ * to augment that {@code Subject} with an additional
+ * identity. Refer to the {@code Subject} class for more information
* on how to achieve this. Authorization decisions can then be based upon
- * the Principals associated with a <code>Subject</code>.
+ * the Principals associated with a {@code Subject}.
*
* @see java.security.Principal
* @see javax.security.auth.Subject
@@ -59,20 +59,18 @@ public class UnixNumericGroupPrincipal implements
private boolean primaryGroup;
/**
- * Create a <code>UnixNumericGroupPrincipal</code> using a
- * <code>String</code> representation of the user's
+ * Create a {@code UnixNumericGroupPrincipal} using a
+ * {@code String} representation of the user's
* group identification number (GID).
*
- * <p>
- *
* @param name the user's group identification number (GID)
- * for this user. <p>
+ * for this user.
*
* @param primaryGroup true if the specified GID represents the
* primary group to which this user belongs.
*
- * @exception NullPointerException if the <code>name</code>
- * is <code>null</code>.
+ * @exception NullPointerException if the {@code name}
+ * is {@code null}.
*/
public UnixNumericGroupPrincipal(String name, boolean primaryGroup) {
if (name == null) {
@@ -89,13 +87,11 @@ public class UnixNumericGroupPrincipal implements
}
/**
- * Create a <code>UnixNumericGroupPrincipal</code> using a
+ * Create a {@code UnixNumericGroupPrincipal} using a
* long representation of the user's group identification number (GID).
*
- * <p>
- *
* @param name the user's group identification number (GID) for this user
- * represented as a long. <p>
+ * represented as a long.
*
* @param primaryGroup true if the specified GID represents the
* primary group to which this user belongs.
@@ -108,12 +104,10 @@ public class UnixNumericGroupPrincipal implements
/**
* Return the user's group identification number (GID) for this
- * <code>UnixNumericGroupPrincipal</code>.
- *
- * <p>
+ * {@code UnixNumericGroupPrincipal}.
*
* @return the user's group identification number (GID) for this
- * <code>UnixNumericGroupPrincipal</code>
+ * {@code UnixNumericGroupPrincipal}
*/
public String getName() {
return name;
@@ -121,12 +115,10 @@ public class UnixNumericGroupPrincipal implements
/**
* Return the user's group identification number (GID) for this
- * <code>UnixNumericGroupPrincipal</code> as a long.
- *
- * <p>
+ * {@code UnixNumericGroupPrincipal} as a long.
*
* @return the user's group identification number (GID) for this
- * <code>UnixNumericGroupPrincipal</code> as a long.
+ * {@code UnixNumericGroupPrincipal} as a long.
*/
public long longValue() {
return Long.parseLong(name);
@@ -136,8 +128,6 @@ public class UnixNumericGroupPrincipal implements
* Return whether this group identification number (GID) represents
* the primary group to which this user belongs.
*
- * <p>
- *
* @return true if this group identification number (GID) represents
* the primary group to which this user belongs,
* or false otherwise.
@@ -148,12 +138,10 @@ public class UnixNumericGroupPrincipal implements
/**
* Return a string representation of this
- * <code>UnixNumericGroupPrincipal</code>.
- *
- * <p>
+ * {@code UnixNumericGroupPrincipal}.
*
* @return a string representation of this
- * <code>UnixNumericGroupPrincipal</code>.
+ * {@code UnixNumericGroupPrincipal}.
*/
public String toString() {
@@ -176,19 +164,17 @@ public class UnixNumericGroupPrincipal implements
/**
* Compares the specified Object with this
- * <code>UnixNumericGroupPrincipal</code>
+ * {@code UnixNumericGroupPrincipal}
* for equality. Returns true if the given object is also a
- * <code>UnixNumericGroupPrincipal</code> and the two
+ * {@code UnixNumericGroupPrincipal} and the two
* UnixNumericGroupPrincipals
* have the same group identification number (GID).
*
- * <p>
- *
* @param o Object to be compared for equality with this
- * <code>UnixNumericGroupPrincipal</code>.
+ * {@code UnixNumericGroupPrincipal}.
*
* @return true if the specified Object is equal to this
- * <code>UnixNumericGroupPrincipal</code>.
+ * {@code UnixNumericGroupPrincipal}.
*/
public boolean equals(Object o) {
if (o == null)
@@ -208,11 +194,9 @@ public class UnixNumericGroupPrincipal implements
}
/**
- * Return a hash code for this <code>UnixNumericGroupPrincipal</code>.
- *
- * <p>
+ * Return a hash code for this {@code UnixNumericGroupPrincipal}.
*
- * @return a hash code for this <code>UnixNumericGroupPrincipal</code>.
+ * @return a hash code for this {@code UnixNumericGroupPrincipal}.
*/
public int hashCode() {
return toString().hashCode();
diff --git a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/UnixNumericUserPrincipal.java b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/UnixNumericUserPrincipal.java
index bb45c642459..cb252a8966e 100644
--- a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/UnixNumericUserPrincipal.java
+++ b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/UnixNumericUserPrincipal.java
@@ -28,15 +28,15 @@ package com.sun.security.auth;
import java.security.Principal;
/**
- * <p> This class implements the <code>Principal</code> interface
+ * This class implements the {@code Principal} interface
* and represents a user's Unix identification number (UID).
*
- * <p> Principals such as this <code>UnixNumericUserPrincipal</code>
- * may be associated with a particular <code>Subject</code>
- * to augment that <code>Subject</code> with an additional
- * identity. Refer to the <code>Subject</code> class for more information
+ * <p> Principals such as this {@code UnixNumericUserPrincipal}
+ * may be associated with a particular {@code Subject}
+ * to augment that {@code Subject} with an additional
+ * identity. Refer to the {@code Subject} class for more information
* on how to achieve this. Authorization decisions can then be based upon
- * the Principals associated with a <code>Subject</code>.
+ * the Principals associated with a {@code Subject}.
*
* @see java.security.Principal
* @see javax.security.auth.Subject
@@ -53,16 +53,14 @@ public class UnixNumericUserPrincipal implements
private String name;
/**
- * Create a <code>UnixNumericUserPrincipal</code> using a
- * <code>String</code> representation of the
+ * Create a {@code UnixNumericUserPrincipal} using a
+ * {@code String} representation of the
* user's identification number (UID).
*
- * <p>
- *
* @param name the user identification number (UID) for this user.
*
- * @exception NullPointerException if the <code>name</code>
- * is <code>null</code>.
+ * @exception NullPointerException if the {@code name}
+ * is {@code null}.
*/
public UnixNumericUserPrincipal(String name) {
if (name == null) {
@@ -78,11 +76,9 @@ public class UnixNumericUserPrincipal implements
}
/**
- * Create a <code>UnixNumericUserPrincipal</code> using a
+ * Create a {@code UnixNumericUserPrincipal} using a
* long representation of the user's identification number (UID).
*
- * <p>
- *
* @param name the user identification number (UID) for this user
* represented as a long.
*/
@@ -92,12 +88,10 @@ public class UnixNumericUserPrincipal implements
/**
* Return the user identification number (UID) for this
- * <code>UnixNumericUserPrincipal</code>.
- *
- * <p>
+ * {@code UnixNumericUserPrincipal}.
*
* @return the user identification number (UID) for this
- * <code>UnixNumericUserPrincipal</code>
+ * {@code UnixNumericUserPrincipal}
*/
public String getName() {
return name;
@@ -105,12 +99,10 @@ public class UnixNumericUserPrincipal implements
/**
* Return the user identification number (UID) for this
- * <code>UnixNumericUserPrincipal</code> as a long.
- *
- * <p>
+ * {@code UnixNumericUserPrincipal} as a long.
*
* @return the user identification number (UID) for this
- * <code>UnixNumericUserPrincipal</code> as a long.
+ * {@code UnixNumericUserPrincipal} as a long.
*/
public long longValue() {
return Long.parseLong(name);
@@ -118,12 +110,10 @@ public class UnixNumericUserPrincipal implements
/**
* Return a string representation of this
- * <code>UnixNumericUserPrincipal</code>.
- *
- * <p>
+ * {@code UnixNumericUserPrincipal}.
*
* @return a string representation of this
- * <code>UnixNumericUserPrincipal</code>.
+ * {@code UnixNumericUserPrincipal}.
*/
public String toString() {
java.text.MessageFormat form = new java.text.MessageFormat
@@ -136,19 +126,17 @@ public class UnixNumericUserPrincipal implements
/**
* Compares the specified Object with this
- * <code>UnixNumericUserPrincipal</code>
+ * {@code UnixNumericUserPrincipal}
* for equality. Returns true if the given object is also a
- * <code>UnixNumericUserPrincipal</code> and the two
+ * {@code UnixNumericUserPrincipal} and the two
* UnixNumericUserPrincipals
* have the same user identification number (UID).
*
- * <p>
- *
* @param o Object to be compared for equality with this
- * <code>UnixNumericUserPrincipal</code>.
+ * {@code UnixNumericUserPrincipal}.
*
* @return true if the specified Object is equal to this
- * <code>UnixNumericUserPrincipal</code>.
+ * {@code UnixNumericUserPrincipal}.
*/
public boolean equals(Object o) {
if (o == null)
@@ -167,11 +155,9 @@ public class UnixNumericUserPrincipal implements
}
/**
- * Return a hash code for this <code>UnixNumericUserPrincipal</code>.
- *
- * <p>
+ * Return a hash code for this {@code UnixNumericUserPrincipal}.
*
- * @return a hash code for this <code>UnixNumericUserPrincipal</code>.
+ * @return a hash code for this {@code UnixNumericUserPrincipal}.
*/
public int hashCode() {
return name.hashCode();
diff --git a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/UnixPrincipal.java b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/UnixPrincipal.java
index 140bd8ffcd8..9694bc7a443 100644
--- a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/UnixPrincipal.java
+++ b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/UnixPrincipal.java
@@ -28,15 +28,15 @@ package com.sun.security.auth;
import java.security.Principal;
/**
- * <p> This class implements the <code>Principal</code> interface
+ * This class implements the {@code Principal} interface
* and represents a Unix user.
*
- * <p> Principals such as this <code>UnixPrincipal</code>
- * may be associated with a particular <code>Subject</code>
- * to augment that <code>Subject</code> with an additional
- * identity. Refer to the <code>Subject</code> class for more information
+ * <p> Principals such as this {@code UnixPrincipal}
+ * may be associated with a particular {@code Subject}
+ * to augment that {@code Subject} with an additional
+ * identity. Refer to the {@code Subject} class for more information
* on how to achieve this. Authorization decisions can then be based upon
- * the Principals associated with a <code>Subject</code>.
+ * the Principals associated with a {@code Subject}.
*
* @see java.security.Principal
* @see javax.security.auth.Subject
@@ -54,12 +54,10 @@ public class UnixPrincipal implements Principal, java.io.Serializable {
/**
* Create a UnixPrincipal with a Unix username.
*
- * <p>
- *
* @param name the Unix username for this user.
*
- * @exception NullPointerException if the <code>name</code>
- * is <code>null</code>.
+ * @exception NullPointerException if the {@code name}
+ * is {@code null}.
*/
public UnixPrincipal(String name) {
if (name == null) {
@@ -75,22 +73,18 @@ public class UnixPrincipal implements Principal, java.io.Serializable {
}
/**
- * Return the Unix username for this <code>UnixPrincipal</code>.
- *
- * <p>
+ * Return the Unix username for this {@code UnixPrincipal}.
*
- * @return the Unix username for this <code>UnixPrincipal</code>
+ * @return the Unix username for this {@code UnixPrincipal}
*/
public String getName() {
return name;
}
/**
- * Return a string representation of this <code>UnixPrincipal</code>.
- *
- * <p>
+ * Return a string representation of this {@code UnixPrincipal}.
*
- * @return a string representation of this <code>UnixPrincipal</code>.
+ * @return a string representation of this {@code UnixPrincipal}.
*/
public String toString() {
java.text.MessageFormat form = new java.text.MessageFormat
@@ -102,18 +96,16 @@ public class UnixPrincipal implements Principal, java.io.Serializable {
}
/**
- * Compares the specified Object with this <code>UnixPrincipal</code>
+ * Compares the specified Object with this {@code UnixPrincipal}
* for equality. Returns true if the given object is also a
- * <code>UnixPrincipal</code> and the two UnixPrincipals
+ * {@code UnixPrincipal} and the two UnixPrincipals
* have the same username.
*
- * <p>
- *
* @param o Object to be compared for equality with this
- * <code>UnixPrincipal</code>.
+ * {@code UnixPrincipal}.
*
* @return true if the specified Object is equal to this
- * <code>UnixPrincipal</code>.
+ * {@code UnixPrincipal}.
*/
public boolean equals(Object o) {
if (o == null)
@@ -132,11 +124,9 @@ public class UnixPrincipal implements Principal, java.io.Serializable {
}
/**
- * Return a hash code for this <code>UnixPrincipal</code>.
- *
- * <p>
+ * Return a hash code for this {@code UnixPrincipal}.
*
- * @return a hash code for this <code>UnixPrincipal</code>.
+ * @return a hash code for this {@code UnixPrincipal}.
*/
public int hashCode() {
return name.hashCode();
diff --git a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/X500Principal.java b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/X500Principal.java
index c4b12bdb28b..52fdcf868c9 100644
--- a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/X500Principal.java
+++ b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/X500Principal.java
@@ -29,17 +29,17 @@ import java.security.Principal;
import sun.security.x509.X500Name;
/**
- * <p> This class represents an X.500 <code>Principal</code>.
+ * This class represents an X.500 {@code Principal}.
* X500Principals have names such as,
* "CN=Duke, OU=JavaSoft, O=Sun Microsystems, C=US"
* (RFC 1779 style).
*
- * <p> Principals such as this <code>X500Principal</code>
- * may be associated with a particular <code>Subject</code>
- * to augment that <code>Subject</code> with an additional
- * identity. Refer to the <code>Subject</code> class for more information
+ * <p> Principals such as this {@code X500Principal}
+ * may be associated with a particular {@code Subject}
+ * to augment that {@code Subject} with an additional
+ * identity. Refer to the {@code Subject} class for more information
* on how to achieve this. Authorization decisions can then be based upon
- * the Principals associated with a <code>Subject</code>.
+ * the Principals associated with a {@code Subject}.
*
* @see java.security.Principal
* @see javax.security.auth.Subject
@@ -76,14 +76,12 @@ public class X500Principal implements Principal, java.io.Serializable {
* such as "CN=Duke, OU=JavaSoft, O=Sun Microsystems, C=US"
* (RFC 1779 style).
*
- * <p>
- *
* @param name the X.500 name
*
- * @exception NullPointerException if the <code>name</code>
- * is <code>null</code>. <p>
+ * @exception NullPointerException if the {@code name}
+ * is {@code null}.
*
- * @exception IllegalArgumentException if the <code>name</code>
+ * @exception IllegalArgumentException if the {@code name}
* is improperly specified.
*/
public X500Principal(String name) {
@@ -100,38 +98,32 @@ public class X500Principal implements Principal, java.io.Serializable {
}
/**
- * Return the Unix username for this <code>X500Principal</code>.
- *
- * <p>
+ * Return the Unix username for this {@code X500Principal}.
*
- * @return the Unix username for this <code>X500Principal</code>
+ * @return the Unix username for this {@code X500Principal}
*/
public String getName() {
return thisX500Name.getName();
}
/**
- * Return a string representation of this <code>X500Principal</code>.
- *
- * <p>
+ * Return a string representation of this {@code X500Principal}.
*
- * @return a string representation of this <code>X500Principal</code>.
+ * @return a string representation of this {@code X500Principal}.
*/
public String toString() {
return thisX500Name.toString();
}
/**
- * Compares the specified Object with this <code>X500Principal</code>
+ * Compares the specified Object with this {@code X500Principal}
* for equality.
*
- * <p>
- *
* @param o Object to be compared for equality with this
- * <code>X500Principal</code>.
+ * {@code X500Principal}.
*
* @return true if the specified Object is equal to this
- * <code>X500Principal</code>.
+ * {@code X500Principal}.
*/
public boolean equals(Object o) {
if (o == null)
@@ -159,11 +151,9 @@ public class X500Principal implements Principal, java.io.Serializable {
}
/**
- * Return a hash code for this <code>X500Principal</code>.
- *
- * <p>
+ * Return a hash code for this {@code X500Principal}.
*
- * @return a hash code for this <code>X500Principal</code>.
+ * @return a hash code for this {@code X500Principal}.
*/
public int hashCode() {
return thisX500Name.hashCode();
diff --git a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/JndiLoginModule.java b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/JndiLoginModule.java
index e287f858804..08e359b9b8e 100644
--- a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/JndiLoginModule.java
+++ b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/JndiLoginModule.java
@@ -44,28 +44,28 @@ import com.sun.security.auth.UnixNumericGroupPrincipal;
/**
- * <p> The module prompts for a username and password
+ * The module prompts for a username and password
* and then verifies the password against the password stored in
* a directory service configured under JNDI.
*
- * <p> This <code>LoginModule</code> interoperates with
+ * <p> This {@code LoginModule} interoperates with
* any conformant JNDI service provider. To direct this
- * <code>LoginModule</code> to use a specific JNDI service provider,
- * two options must be specified in the login <code>Configuration</code>
- * for this <code>LoginModule</code>.
+ * {@code LoginModule} to use a specific JNDI service provider,
+ * two options must be specified in the login {@code Configuration}
+ * for this {@code LoginModule}.
* <pre>
* user.provider.url=<b>name_service_url</b>
* group.provider.url=<b>name_service_url</b>
* </pre>
*
* <b>name_service_url</b> specifies
- * the directory service and path where this <code>LoginModule</code>
+ * the directory service and path where this {@code LoginModule}
* can access the relevant user and group information. Because this
- * <code>LoginModule</code> only performs one-level searches to
- * find the relevant user information, the <code>URL</code>
+ * {@code LoginModule} only performs one-level searches to
+ * find the relevant user information, the {@code URL}
* must point to a directory one level above where the user and group
* information is stored in the directory service.
- * For example, to instruct this <code>LoginModule</code>
+ * For example, to instruct this {@code LoginModule}
* to contact a NIS server, the following URLs must be specified:
* <pre>
* user.provider.url="nis://<b>NISServerHostName</b>/<b>NISDomain</b>/user"
@@ -90,14 +90,14 @@ import com.sun.security.auth.UnixNumericGroupPrincipal;
*
* <p> The format in which the user's information must be stored in
* the directory service is specified in RFC 2307. Specifically,
- * this <code>LoginModule</code> will search for the user's entry in the
+ * this {@code LoginModule} will search for the user's entry in the
* directory service using the user's <i>uid</i> attribute,
* where <i>uid=<b>username</b></i>. If the search succeeds,
- * this <code>LoginModule</code> will then
+ * this {@code LoginModule} will then
* obtain the user's encrypted password from the retrieved entry
* using the <i>userPassword</i> attribute.
- * This <code>LoginModule</code> assumes that the password is stored
- * as a byte array, which when converted to a <code>String</code>,
+ * This {@code LoginModule} assumes that the password is stored
+ * as a byte array, which when converted to a {@code String},
* has the following format:
* <pre>
* "{crypt}<b>encrypted_password</b>"
@@ -106,12 +106,12 @@ import com.sun.security.auth.UnixNumericGroupPrincipal;
* The LDAP directory server must be configured
* to permit read access to the userPassword attribute.
* If the user entered a valid username and password,
- * this <code>LoginModule</code> associates a
- * <code>UnixPrincipal</code>, <code>UnixNumericUserPrincipal</code>,
+ * this {@code LoginModule} associates a
+ * {@code UnixPrincipal}, {@code UnixNumericUserPrincipal},
* and the relevant UnixNumericGroupPrincipals with the
- * <code>Subject</code>.
+ * {@code Subject}.
*
- * <p> This LoginModule also recognizes the following <code>Configuration</code>
+ * <p> This LoginModule also recognizes the following {@code Configuration}
* options:
* <pre>
* debug if, true, debug messages are output to System.out.
@@ -144,7 +144,7 @@ import com.sun.security.auth.UnixNumericGroupPrincipal;
* exist for the username and password in the shared state,
* or if authentication fails.
*
- * clearPass if, true, this <code>LoginModule</code> clears the
+ * clearPass if, true, this {@code LoginModule} clears the
* username and password stored in the module's shared state
* after both phases of authentication (login and commit)
* have completed.
@@ -208,21 +208,19 @@ public class JndiLoginModule implements LoginModule {
private static final String PWD = "javax.security.auth.login.password";
/**
- * Initialize this <code>LoginModule</code>.
+ * Initialize this {@code LoginModule}.
*
- * <p>
+ * @param subject the {@code Subject} to be authenticated.
*
- * @param subject the <code>Subject</code> to be authenticated. <p>
- *
- * @param callbackHandler a <code>CallbackHandler</code> for communicating
+ * @param callbackHandler a {@code CallbackHandler} for communicating
* with the end user (prompting for usernames and
- * passwords, for example). <p>
+ * passwords, for example).
*
- * @param sharedState shared <code>LoginModule</code> state. <p>
+ * @param sharedState shared {@code LoginModule} state.
*
* @param options options specified in the login
- * <code>Configuration</code> for this particular
- * <code>LoginModule</code>.
+ * {@code Configuration} for this particular
+ * {@code LoginModule}.
*/
// Unchecked warning from (Map<String, Object>)sharedState is safe
// since javax.security.auth.login.LoginContext passes a raw HashMap.
@@ -255,17 +253,15 @@ public class JndiLoginModule implements LoginModule {
}
/**
- * <p> Prompt for username and password.
+ * Prompt for username and password.
* Verify the password against the relevant name service.
*
- * <p>
- *
- * @return true always, since this <code>LoginModule</code>
+ * @return true always, since this {@code LoginModule}
* should not be ignored.
*
- * @exception FailedLoginException if the authentication fails. <p>
+ * @exception FailedLoginException if the authentication fails.
*
- * @exception LoginException if this <code>LoginModule</code>
+ * @exception LoginException if this {@code LoginModule}
* is unable to perform the authentication.
*/
public boolean login() throws LoginException {
@@ -367,15 +363,13 @@ public class JndiLoginModule implements LoginModule {
*
* <p> If this LoginModule's own authentication attempt
* succeeded (checked by retrieving the private state saved by the
- * <code>login</code> method), then this method associates a
- * <code>UnixPrincipal</code>
- * with the <code>Subject</code> located in the
- * <code>LoginModule</code>. If this LoginModule's own
+ * {@code login} method), then this method associates a
+ * {@code UnixPrincipal}
+ * with the {@code Subject} located in the
+ * {@code LoginModule}. If this LoginModule's own
* authentication attempted failed, then this method removes
* any state that was originally saved.
*
- * <p>
- *
* @exception LoginException if the commit fails
*
* @return true if this LoginModule's own login and commit
@@ -418,18 +412,16 @@ public class JndiLoginModule implements LoginModule {
}
/**
- * <p> This method is called if the LoginContext's
+ * This method is called if the LoginContext's
* overall authentication failed.
* (the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules
* did not succeed).
*
* <p> If this LoginModule's own authentication attempt
* succeeded (checked by retrieving the private state saved by the
- * <code>login</code> and <code>commit</code> methods),
+ * {@code login} and {@code commit} methods),
* then this method cleans up any state that was originally saved.
*
- * <p>
- *
* @exception LoginException if the abort fails.
*
* @return false if this LoginModule's own login and/or commit attempts
@@ -464,13 +456,11 @@ public class JndiLoginModule implements LoginModule {
* Logout a user.
*
* <p> This method removes the Principals
- * that were added by the <code>commit</code> method.
- *
- * <p>
+ * that were added by the {@code commit} method.
*
* @exception LoginException if the logout fails.
*
- * @return true in all cases since this <code>LoginModule</code>
+ * @return true in all cases since this {@code LoginModule}
* should not be ignored.
*/
public boolean logout() throws LoginException {
@@ -506,8 +496,6 @@ public class JndiLoginModule implements LoginModule {
/**
* Attempt authentication
*
- * <p>
- *
* @param getPasswdFromSharedState boolean that tells this method whether
* to retrieve the password from the sharedState.
*/
@@ -674,8 +662,6 @@ public class JndiLoginModule implements LoginModule {
* values in the shared state in case subsequent LoginModules
* want to use them via use/tryFirstPass.
*
- * <p>
- *
* @param getPasswdFromSharedState boolean that tells this method whether
* to retrieve the password from the sharedState.
*/
diff --git a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/KeyStoreLoginModule.java b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/KeyStoreLoginModule.java
index 248afb53a9b..ece0d3f8afb 100644
--- a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/KeyStoreLoginModule.java
+++ b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/KeyStoreLoginModule.java
@@ -55,53 +55,53 @@ import sun.security.util.Password;
/**
* Provides a JAAS login module that prompts for a key store alias and
* populates the subject with the alias's principal and credentials. Stores
- * an <code>X500Principal</code> for the subject distinguished name of the
+ * an {@code X500Principal} for the subject distinguished name of the
* first certificate in the alias's credentials in the subject's principals,
* the alias's certificate path in the subject's public credentials, and a
- * <code>X500PrivateCredential</code> whose certificate is the first
+ * {@code X500PrivateCredential} whose certificate is the first
* certificate in the alias's certificate path and whose private key is the
* alias's private key in the subject's private credentials. <p>
*
* Recognizes the following options in the configuration file:
* <dl>
*
- * <dt> <code>keyStoreURL</code> </dt>
+ * <dt> {@code keyStoreURL} </dt>
* <dd> A URL that specifies the location of the key store. Defaults to
* a URL pointing to the .keystore file in the directory specified by the
- * <code>user.home</code> system property. The input stream from this
- * URL is passed to the <code>KeyStore.load</code> method.
- * "NONE" may be specified if a <code>null</code> stream must be
- * passed to the <code>KeyStore.load</code> method.
+ * {@code user.home} system property. The input stream from this
+ * URL is passed to the {@code KeyStore.load} method.
+ * "NONE" may be specified if a {@code null} stream must be
+ * passed to the {@code KeyStore.load} method.
* "NONE" should be specified if the KeyStore resides
* on a hardware token device, for example.</dd>
*
- * <dt> <code>keyStoreType</code> </dt>
+ * <dt> {@code keyStoreType} </dt>
* <dd> The key store type. If not specified, defaults to the result of
- * calling <code>KeyStore.getDefaultType()</code>.
+ * calling {@code KeyStore.getDefaultType()}.
* If the type is "PKCS11", then keyStoreURL must be "NONE"
* and privateKeyPasswordURL must not be specified.</dd>
*
- * <dt> <code>keyStoreProvider</code> </dt>
+ * <dt> {@code keyStoreProvider} </dt>
* <dd> The key store provider. If not specified, uses the standard search
* order to find the provider. </dd>
*
- * <dt> <code>keyStoreAlias</code> </dt>
+ * <dt> {@code keyStoreAlias} </dt>
* <dd> The alias in the key store to login as. Required when no callback
* handler is provided. No default value. </dd>
*
- * <dt> <code>keyStorePasswordURL</code> </dt>
+ * <dt> {@code keyStorePasswordURL} </dt>
* <dd> A URL that specifies the location of the key store password. Required
* when no callback handler is provided and
- * <code>protected</code> is false.
+ * {@code protected} is false.
* No default value. </dd>
*
- * <dt> <code>privateKeyPasswordURL</code> </dt>
+ * <dt> {@code privateKeyPasswordURL} </dt>
* <dd> A URL that specifies the location of the specific private key password
* needed to access the private key for this alias.
* The keystore password
* is used if this value is needed and not specified. </dd>
*
- * <dt> <code>protected</code> </dt>
+ * <dt> {@code protected} </dt>
* <dd> This value should be set to "true" if the KeyStore
* has a separate, protected authentication path
* (for example, a dedicated PIN-pad attached to a smart card).
@@ -174,22 +174,20 @@ public class KeyStoreLoginModule implements LoginModule {
/* -- Methods -- */
/**
- * Initialize this <code>LoginModule</code>.
+ * Initialize this {@code LoginModule}.
*
- * <p>
+ * @param subject the {@code Subject} to be authenticated.
*
- * @param subject the <code>Subject</code> to be authenticated. <p>
- *
- * @param callbackHandler a <code>CallbackHandler</code> for communicating
+ * @param callbackHandler a {@code CallbackHandler} for communicating
* with the end user (prompting for usernames and
* passwords, for example),
- * which may be <code>null</code>. <p>
+ * which may be {@code null}.
*
- * @param sharedState shared <code>LoginModule</code> state. <p>
+ * @param sharedState shared {@code LoginModule} state.
*
* @param options options specified in the login
- * <code>Configuration</code> for this particular
- * <code>LoginModule</code>.
+ * {@code Configuration} for this particular
+ * {@code LoginModule}.
*/
// Unchecked warning from (Map<String, Object>)sharedState is safe
// since javax.security.auth.login.LoginContext passes a raw HashMap.
@@ -258,11 +256,9 @@ public class KeyStoreLoginModule implements LoginModule {
* <p> Get the Keystore alias and relevant passwords.
* Retrieve the alias's principal and credentials from the Keystore.
*
- * <p>
- *
- * @exception FailedLoginException if the authentication fails. <p>
+ * @exception FailedLoginException if the authentication fails.
*
- * @return true in all cases (this <code>LoginModule</code>
+ * @return true in all cases (this {@code LoginModule}
* should not be ignored).
*/
@@ -719,19 +715,17 @@ public class KeyStoreLoginModule implements LoginModule {
*
* <p> If this LoginModule's own authentication attempt
* succeeded (checked by retrieving the private state saved by the
- * <code>login</code> method), then this method associates a
- * <code>X500Principal</code> for the subject distinguished name of the
+ * {@code login} method), then this method associates a
+ * {@code X500Principal} for the subject distinguished name of the
* first certificate in the alias's credentials in the subject's
* principals,the alias's certificate path in the subject's public
- * credentials, and a<code>X500PrivateCredential</code> whose certificate
+ * credentials, and a {@code X500PrivateCredential} whose certificate
* is the first certificate in the alias's certificate path and whose
* private key is the alias's private key in the subject's private
* credentials. If this LoginModule's own
* authentication attempted failed, then this method removes
* any state that was originally saved.
*
- * <p>
- *
* @exception LoginException if the commit fails
*
* @return true if this LoginModule's own login and commit
@@ -774,21 +768,19 @@ public class KeyStoreLoginModule implements LoginModule {
}
/**
- * <p> This method is called if the LoginContext's
+ * This method is called if the LoginContext's
* overall authentication failed.
* (the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules
* did not succeed).
*
* <p> If this LoginModule's own authentication attempt
* succeeded (checked by retrieving the private state saved by the
- * <code>login</code> and <code>commit</code> methods),
+ * {@code login} and {@code commit} methods),
* then this method cleans up any state that was originally saved.
*
* <p> If the loaded KeyStore's provider extends
- * <code>java.security.AuthProvider</code>,
- * then the provider's <code>logout</code> method is invoked.
- *
- * <p>
+ * {@code java.security.AuthProvider},
+ * then the provider's {@code logout} method is invoked.
*
* @exception LoginException if the abort fails.
*
@@ -815,17 +807,15 @@ public class KeyStoreLoginModule implements LoginModule {
* Logout a user.
*
* <p> This method removes the Principals, public credentials and the
- * private credentials that were added by the <code>commit</code> method.
+ * private credentials that were added by the {@code commit} method.
*
* <p> If the loaded KeyStore's provider extends
- * <code>java.security.AuthProvider</code>,
- * then the provider's <code>logout</code> method is invoked.
- *
- * <p>
+ * {@code java.security.AuthProvider},
+ * then the provider's {@code logout} method is invoked.
*
* @exception LoginException if the logout fails.
*
- * @return true in all cases since this <code>LoginModule</code>
+ * @return true in all cases since this {@code LoginModule}
* should not be ignored.
*/
diff --git a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/Krb5LoginModule.java b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/Krb5LoginModule.java
index 12ee20b126b..5bd179db91a 100644
--- a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/Krb5LoginModule.java
+++ b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/Krb5LoginModule.java
@@ -47,147 +47,142 @@ import sun.security.krb5.Credentials;
import sun.misc.HexDumpEncoder;
/**
- * <p> This <code>LoginModule</code> authenticates users using
+ * This {@code LoginModule} authenticates users using
* Kerberos protocols.
*
- * <p> The configuration entry for <code>Krb5LoginModule</code> has
+ * <p> The configuration entry for {@code Krb5LoginModule} has
* several options that control the authentication process and
- * additions to the <code>Subject</code>'s private credential
- * set. Irrespective of these options, the <code>Subject</code>'s
+ * additions to the {@code Subject}'s private credential
+ * set. Irrespective of these options, the {@code Subject}'s
* principal set and private credentials set are updated only when
- * <code>commit</code> is called.
- * When <code>commit</code> is called, the <code>KerberosPrincipal</code>
- * is added to the <code>Subject</code>'s principal set (unless the
- * <code>principal</code> is specified as "*"). If <code>isInitiator</code>
- * is true, the <code>KerberosTicket</code> is
- * added to the <code>Subject</code>'s private credentials.
+ * {@code commit} is called.
+ * When {@code commit} is called, the {@code KerberosPrincipal}
+ * is added to the {@code Subject}'s principal set (unless the
+ * {@code principal} is specified as "*"). If {@code isInitiator}
+ * is true, the {@code KerberosTicket} is
+ * added to the {@code Subject}'s private credentials.
*
- * <p> If the configuration entry for <code>KerberosLoginModule</code>
- * has the option <code>storeKey</code> set to true, then
- * <code>KerberosKey</code> or <code>KeyTab</code> will also be added to the
- * subject's private credentials. <code>KerberosKey</code>, the principal's
- * key(s) will be derived from user's password, and <code>KeyTab</code> is
- * the keytab used when <code>useKeyTab</code> is set to true. The
- * <code>KeyTab</code> object is restricted to be used by the specified
+ * <p> If the configuration entry for {@code KerberosLoginModule}
+ * has the option {@code storeKey} set to true, then
+ * {@code KerberosKey} or {@code KeyTab} will also be added to the
+ * subject's private credentials. {@code KerberosKey}, the principal's
+ * key(s) will be derived from user's password, and {@code KeyTab} is
+ * the keytab used when {@code useKeyTab} is set to true. The
+ * {@code KeyTab} object is restricted to be used by the specified
* principal unless the principal value is "*".
*
- * <p> This <code>LoginModule</code> recognizes the <code>doNotPrompt</code>
+ * <p> This {@code LoginModule} recognizes the {@code doNotPrompt}
* option. If set to true the user will not be prompted for the password.
*
* <p> The user can specify the location of the ticket cache by using
- * the option <code>ticketCache</code> in the configuration entry.
+ * the option {@code ticketCache} in the configuration entry.
*
* <p>The user can specify the keytab location by using
- * the option <code>keyTab</code>
+ * the option {@code keyTab}
* in the configuration entry.
*
* <p> The principal name can be specified in the configuration entry
- * by using the option <code>principal</code>. The principal name
+ * by using the option {@code principal}. The principal name
* can either be a simple user name, a service name such as
- * <code>host/mission.eng.sun.com</code>, or "*". The principal can also
- * be set using the system property <code>sun.security.krb5.principal</code>.
+ * {@code host/mission.eng.sun.com}, or "*". The principal can also
+ * be set using the system property {@code sun.security.krb5.principal}.
* This property is checked during login. If this property is not set, then
* the principal name from the configuration is used. In the
* case where the principal property is not set and the principal
* entry also does not exist, the user is prompted for the name.
- * When this property of entry is set, and <code>useTicketCache</code>
+ * When this property of entry is set, and {@code useTicketCache}
* is set to true, only TGT belonging to this principal is used.
*
* <p> The following is a list of configuration options supported
- * for <code>Krb5LoginModule</code>:
+ * for {@code Krb5LoginModule}:
* <blockquote><dl>
- * <dt><b><code>refreshKrb5Config</code></b>:</dt>
+ * <dt>{@code refreshKrb5Config}:</dt>
* <dd> Set this to true, if you want the configuration
- * to be refreshed before the <code>login</code> method is called.</dd>
- * <dt><b><code>useTicketCache</code></b>:</dt>
+ * to be refreshed before the {@code login} method is called.</dd>
+ * <dt>{@code useTicketCache}:</dt>
* <dd>Set this to true, if you want the
- * TGT to be obtained
- * from the ticket cache. Set this option
+ * TGT to be obtained from the ticket cache. Set this option
* to false if you do not want this module to use the ticket cache.
* (Default is False).
- * This module will
- * search for the ticket
- * cache in the following locations:
- * On Solaris and Linux
- * it will look for the ticket cache in /tmp/krb5cc_<code>uid</code>
- * where the uid is numeric user
- * identifier. If the ticket cache is
+ * This module will search for the ticket
+ * cache in the following locations: On Solaris and Linux
+ * it will look for the ticket cache in /tmp/krb5cc_{@code uid}
+ * where the uid is numeric user identifier. If the ticket cache is
* not available in the above location, or if we are on a
* Windows platform, it will look for the cache as
* {user.home}{file.separator}krb5cc_{user.name}.
* You can override the ticket cache location by using
- * <code>ticketCache</code>.
+ * {@code ticketCache}.
* For Windows, if a ticket cannot be retrieved from the file ticket cache,
* it will use Local Security Authority (LSA) API to get the TGT.
- * <dt><b><code>ticketCache</code></b>:</dt>
+ * <dt>{@code ticketCache}:</dt>
* <dd>Set this to the name of the ticket
* cache that contains user's TGT.
- * If this is set, <code>useTicketCache</code>
+ * If this is set, {@code useTicketCache}
* must also be set to true; Otherwise a configuration error will
* be returned.</dd>
- * <dt><b><code>renewTGT</code></b>:</dt>
+ * <dt>{@code renewTGT}:</dt>
* <dd>Set this to true, if you want to renew
- * the TGT. If this is set, <code>useTicketCache</code> must also be
+ * the TGT. If this is set, {@code useTicketCache} must also be
* set to true; otherwise a configuration error will be returned.</dd>
- * <dt><b><code>doNotPrompt</code></b>:</dt>
+ * <dt>{@code doNotPrompt}:</dt>
* <dd>Set this to true if you do not want to be
* prompted for the password
* if credentials can not be obtained from the cache, the keytab,
* or through shared state.(Default is false)
* If set to true, credential must be obtained through cache, keytab,
* or shared state. Otherwise, authentication will fail.</dd>
- * <dt><b><code>useKeyTab</code></b>:</dt>
+ * <dt>{@code useKeyTab}:</dt>
* <dd>Set this to true if you
* want the module to get the principal's key from the
* the keytab.(default value is False)
- * If <code>keytab</code>
- * is not set then
+ * If {@code keytab} is not set then
* the module will locate the keytab from the
* Kerberos configuration file.
* If it is not specified in the Kerberos configuration file
* then it will look for the file
- * <code>{user.home}{file.separator}</code>krb5.keytab.</dd>
- * <dt><b><code>keyTab</code></b>:</dt>
+ * {@code {user.home}{file.separator}}krb5.keytab.</dd>
+ * <dt>{@code keyTab}:</dt>
* <dd>Set this to the file name of the
* keytab to get principal's secret key.</dd>
- * <dt><b><code>storeKey</code></b>:</dt>
+ * <dt>{@code storeKey}:</dt>
* <dd>Set this to true to if you want the keytab or the
* principal's key to be stored in the Subject's private credentials.
- * For <code>isInitiator</code> being false, if <code>principal</code>
+ * For {@code isInitiator} being false, if {@code principal}
* is "*", the {@link KeyTab} stored can be used by anyone, otherwise,
* it's restricted to be used by the specified principal only.</dd>
- * <dt><b><code>principal</code></b>:</dt>
+ * <dt>{@code principal}:</dt>
* <dd>The name of the principal that should
* be used. The principal can be a simple username such as
- * "<code>testuser</code>" or a service name such as
- * "<code>host/testhost.eng.sun.com</code>". You can use the
- * <code>principal</code> option to set the principal when there are
+ * "{@code testuser}" or a service name such as
+ * "{@code host/testhost.eng.sun.com}". You can use the
+ * {@code principal} option to set the principal when there are
* credentials for multiple principals in the
- * <code>keyTab</code> or when you want a specific ticket cache only.
+ * {@code keyTab} or when you want a specific ticket cache only.
* The principal can also be set using the system property
- * <code>sun.security.krb5.principal</code>. In addition, if this
+ * {@code sun.security.krb5.principal}. In addition, if this
* system property is defined, then it will be used. If this property
* is not set, then the principal name from the configuration will be
* used.
- * The principal name can be set to "*" when <code>isInitiator</code> is false.
+ * The principal name can be set to "*" when {@code isInitiator} is false.
* In this case, the acceptor is not bound to a single principal. It can
* act as any principal an initiator requests if keys for that principal
- * can be found. When <code>isInitiator</code> is true, the principal name
+ * can be found. When {@code isInitiator} is true, the principal name
* cannot be set to "*".
* </dd>
- * <dt><b><code>isInitiator</code></b>:</dt>
+ * <dt>{@code isInitiator}:</dt>
* <dd>Set this to true, if initiator. Set this to false, if acceptor only.
* (Default is true).
* Note: Do not set this value to false for initiators.</dd>
* </dl></blockquote>
*
- * <p> This <code>LoginModule</code> also recognizes the following additional
- * <code>Configuration</code>
+ * <p> This {@code LoginModule} also recognizes the following additional
+ * {@code Configuration}
* options that enable you to share username and passwords across different
* authentication modules:
* <blockquote><dl>
*
- * <dt><b><code>useFirstPass</code></b>:</dt>
+ * <dt>{@code useFirstPass}:</dt>
* <dd>if, true, this LoginModule retrieves the
* username and password from the module's shared state,
* using "javax.security.auth.login.name" and
@@ -197,7 +192,7 @@ import sun.misc.HexDumpEncoder;
* is made, and the failure is reported back to the
* calling application.</dd>
*
- * <dt><b><code>tryFirstPass</code></b>:</dt>
+ * <dt>{@code tryFirstPass}:</dt>
* <dd>if, true, this LoginModule retrieves the
* the username and password from the module's shared
* state using "javax.security.auth.login.name" and
@@ -210,7 +205,7 @@ import sun.misc.HexDumpEncoder;
* is made. If the authentication fails,
* the failure is reported back to the calling application</dd>
*
- * <dt><b><code>storePass</code></b>:</dt>
+ * <dt>{@code storePass}:</dt>
* <dd>if, true, this LoginModule stores the username and
* password obtained from the CallbackHandler in the
* modules shared state, using
@@ -220,7 +215,7 @@ import sun.misc.HexDumpEncoder;
* exist for the username and password in the shared
* state, or if authentication fails.</dd>
*
- * <dt><b><code>clearPass</code></b>:</dt>
+ * <dt>{@code clearPass}:</dt>
* <dd>if, true, this LoginModule clears the
* username and password stored in the module's shared
* state after both phases of authentication
@@ -236,148 +231,137 @@ import sun.misc.HexDumpEncoder;
* <li>shared state
* <li>user prompt
* </ol>
+ *
* <p>Note that if any step fails, it will fallback to the next step.
* There's only one exception, if the shared state step fails and
- * <code>useFirstPass</code>=true, no user prompt is made.
+ * {@code useFirstPass = true}, no user prompt is made.
* <p>Examples of some configuration values for Krb5LoginModule in
* JAAS config file and the results are:
- * <ul>
- * <p> <code>doNotPrompt</code>=true;
- * </ul>
- * <p> This is an illegal combination since none of <code>useTicketCache</code>,
- * <code>useKeyTab</code>, <code>useFirstPass</code> and <code>tryFirstPass</code>
- * is set and the user can not be prompted for the password.
- *<ul>
- * <p> <code>ticketCache</code> = &lt;filename&gt;;
- *</ul>
- * <p> This is an illegal combination since <code>useTicketCache</code>
+ * <blockquote><dl>
+ * <dd><pre>{@code
+ * doNotPrompt = true}</pre>
+ * This is an illegal combination since none of {@code useTicketCache,
+ * useKeyTab, useFirstPass} and {@code tryFirstPass}
+ * is set and the user can not be prompted for the password.</dd>
+ *
+ * <dd><pre>{@code
+ * ticketCache = <filename>}</pre>
+ * This is an illegal combination since {@code useTicketCache}
* is not set to true and the ticketCache is set. A configuration error
- * will occur.
- * <ul>
- * <p> <code>renewTGT</code>=true;
- *</ul>
- * <p> This is an illegal combination since <code>useTicketCache</code> is
- * not set to true and renewTGT is set. A configuration error will occur.
- * <ul>
- * <p> <code>storeKey</code>=true
- * <code>useTicketCache</code> = true
- * <code>doNotPrompt</code>=true;;
- *</ul>
- * <p> This is an illegal combination since <code>storeKey</code> is set to
+ * will occur.</dd>
+ *
+ * <dd><pre>{@code
+ * renewTGT = true}</pre>
+ * This is an illegal combination since {@code useTicketCache} is
+ * not set to true and renewTGT is set. A configuration error will occur.</dd>
+ *
+ * <dd><pre>{@code
+ * storeKey = true useTicketCache = true doNotPrompt = true}</pre>
+ * This is an illegal combination since {@code storeKey} is set to
* true but the key can not be obtained either by prompting the user or from
- * the keytab, or from the shared state. A configuration error will occur.
- * <ul>
- * <p> <code>keyTab</code> = &lt;filename&gt; <code>doNotPrompt</code>=true ;
- * </ul>
- * <p>This is an illegal combination since useKeyTab is not set to true and
- * the keyTab is set. A configuration error will occur.
- * <ul>
- * <p> <code>debug=true </code>
- *</ul>
- * <p> Prompt the user for the principal name and the password.
+ * the keytab, or from the shared state. A configuration error will occur.</dd>
+ *
+ * <dd><pre>{@code
+ * keyTab = <filename> doNotPrompt = true}</pre>
+ * This is an illegal combination since useKeyTab is not set to true and
+ * the keyTab is set. A configuration error will occur.</dd>
+ *
+ * <dd><pre>{@code
+ * debug = true}</pre>
+ * Prompt the user for the principal name and the password.
* Use the authentication exchange to get TGT from the KDC and
- * populate the <code>Subject</code> with the principal and TGT.
- * Output debug messages.
- * <ul>
- * <p> <code>useTicketCache</code> = true <code>doNotPrompt</code>=true;
- *</ul>
- * <p>Check the default cache for TGT and populate the <code>Subject</code>
+ * populate the {@code Subject} with the principal and TGT.
+ * Output debug messages.</dd>
+ *
+ * <dd><pre>{@code
+ * useTicketCache = true doNotPrompt = true}</pre>
+ * Check the default cache for TGT and populate the {@code Subject}
* with the principal and TGT. If the TGT is not available,
- * do not prompt the user, instead fail the authentication.
- * <ul>
- * <p><code>principal</code>=&lt;name&gt;<code>useTicketCache</code> = true
- * <code>doNotPrompt</code>=true;
- *</ul>
- * <p> Get the TGT from the default cache for the principal and populate the
+ * do not prompt the user, instead fail the authentication.</dd>
+ *
+ * <dd><pre>{@code
+ * principal = <name> useTicketCache = true doNotPrompt = true}</pre>
+ * Get the TGT from the default cache for the principal and populate the
* Subject's principal and private creds set. If ticket cache is
* not available or does not contain the principal's TGT
- * authentication will fail.
- * <ul>
- * <p> <code>useTicketCache</code> = true
- * <code>ticketCache</code>=&lt;file name&gt;<code>useKeyTab</code> = true
- * <code> keyTab</code>=&lt;keytab filename&gt;
- * <code>principal</code> = &lt;principal name&gt;
- * <code>doNotPrompt</code>=true;
- *</ul>
- * <p> Search the cache for the principal's TGT. If it is not available
+ * authentication will fail.</dd>
+ *
+ * <dd><pre>{@code
+ * useTicketCache = true
+ * ticketCache = <file name>
+ * useKeyTab = true
+ * keyTab = <keytab filename>
+ * principal = <principal name>
+ * doNotPrompt = true}</pre>
+ * Search the cache for the principal's TGT. If it is not available
* use the key in the keytab to perform authentication exchange with the
* KDC and acquire the TGT.
* The Subject will be populated with the principal and the TGT.
- * If the key is not available or valid then authentication will fail.
- * <ul>
- * <p><code>useTicketCache</code> = true
- * <code>ticketCache</code>=&lt;file name&gt;
- *</ul>
- * <p> The TGT will be obtained from the cache specified.
+ * If the key is not available or valid then authentication will fail.</dd>
+ *
+ * <dd><pre>{@code
+ * useTicketCache = true ticketCache = <filename>}</pre>
+ * The TGT will be obtained from the cache specified.
* The Kerberos principal name used will be the principal name in
* the Ticket cache. If the TGT is not available in the
* ticket cache the user will be prompted for the principal name
* and the password. The TGT will be obtained using the authentication
* exchange with the KDC.
- * The Subject will be populated with the TGT.
- *<ul>
- * <p> <code>useKeyTab</code> = true
- * <code>keyTab</code>=&lt;keytab filename&gt;
- * <code>principal</code>= &lt;principal name&gt;
- * <code>storeKey</code>=true;
- *</ul>
- * <p> The key for the principal will be retrieved from the keytab.
+ * The Subject will be populated with the TGT.</dd>
+ *
+ * <dd><pre>{@code
+ * useKeyTab = true keyTab=<keytab filename> principal = <principal name> storeKey = true}</pre>
+ * The key for the principal will be retrieved from the keytab.
* If the key is not available in the keytab the user will be prompted
* for the principal's password. The Subject will be populated
* with the principal's key either from the keytab or derived from the
- * password entered.
- * <ul>
- * <p> <code>useKeyTab</code> = true
- * <code>keyTab</code>=&lt;keytabname&gt;
- * <code>storeKey</code>=true
- * <code>doNotPrompt</code>=false;
- *</ul>
- * <p>The user will be prompted for the service principal name.
+ * password entered.</dd>
+ *
+ * <dd><pre>{@code
+ * useKeyTab = true keyTab = <keytabname> storeKey = true doNotPrompt = false}</pre>
+ * The user will be prompted for the service principal name.
* If the principal's
* longterm key is available in the keytab , it will be added to the
* Subject's private credentials. An authentication exchange will be
* attempted with the principal name and the key from the Keytab.
* If successful the TGT will be added to the
- * Subject's private credentials set. Otherwise the authentication will
- * fail.
- * <ul>
- * <p> <code>isInitiator</code> = false <code>useKeyTab</code> = true
- * <code>keyTab</code>=&lt;keytabname&gt;
- * <code>storeKey</code>=true
- * <code>principal</code>=*;
- *</ul>
- * <p>The acceptor will be an unbound acceptor and it can act as any principal
- * as long that principal has keys in the keytab.
- *<ul>
- * <p>
- * <code>useTicketCache</code>=true
- * <code>ticketCache</code>=&lt;file name&gt;;
- * <code>useKeyTab</code> = true
- * <code>keyTab</code>=&lt;file name&gt; <code>storeKey</code>=true
- * <code>principal</code>= &lt;principal name&gt;
- *</ul>
- * <p>
+ * Subject's private credentials set. Otherwise the authentication will fail.</dd>
+ *
+ * <dd><pre>{@code
+ * isInitiator = false useKeyTab = true keyTab = <keytabname> storeKey = true principal = *}</pre>
+ * The acceptor will be an unbound acceptor and it can act as any principal
+ * as long that principal has keys in the keytab.</dd>
+ *
+ * <dd><pre>{@code
+ * useTicketCache = true
+ * ticketCache = <file name>
+ * useKeyTab = true
+ * keyTab = <file name>
+ * storeKey = true
+ * principal = <principal name>}</pre>
* The client's TGT will be retrieved from the ticket cache and added to the
- * <code>Subject</code>'s private credentials. If the TGT is not available
+ * {@code Subject}'s private credentials. If the TGT is not available
* in the ticket cache, or the TGT's client name does not match the principal
* name, Java will use a secret key to obtain the TGT using the authentication
* exchange and added to the Subject's private credentials.
* This secret key will be first retrieved from the keytab. If the key
* is not available, the user will be prompted for the password. In either
* case, the key derived from the password will be added to the
- * Subject's private credentials set.
- * <ul>
- * <p><code>isInitiator</code> = false
- *</ul>
- * <p>Configured to act as acceptor only, credentials are not acquired
+ * Subject's private credentials set.</dd>
+ *
+ * <dd><pre>{@code
+ * isInitiator = false}</pre>
+ * Configured to act as acceptor only, credentials are not acquired
* via AS exchange. For acceptors only, set this value to false.
- * For initiators, do not set this value to false.
- * <ul>
- * <p><code>isInitiator</code> = true
- *</ul>
- * <p>Configured to act as initiator, credentials are acquired
+ * For initiators, do not set this value to false.</dd>
+ *
+ * <dd><pre>{@code
+ * isInitiator = true}</pre>
+ * Configured to act as initiator, credentials are acquired
* via AS exchange. For initiators, set this value to true, or leave this
- * option unset, in which case default value (true) will be used.
+ * option unset, in which case default value (true) will be used.</dd>
+ *
+ * </dl></blockquote>
*
* @author Ram Marti
*/
@@ -445,20 +429,19 @@ public class Krb5LoginModule implements LoginModule {
);
/**
- * Initialize this <code>LoginModule</code>.
+ * Initialize this {@code LoginModule}.
*
- * <p>
- * @param subject the <code>Subject</code> to be authenticated. <p>
+ * @param subject the {@code Subject} to be authenticated.
*
- * @param callbackHandler a <code>CallbackHandler</code> for
+ * @param callbackHandler a {@code CallbackHandler} for
* communication with the end user (prompting for
- * usernames and passwords, for example). <p>
+ * usernames and passwords, for example).
*
- * @param sharedState shared <code>LoginModule</code> state. <p>
+ * @param sharedState shared {@code LoginModule} state.
*
* @param options options specified in the login
- * <code>Configuration</code> for this particular
- * <code>LoginModule</code>.
+ * {@code Configuration} for this particular
+ * {@code LoginModule}.
*/
// Unchecked warning from (Map<String, Object>)sharedState is safe
// since javax.security.auth.login.LoginContext passes a raw HashMap.
@@ -536,14 +519,12 @@ public class Krb5LoginModule implements LoginModule {
/**
* Authenticate the user
*
- * <p>
- *
- * @return true in all cases since this <code>LoginModule</code>
+ * @return true in all cases since this {@code LoginModule}
* should not be ignored.
*
- * @exception FailedLoginException if the authentication fails. <p>
+ * @exception FailedLoginException if the authentication fails.
*
- * @exception LoginException if this <code>LoginModule</code>
+ * @exception LoginException if this {@code LoginModule}
* is unable to perform the authentication.
*/
public boolean login() throws LoginException {
@@ -1019,23 +1000,21 @@ public class Krb5LoginModule implements LoginModule {
}
/**
- * <p> This method is called if the LoginContext's
+ * This method is called if the LoginContext's
* overall authentication succeeded
* (the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL
* LoginModules succeeded).
*
* <p> If this LoginModule's own authentication attempt
* succeeded (checked by retrieving the private state saved by the
- * <code>login</code> method), then this method associates a
- * <code>Krb5Principal</code>
- * with the <code>Subject</code> located in the
- * <code>LoginModule</code>. It adds Kerberos Credentials to the
+ * {@code login} method), then this method associates a
+ * {@code Krb5Principal}
+ * with the {@code Subject} located in the
+ * {@code LoginModule}. It adds Kerberos Credentials to the
* the Subject's private credentials set. If this LoginModule's own
* authentication attempted failed, then this method removes
* any state that was originally saved.
*
- * <p>
- *
* @exception LoginException if the commit fails.
*
* @return true if this LoginModule's own login and commit
@@ -1147,18 +1126,16 @@ public class Krb5LoginModule implements LoginModule {
}
/**
- * <p> This method is called if the LoginContext's
+ * This method is called if the LoginContext's
* overall authentication failed.
* (the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL
* LoginModules did not succeed).
*
* <p> If this LoginModule's own authentication attempt
* succeeded (checked by retrieving the private state saved by the
- * <code>login</code> and <code>commit</code> methods),
+ * {@code login} and {@code commit} methods),
* then this method cleans up any state that was originally saved.
*
- * <p>
- *
* @exception LoginException if the abort fails.
*
* @return false if this LoginModule's own login and/or commit attempts
@@ -1183,14 +1160,12 @@ public class Krb5LoginModule implements LoginModule {
/**
* Logout the user.
*
- * <p> This method removes the <code>Krb5Principal</code>
- * that was added by the <code>commit</code> method.
- *
- * <p>
+ * <p> This method removes the {@code Krb5Principal}
+ * that was added by the {@code commit} method.
*
* @exception LoginException if the logout fails.
*
- * @return true in all cases since this <code>LoginModule</code>
+ * @return true in all cases since this {@code LoginModule}
* should not be ignored.
*/
public boolean logout() throws LoginException {
diff --git a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/LdapLoginModule.java b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/LdapLoginModule.java
index 1de82aa98b6..167530a4b79 100644
--- a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/LdapLoginModule.java
+++ b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/LdapLoginModule.java
@@ -70,8 +70,8 @@ import com.sun.security.auth.UserPrincipal;
* conjunction with a specified search filter.
* If successful then authentication is attempted using the user's
* distinguished name and the supplied password.
- * To enable this mode, set the <code>userFilter</code> option and omit the
- * <code>authIdentity</code> option.
+ * To enable this mode, set the {@code userFilter} option and omit the
+ * {@code authIdentity} option.
* Use search-first mode when the user's distinguished name is not
* known in advance.
*
@@ -79,22 +79,22 @@ import com.sun.security.auth.UserPrincipal;
* supplied username and password and then the LDAP directory is searched.
* If authentication is successful then a search is performed using the
* supplied username in conjunction with a specified search filter.
- * To enable this mode, set the <code>authIdentity</code> and the
- * <code>userFilter</code> options.
+ * To enable this mode, set the {@code authIdentity} and the
+ * {@code userFilter} options.
* Use authentication-first mode when accessing an LDAP directory
* that has been configured to disallow anonymous searches.
*
* <p> In authentication-only mode, authentication is attempted using the
* supplied username and password. The LDAP directory is not searched because
* the user's distinguished name is already known.
- * To enable this mode, set the <code>authIdentity</code> option to a valid
- * distinguished name and omit the <code>userFilter</code> option.
+ * To enable this mode, set the {@code authIdentity} option to a valid
+ * distinguished name and omit the {@code userFilter} option.
* Use authentication-only mode when the user's distinguished name is
* known in advance.
*
* <p> The following option is mandatory and must be specified in this
* module's login {@link Configuration}:
- * <dl><dt></dt><dd>
+ * <dl><dd>
* <dl>
* <dt> <code>userProvider=<b>ldap_urls</b></code>
* </dt>
@@ -106,7 +106,7 @@ import com.sun.security.auth.UserPrincipal;
* When several LDAP URLs are specified then each is attempted,
* in turn, until the first successful connection is established.
* Spaces in the distinguished name component of the URL must be escaped
- * using the standard mechanism of percent character ('<code>%</code>')
+ * using the standard mechanism of percent character ('{@code %}')
* followed by two hexadecimal digits (see {@link java.net.URI}).
* Query components must also be omitted from the URL.
*
@@ -120,33 +120,33 @@ import com.sun.security.auth.UserPrincipal;
*
* <p> This module also recognizes the following optional {@link Configuration}
* options:
- * <dl><dt></dt><dd>
+ * <dl><dd>
* <dl>
* <dt> <code>userFilter=<b>ldap_filter</b></code> </dt>
* <dd> This option specifies the search filter to use to locate a user's
* entry in the LDAP directory. It is used to determine a user's
* distinguished name.
- * <code><b>ldap_filter</b></code> is an LDAP filter string
+ * <b>{@code ldap_filter}</b> is an LDAP filter string
* (<a href="http://www.ietf.org/rfc/rfc2254.txt">RFC 2254</a>).
- * If it contains the special token "<code><b>{USERNAME}</b></code>"
+ * If it contains the special token "<b>{@code {USERNAME}}</b>"
* then that token will be replaced with the supplied username value
* before the filter is used to search the directory. </dd>
*
* <dt> <code>authIdentity=<b>auth_id</b></code> </dt>
* <dd> This option specifies the identity to use when authenticating a user
* to the LDAP directory.
- * <code><b>auth_id</b></code> may be an LDAP distinguished name string
+ * <b>{@code auth_id}</b> may be an LDAP distinguished name string
* (<a href="http://www.ietf.org/rfc/rfc2253.txt">RFC 2253</a>) or some
* other string name.
- * It must contain the special token "<code><b>{USERNAME}</b></code>"
+ * It must contain the special token "<b>{@code {USERNAME}}</b>"
* which will be replaced with the supplied username value before the
* name is used for authentication.
* Note that if this option does not contain a distinguished name then
- * the <code>userFilter</code> option must also be specified. </dd>
+ * the {@code userFilter} option must also be specified. </dd>
*
* <dt> <code>authzIdentity=<b>authz_id</b></code> </dt>
* <dd> This option specifies an authorization identity for the user.
- * <code><b>authz_id</b></code> is any string name.
+ * <b>{@code authz_id}</b> is any string name.
* If it comprises a single special token with curly braces then
* that token is treated as a attribute name and will be replaced with a
* single value of that attribute from the user's LDAP entry.
@@ -156,23 +156,23 @@ import com.sun.security.auth.UserPrincipal;
* is created using the authorization identity and it is associated with
* the current {@link Subject}. </dd>
*
- * <dt> <code>useSSL</code> </dt>
- * <dd> if <code>false</code>, this module does not establish an SSL connection
+ * <dt> {@code useSSL} </dt>
+ * <dd> if {@code false}, this module does not establish an SSL connection
* to the LDAP server before attempting authentication. SSL is used to
* protect the privacy of the user's password because it is transmitted
* in the clear over LDAP.
* By default, this module uses SSL. </dd>
*
- * <dt> <code>useFirstPass</code> </dt>
- * <dd> if <code>true</code>, this module retrieves the username and password
+ * <dt> {@code useFirstPass} </dt>
+ * <dd> if {@code true}, this module retrieves the username and password
* from the module's shared state, using "javax.security.auth.login.name"
* and "javax.security.auth.login.password" as the respective keys. The
* retrieved values are used for authentication. If authentication fails,
* no attempt for a retry is made, and the failure is reported back to
* the calling application.</dd>
*
- * <dt> <code>tryFirstPass</code> </dt>
- * <dd> if <code>true</code>, this module retrieves the username and password
+ * <dt> {@code tryFirstPass} </dt>
+ * <dd> if {@code true}, this module retrieves the username and password
* from the module's shared state, using "javax.security.auth.login.name"
* and "javax.security.auth.login.password" as the respective keys. The
* retrieved values are used for authentication. If authentication fails,
@@ -181,8 +181,8 @@ import com.sun.security.auth.UserPrincipal;
* authentication fails, the failure is reported back to the calling
* application.</dd>
*
- * <dt> <code>storePass</code> </dt>
- * <dd> if <code>true</code>, this module stores the username and password
+ * <dt> {@code storePass} </dt>
+ * <dd> if {@code true}, this module stores the username and password
* obtained from the {@link CallbackHandler} in the module's shared state,
* using
* "javax.security.auth.login.name" and
@@ -190,13 +190,13 @@ import com.sun.security.auth.UserPrincipal;
* not performed if existing values already exist for the username and
* password in the shared state, or if authentication fails.</dd>
*
- * <dt> <code>clearPass</code> </dt>
- * <dd> if <code>true</code>, this module clears the username and password
+ * <dt> {@code clearPass} </dt>
+ * <dd> if {@code true}, this module clears the username and password
* stored in the module's shared state after both phases of authentication
* (login and commit) have completed.</dd>
*
- * <dt> <code>debug</code> </dt>
- * <dd> if <code>true</code>, debug messages are displayed on the standard
+ * <dt> {@code debug} </dt>
+ * <dd> if {@code true}, debug messages are displayed on the standard
* output stream.
* </dl>
* </dl>
@@ -209,36 +209,36 @@ import com.sun.security.auth.UserPrincipal;
* Note that the following four JNDI properties are set by this module directly
* and are ignored if also present in the configuration:
* <ul>
- * <li> <code>java.naming.provider.url</code>
- * <li> <code>java.naming.security.principal</code>
- * <li> <code>java.naming.security.credentials</code>
- * <li> <code>java.naming.security.protocol</code>
+ * <li> {@code java.naming.provider.url}
+ * <li> {@code java.naming.security.principal}
+ * <li> {@code java.naming.security.credentials}
+ * <li> {@code java.naming.security.protocol}
* </ul>
*
* <p>
* Three sample {@link Configuration}s are shown below.
* The first one activates search-first mode. It identifies the LDAP server
- * and specifies that users' entries be located by their <code>uid</code> and
- * <code>objectClass</code> attributes. It also specifies that an identity
- * based on the user's <code>employeeNumber</code> attribute should be created.
+ * and specifies that users' entries be located by their {@code uid} and
+ * {@code objectClass} attributes. It also specifies that an identity
+ * based on the user's {@code employeeNumber} attribute should be created.
* The second one activates authentication-first mode. It requests that the
* LDAP server be located dynamically, that authentication be performed using
* the supplied username directly but without the protection of SSL and that
* users' entries be located by one of three naming attributes and their
- * <code>objectClass</code> attribute.
+ * {@code objectClass} attribute.
* The third one activates authentication-only mode. It identifies alternative
* LDAP servers, it specifies the distinguished name to use for
* authentication and a fixed identity to use for authorization. No directory
* search is performed.
*
- * <pre>
+ * <pre>{@literal
*
* ExampleApplication {
* com.sun.security.auth.module.LdapLoginModule REQUIRED
- * userProvider="ldap://ldap-svr/ou=people,dc=example,dc=com"
- * userFilter="(&(uid={USERNAME})(objectClass=inetOrgPerson))"
- * authzIdentity="{EMPLOYEENUMBER}"
- * debug=true;
+ * userProvider="ldap://ldap-svr/ou=people,dc=example,dc=com"
+ * userFilter="(&(uid={USERNAME})(objectClass=inetOrgPerson))"
+ * authzIdentity="{EMPLOYEENUMBER}"
+ * debug=true;
* };
*
* ExampleApplication {
@@ -258,7 +258,7 @@ import com.sun.security.auth.UserPrincipal;
* debug=true;
* };
*
- * </pre>
+ * }</pre>
*
* <dl>
* <dt><b>Note:</b> </dt>
@@ -282,7 +282,6 @@ import com.sun.security.auth.UserPrincipal;
* <em>caller-specified</em> {@link Configuration} then the application
* must be granted the permissions required by the {@link LoginModule}.
* <em>This</em> module requires the following two permissions:
- * <p>
* <ul>
* <li> The {@link SocketPermission} to connect to an LDAP server.
* <li> The {@link AuthPermission} to modify the set of {@link Principal}s
@@ -373,15 +372,15 @@ public class LdapLoginModule implements LoginModule {
private SearchControls constraints = null;
/**
- * Initialize this <code>LoginModule</code>.
+ * Initialize this {@code LoginModule}.
*
- * @param subject the <code>Subject</code> to be authenticated.
- * @param callbackHandler a <code>CallbackHandler</code> to acquire the
+ * @param subject the {@code Subject} to be authenticated.
+ * @param callbackHandler a {@code CallbackHandler} to acquire the
* username and password.
- * @param sharedState shared <code>LoginModule</code> state.
+ * @param sharedState shared {@code LoginModule} state.
* @param options options specified in the login
- * <code>Configuration</code> for this particular
- * <code>LoginModule</code>.
+ * {@code Configuration} for this particular
+ * {@code LoginModule}.
*/
// Unchecked warning from (Map<String, Object>)sharedState is safe
// since javax.security.auth.login.LoginContext passes a raw HashMap.
@@ -492,10 +491,10 @@ public class LdapLoginModule implements LoginModule {
* <p> Acquire the user's credentials and verify them against the
* specified LDAP directory.
*
- * @return true always, since this <code>LoginModule</code>
+ * @return true always, since this {@code LoginModule}
* should not be ignored.
* @exception FailedLoginException if the authentication fails.
- * @exception LoginException if this <code>LoginModule</code>
+ * @exception LoginException if this {@code LoginModule}
* is unable to perform the authentication.
*/
public boolean login() throws LoginException {
@@ -593,10 +592,10 @@ public class LdapLoginModule implements LoginModule {
*
* <p> If this LoginModule's own authentication attempt
* succeeded (checked by retrieving the private state saved by the
- * <code>login</code> method), then this method associates an
- * <code>LdapPrincipal</code> and one or more <code>UserPrincipal</code>s
- * with the <code>Subject</code> located in the
- * <code>LoginModule</code>. If this LoginModule's own
+ * {@code login} method), then this method associates an
+ * {@code LdapPrincipal} and one or more {@code UserPrincipal}s
+ * with the {@code Subject} located in the
+ * {@code LoginModule}. If this LoginModule's own
* authentication attempted failed, then this method removes
* any state that was originally saved.
*
@@ -662,7 +661,7 @@ public class LdapLoginModule implements LoginModule {
*
* <p> If this LoginModule's own authentication attempt
* succeeded (checked by retrieving the private state saved by the
- * <code>login</code> and <code>commit</code> methods),
+ * {@code login} and {@code commit} methods),
* then this method cleans up any state that was originally saved.
*
* @exception LoginException if the abort fails.
@@ -697,10 +696,10 @@ public class LdapLoginModule implements LoginModule {
* Logout a user.
*
* <p> This method removes the Principals
- * that were added by the <code>commit</code> method.
+ * that were added by the {@code commit} method.
*
* @exception LoginException if the logout fails.
- * @return true in all cases since this <code>LoginModule</code>
+ * @return true in all cases since this {@code LoginModule}
* should not be ignored.
*/
public boolean logout() throws LoginException {
diff --git a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/NTLoginModule.java b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/NTLoginModule.java
index d228b0550f2..828b5b9f748 100644
--- a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/NTLoginModule.java
+++ b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/NTLoginModule.java
@@ -41,10 +41,10 @@ import com.sun.security.auth.NTSidGroupPrincipal;
import com.sun.security.auth.NTNumericCredential;
/**
- * <p> This <code>LoginModule</code>
+ * This {@code LoginModule}
* renders a user's NT security information as some number of
- * <code>Principal</code>s
- * and associates them with a <code>Subject</code>.
+ * {@code Principal}s
+ * and associates them with a {@code Subject}.
*
* <p> This LoginModule recognizes the debug option.
* If set to true in the login Configuration,
@@ -85,23 +85,21 @@ public class NTLoginModule implements LoginModule {
private NTNumericCredential iToken; // impersonation token
/**
- * Initialize this <code>LoginModule</code>.
+ * Initialize this {@code LoginModule}.
*
- * <p>
+ * @param subject the {@code Subject} to be authenticated.
*
- * @param subject the <code>Subject</code> to be authenticated. <p>
- *
- * @param callbackHandler a <code>CallbackHandler</code> for communicating
+ * @param callbackHandler a {@code CallbackHandler} for communicating
* with the end user (prompting for usernames and
* passwords, for example). This particular LoginModule only
* extracts the underlying NT system information, so this
- * parameter is ignored.<p>
+ * parameter is ignored.
*
- * @param sharedState shared <code>LoginModule</code> state. <p>
+ * @param sharedState shared {@code LoginModule} state.
*
* @param options options specified in the login
- * <code>Configuration</code> for this particular
- * <code>LoginModule</code>.
+ * {@code Configuration} for this particular
+ * {@code LoginModule}.
*/
public void initialize(Subject subject, CallbackHandler callbackHandler,
Map<String,?> sharedState,
@@ -125,14 +123,12 @@ public class NTLoginModule implements LoginModule {
/**
* Import underlying NT system identity information.
*
- * <p>
- *
- * @return true in all cases since this <code>LoginModule</code>
+ * @return true in all cases since this {@code LoginModule}
* should not be ignored.
*
- * @exception FailedLoginException if the authentication fails. <p>
+ * @exception FailedLoginException if the authentication fails.
*
- * @exception LoginException if this <code>LoginModule</code>
+ * @exception LoginException if this {@code LoginModule}
* is unable to perform the authentication.
*/
public boolean login() throws LoginException {
@@ -221,22 +217,20 @@ public class NTLoginModule implements LoginModule {
}
/**
- * <p> This method is called if the LoginContext's
+ * This method is called if the LoginContext's
* overall authentication succeeded
* (the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules
* succeeded).
*
* <p> If this LoginModule's own authentication attempt
* succeeded (checked by retrieving the private state saved by the
- * <code>login</code> method), then this method associates some
- * number of various <code>Principal</code>s
- * with the <code>Subject</code> located in the
- * <code>LoginModuleContext</code>. If this LoginModule's own
+ * {@code login} method), then this method associates some
+ * number of various {@code Principal}s
+ * with the {@code Subject} located in the
+ * {@code LoginModuleContext}. If this LoginModule's own
* authentication attempted failed, then this method removes
* any state that was originally saved.
*
- * <p>
- *
* @exception LoginException if the commit fails.
*
* @return true if this LoginModule's own login and commit
@@ -290,18 +284,16 @@ public class NTLoginModule implements LoginModule {
/**
- * <p> This method is called if the LoginContext's
+ * This method is called if the LoginContext's
* overall authentication failed.
* (the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules
* did not succeed).
*
* <p> If this LoginModule's own authentication attempt
* succeeded (checked by retrieving the private state saved by the
- * <code>login</code> and <code>commit</code> methods),
+ * {@code login} and {@code commit} methods),
* then this method cleans up any state that was originally saved.
*
- * <p>
- *
* @exception LoginException if the abort fails.
*
* @return false if this LoginModule's own login and/or commit attempts
@@ -336,17 +328,15 @@ public class NTLoginModule implements LoginModule {
/**
* Logout the user.
*
- * <p> This method removes the <code>NTUserPrincipal</code>,
- * <code>NTDomainPrincipal</code>, <code>NTSidUserPrincipal</code>,
- * <code>NTSidDomainPrincipal</code>, <code>NTSidGroupPrincipal</code>s,
- * and <code>NTSidPrimaryGroupPrincipal</code>
- * that may have been added by the <code>commit</code> method.
- *
- * <p>
+ * <p> This method removes the {@code NTUserPrincipal},
+ * {@code NTDomainPrincipal}, {@code NTSidUserPrincipal},
+ * {@code NTSidDomainPrincipal}, {@code NTSidGroupPrincipal}s,
+ * and {@code NTSidPrimaryGroupPrincipal}
+ * that may have been added by the {@code commit} method.
*
* @exception LoginException if the logout fails.
*
- * @return true in all cases since this <code>LoginModule</code>
+ * @return true in all cases since this {@code LoginModule}
* should not be ignored.
*/
public boolean logout() throws LoginException {
diff --git a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/NTSystem.java b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/NTSystem.java
index 0a51492d620..54fa4c23348 100644
--- a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/NTSystem.java
+++ b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/NTSystem.java
@@ -26,7 +26,7 @@
package com.sun.security.auth.module;
/**
- * <p> This class implementation retrieves and makes available NT
+ * This class implementation retrieves and makes available NT
* security information for the current user.
*
*/
@@ -45,7 +45,7 @@ public class NTSystem {
private long impersonationToken;
/**
- * Instantiate an <code>NTSystem</code> and load
+ * Instantiate an {@code NTSystem} and load
* the native library to access the underlying system information.
*/
public NTSystem() {
@@ -53,7 +53,7 @@ public class NTSystem {
}
/**
- * Instantiate an <code>NTSystem</code> and load
+ * Instantiate an {@code NTSystem} and load
* the native library to access the underlying system information.
*/
NTSystem(boolean debug) {
@@ -64,8 +64,6 @@ public class NTSystem {
/**
* Get the username for the current NT user.
*
- * <p>
- *
* @return the username for the current NT user.
*/
public String getName() {
@@ -75,8 +73,6 @@ public class NTSystem {
/**
* Get the domain for the current NT user.
*
- * <p>
- *
* @return the domain for the current NT user.
*/
public String getDomain() {
@@ -86,8 +82,6 @@ public class NTSystem {
/**
* Get a printable SID for the current NT user's domain.
*
- * <p>
- *
* @return a printable SID for the current NT user's domain.
*/
public String getDomainSID() {
@@ -97,8 +91,6 @@ public class NTSystem {
/**
* Get a printable SID for the current NT user.
*
- * <p>
- *
* @return a printable SID for the current NT user.
*/
public String getUserSID() {
@@ -108,8 +100,6 @@ public class NTSystem {
/**
* Get a printable primary group SID for the current NT user.
*
- * <p>
- *
* @return the primary group SID for the current NT user.
*/
public String getPrimaryGroupID() {
@@ -119,8 +109,6 @@ public class NTSystem {
/**
* Get the printable group SIDs for the current NT user.
*
- * <p>
- *
* @return the group SIDs for the current NT user.
*/
public String[] getGroupIDs() {
@@ -130,8 +118,6 @@ public class NTSystem {
/**
* Get an impersonation token for the current NT user.
*
- * <p>
- *
* @return an impersonation token for the current NT user.
*/
public synchronized long getImpersonationToken() {
diff --git a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/SolarisLoginModule.java b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/SolarisLoginModule.java
index 0b71ac4ce77..9b5adb0c3cf 100644
--- a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/SolarisLoginModule.java
+++ b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/SolarisLoginModule.java
@@ -36,17 +36,17 @@ import com.sun.security.auth.SolarisNumericUserPrincipal;
import com.sun.security.auth.SolarisNumericGroupPrincipal;
/**
- * <p> This <code>LoginModule</code> imports a user's Solaris
- * <code>Principal</code> information (<code>SolarisPrincipal</code>,
- * <code>SolarisNumericUserPrincipal</code>,
- * and <code>SolarisNumericGroupPrincipal</code>)
- * and associates them with the current <code>Subject</code>.
+ * This {@code LoginModule} imports a user's Solaris
+ * {@code Principal} information ({@code SolarisPrincipal},
+ * {@code SolarisNumericUserPrincipal},
+ * and {@code SolarisNumericGroupPrincipal})
+ * and associates them with the current {@code Subject}.
*
* <p> This LoginModule recognizes the debug option.
* If set to true in the login Configuration,
* debug messages will be output to the output stream, System.out.
* @deprecated As of JDK1.4, replaced by
- * <code>com.sun.security.auth.module.UnixLoginModule</code>.
+ * {@code com.sun.security.auth.module.UnixLoginModule}.
* This LoginModule is entirely deprecated and
* is here to allow for a smooth transition to the new
* UnixLoginModule.
@@ -80,21 +80,19 @@ public class SolarisLoginModule implements LoginModule {
new LinkedList<>();
/**
- * Initialize this <code>LoginModule</code>.
+ * Initialize this {@code LoginModule}.
*
- * <p>
+ * @param subject the {@code Subject} to be authenticated.
*
- * @param subject the <code>Subject</code> to be authenticated. <p>
- *
- * @param callbackHandler a <code>CallbackHandler</code> for communicating
+ * @param callbackHandler a {@code CallbackHandler} for communicating
* with the end user (prompting for usernames and
- * passwords, for example). <p>
+ * passwords, for example).
*
- * @param sharedState shared <code>LoginModule</code> state. <p>
+ * @param sharedState shared {@code LoginModule} state.
*
* @param options options specified in the login
- * <code>Configuration</code> for this particular
- * <code>LoginModule</code>.
+ * {@code Configuration} for this particular
+ * {@code LoginModule}.
*/
public void initialize(Subject subject, CallbackHandler callbackHandler,
Map<String,?> sharedState,
@@ -114,15 +112,13 @@ public class SolarisLoginModule implements LoginModule {
* Authenticate the user (first phase).
*
* <p> The implementation of this method attempts to retrieve the user's
- * Solaris <code>Subject</code> information by making a native Solaris
+ * Solaris {@code Subject} information by making a native Solaris
* system call.
*
- * <p>
- *
* @exception FailedLoginException if attempts to retrieve the underlying
* system information fail.
*
- * @return true in all cases (this <code>LoginModule</code>
+ * @return true in all cases (this {@code LoginModule}
* should not be ignored).
*/
public boolean login() throws LoginException {
@@ -175,13 +171,11 @@ public class SolarisLoginModule implements LoginModule {
* <p> If this LoginModule's own authentication attempt
* succeeded (the importing of the Solaris authentication information
* succeeded), then this method associates the Solaris Principals
- * with the <code>Subject</code> currently tied to the
- * <code>LoginModule</code>. If this LoginModule's
+ * with the {@code Subject} currently tied to the
+ * {@code LoginModule}. If this LoginModule's
* authentication attempted failed, then this method removes
* any state that was originally saved.
*
- * <p>
- *
* @exception LoginException if the commit fails
*
* @return true if this LoginModule's own login and commit attempts
@@ -232,10 +226,8 @@ public class SolarisLoginModule implements LoginModule {
* did not succeed).
*
* <p> This method cleans up any state that was originally saved
- * as part of the authentication attempt from the <code>login</code>
- * and <code>commit</code> methods.
- *
- * <p>
+ * as part of the authentication attempt from the {@code login}
+ * and {@code commit} methods.
*
* @exception LoginException if the abort fails
*
@@ -272,13 +264,11 @@ public class SolarisLoginModule implements LoginModule {
* Logout the user
*
* <p> This method removes the Principals associated
- * with the <code>Subject</code>.
- *
- * <p>
+ * with the {@code Subject}.
*
* @exception LoginException if the logout fails
*
- * @return true in all cases (this <code>LoginModule</code>
+ * @return true in all cases (this {@code LoginModule}
* should not be ignored).
*/
public boolean logout() throws LoginException {
diff --git a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/SolarisSystem.java b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/SolarisSystem.java
index f06f28c22dd..98f6f4c70a0 100644
--- a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/SolarisSystem.java
+++ b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/SolarisSystem.java
@@ -26,7 +26,7 @@
package com.sun.security.auth.module;
/**
- * <p> This class implementation retrieves and makes available Solaris
+ * This class implementation retrieves and makes available Solaris
* UID/GID/groups information for the current user.
*
* @deprecated replaced by {@link UnixSystem}.
@@ -43,7 +43,7 @@ public class SolarisSystem {
protected long[] groups;
/**
- * Instantiate a <code>SolarisSystem</code> and load
+ * Instantiate a {@code SolarisSystem} and load
* the native library to access the underlying system information.
*/
public SolarisSystem() {
@@ -54,8 +54,6 @@ public class SolarisSystem {
/**
* Get the username for the current Solaris user.
*
- * <p>
- *
* @return the username for the current Solaris user.
*/
public String getUsername() {
@@ -65,8 +63,6 @@ public class SolarisSystem {
/**
* Get the UID for the current Solaris user.
*
- * <p>
- *
* @return the UID for the current Solaris user.
*/
public long getUid() {
@@ -76,8 +72,6 @@ public class SolarisSystem {
/**
* Get the GID for the current Solaris user.
*
- * <p>
- *
* @return the GID for the current Solaris user.
*/
public long getGid() {
@@ -87,8 +81,6 @@ public class SolarisSystem {
/**
* Get the supplementary groups for the current Solaris user.
*
- * <p>
- *
* @return the supplementary groups for the current Solaris user.
*/
public long[] getGroups() {
diff --git a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/UnixLoginModule.java b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/UnixLoginModule.java
index 8123ba68e9d..704b11dc33c 100644
--- a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/UnixLoginModule.java
+++ b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/UnixLoginModule.java
@@ -36,11 +36,11 @@ import com.sun.security.auth.UnixNumericUserPrincipal;
import com.sun.security.auth.UnixNumericGroupPrincipal;
/**
- * <p> This <code>LoginModule</code> imports a user's Unix
- * <code>Principal</code> information (<code>UnixPrincipal</code>,
- * <code>UnixNumericUserPrincipal</code>,
- * and <code>UnixNumericGroupPrincipal</code>)
- * and associates them with the current <code>Subject</code>.
+ * This {@code LoginModule} imports a user's Unix
+ * {@code Principal} information ({@code UnixPrincipal},
+ * {@code UnixNumericUserPrincipal},
+ * and {@code UnixNumericGroupPrincipal})
+ * and associates them with the current {@code Subject}.
*
* <p> This LoginModule recognizes the debug option.
* If set to true in the login Configuration,
@@ -74,21 +74,19 @@ public class UnixLoginModule implements LoginModule {
new LinkedList<>();
/**
- * Initialize this <code>LoginModule</code>.
+ * Initialize this {@code LoginModule}.
*
- * <p>
+ * @param subject the {@code Subject} to be authenticated.
*
- * @param subject the <code>Subject</code> to be authenticated. <p>
- *
- * @param callbackHandler a <code>CallbackHandler</code> for communicating
+ * @param callbackHandler a {@code CallbackHandler} for communicating
* with the end user (prompting for usernames and
- * passwords, for example). <p>
+ * passwords, for example).
*
- * @param sharedState shared <code>LoginModule</code> state. <p>
+ * @param sharedState shared {@code LoginModule} state.
*
* @param options options specified in the login
- * <code>Configuration</code> for this particular
- * <code>LoginModule</code>.
+ * {@code Configuration} for this particular
+ * {@code LoginModule}.
*/
public void initialize(Subject subject, CallbackHandler callbackHandler,
Map<String,?> sharedState,
@@ -107,15 +105,13 @@ public class UnixLoginModule implements LoginModule {
* Authenticate the user (first phase).
*
* <p> The implementation of this method attempts to retrieve the user's
- * Unix <code>Subject</code> information by making a native Unix
+ * Unix {@code Subject} information by making a native Unix
* system call.
*
- * <p>
- *
* @exception FailedLoginException if attempts to retrieve the underlying
* system information fail.
*
- * @return true in all cases (this <code>LoginModule</code>
+ * @return true in all cases (this {@code LoginModule}
* should not be ignored).
*/
public boolean login() throws LoginException {
@@ -169,13 +165,11 @@ public class UnixLoginModule implements LoginModule {
* <p> If this LoginModule's own authentication attempt
* succeeded (the importing of the Unix authentication information
* succeeded), then this method associates the Unix Principals
- * with the <code>Subject</code> currently tied to the
- * <code>LoginModule</code>. If this LoginModule's
+ * with the {@code Subject} currently tied to the
+ * {@code LoginModule}. If this LoginModule's
* authentication attempted failed, then this method removes
* any state that was originally saved.
*
- * <p>
- *
* @exception LoginException if the commit fails
*
* @return true if this LoginModule's own login and commit attempts
@@ -228,10 +222,8 @@ public class UnixLoginModule implements LoginModule {
* did not succeed).
*
* <p> This method cleans up any state that was originally saved
- * as part of the authentication attempt from the <code>login</code>
- * and <code>commit</code> methods.
- *
- * <p>
+ * as part of the authentication attempt from the {@code login}
+ * and {@code commit} methods.
*
* @exception LoginException if the abort fails
*
@@ -267,13 +259,11 @@ public class UnixLoginModule implements LoginModule {
* Logout the user
*
* <p> This method removes the Principals associated
- * with the <code>Subject</code>.
- *
- * <p>
+ * with the {@code Subject}.
*
* @exception LoginException if the logout fails
*
- * @return true in all cases (this <code>LoginModule</code>
+ * @return true in all cases (this {@code LoginModule}
* should not be ignored).
*/
public boolean logout() throws LoginException {
diff --git a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/UnixSystem.java b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/UnixSystem.java
index f969ae1dd10..43f93f78e82 100644
--- a/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/UnixSystem.java
+++ b/jdk/src/jdk.security.auth/share/classes/com/sun/security/auth/module/UnixSystem.java
@@ -26,9 +26,8 @@
package com.sun.security.auth.module;
/**
- * <p> This class implementation retrieves and makes available Unix
+ * This class implementation retrieves and makes available Unix
* UID/GID/groups information for the current user.
- *
*/
@jdk.Exported
public class UnixSystem {
@@ -41,7 +40,7 @@ public class UnixSystem {
protected long[] groups;
/**
- * Instantiate a <code>UnixSystem</code> and load
+ * Instantiate a {@code UnixSystem} and load
* the native library to access the underlying system information.
*/
public UnixSystem() {
@@ -52,8 +51,6 @@ public class UnixSystem {
/**
* Get the username for the current Unix user.
*
- * <p>
- *
* @return the username for the current Unix user.
*/
public String getUsername() {
@@ -63,8 +60,6 @@ public class UnixSystem {
/**
* Get the UID for the current Unix user.
*
- * <p>
- *
* @return the UID for the current Unix user.
*/
public long getUid() {
@@ -74,8 +69,6 @@ public class UnixSystem {
/**
* Get the GID for the current Unix user.
*
- * <p>
- *
* @return the GID for the current Unix user.
*/
public long getGid() {
@@ -85,8 +78,6 @@ public class UnixSystem {
/**
* Get the supplementary groups for the current Unix user.
*
- * <p>
- *
* @return the supplementary groups for the current Unix user.
*/
public long[] getGroups() {
diff --git a/jdk/test/TEST.ROOT b/jdk/test/TEST.ROOT
index cf9bdb246ff..76e0c407cba 100644
--- a/jdk/test/TEST.ROOT
+++ b/jdk/test/TEST.ROOT
@@ -1,8 +1,15 @@
# This file identifies the root of the test-suite hierarchy.
# It also contains test-suite configuration information.
-# The list of keywords supported in the entire test suite
-keys=2d dnd i18n intermittent
+# The list of keywords supported in the entire test suite. The
+# "intermittent" keyword marks tests known to fail intermittently.
+# The "randomness" keyword marks tests using randomness with test
+# cases differing from run to run. (A test using a fixed random seed
+# would not count as "randomness" by this definition.) Extra care
+# should be taken to handle test failures of intermittent or
+# randomness tests.
+
+keys=2d dnd i18n intermittent randomness
# Tests that must run in othervm mode
othervm.dirs=java/awt java/beans javax/accessibility javax/imageio javax/sound javax/print javax/management com/sun/awt sun/awt sun/java2d sun/pisces javax/xml/jaxp/testng/validation
diff --git a/jdk/test/com/oracle/security/ucrypto/CipherSignNotSupported.java b/jdk/test/com/oracle/security/ucrypto/CipherSignNotSupported.java
index bf463227ed3..7e141b615b5 100644
--- a/jdk/test/com/oracle/security/ucrypto/CipherSignNotSupported.java
+++ b/jdk/test/com/oracle/security/ucrypto/CipherSignNotSupported.java
@@ -27,6 +27,7 @@
* @summary Make sure signing via encrypt and verifying via decrypt are not
* supported by OracleUcrypto provider.
* @author Anthony Scarpino
+ * @key randomness
*/
import java.util.Random;
diff --git a/jdk/test/com/oracle/security/ucrypto/TestAES.java b/jdk/test/com/oracle/security/ucrypto/TestAES.java
index 61594f381c0..4ed48659c86 100644
--- a/jdk/test/com/oracle/security/ucrypto/TestAES.java
+++ b/jdk/test/com/oracle/security/ucrypto/TestAES.java
@@ -25,6 +25,7 @@
* @test
* @bug 7088989 8014374
* @summary Ensure the AES ciphers of OracleUcrypto provider works correctly
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/com/oracle/security/ucrypto/TestCICOWithGCM.java b/jdk/test/com/oracle/security/ucrypto/TestCICOWithGCM.java
index f12ee740a1a..3191fd8b321 100644
--- a/jdk/test/com/oracle/security/ucrypto/TestCICOWithGCM.java
+++ b/jdk/test/com/oracle/security/ucrypto/TestCICOWithGCM.java
@@ -26,6 +26,7 @@
* @bug 8014374
* @summary Test basic CipherInputStream/OutputStream func w/ GCM mode.
* @author Valerie Peng
+ * @key randomness
*/
import java.security.*;
diff --git a/jdk/test/com/oracle/security/ucrypto/TestCICOWithGCMAndAAD.java b/jdk/test/com/oracle/security/ucrypto/TestCICOWithGCMAndAAD.java
index 782cea6145e..6075672dbcb 100644
--- a/jdk/test/com/oracle/security/ucrypto/TestCICOWithGCMAndAAD.java
+++ b/jdk/test/com/oracle/security/ucrypto/TestCICOWithGCMAndAAD.java
@@ -26,6 +26,7 @@
* @bug 8014374
* @summary Test CipherInputStream/OutputStream func w/ GCM mode and AAD.
* @author Valerie Peng
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/com/oracle/security/ucrypto/TestDigest.java b/jdk/test/com/oracle/security/ucrypto/TestDigest.java
index a9057ba3c87..5bd6f412f29 100644
--- a/jdk/test/com/oracle/security/ucrypto/TestDigest.java
+++ b/jdk/test/com/oracle/security/ucrypto/TestDigest.java
@@ -25,6 +25,7 @@
* @test
* @bug 7088989
* @summary Ensure the various message digests works correctly
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/com/oracle/security/ucrypto/TestGCMKeyWrap.java b/jdk/test/com/oracle/security/ucrypto/TestGCMKeyWrap.java
index 89d5e02efbd..c64367ab46e 100644
--- a/jdk/test/com/oracle/security/ucrypto/TestGCMKeyWrap.java
+++ b/jdk/test/com/oracle/security/ucrypto/TestGCMKeyWrap.java
@@ -25,6 +25,7 @@
* @test
* @bug 8014374
* @summary Ensure key wrap/unwrap works using AES/GCM/NoPadding
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/com/sun/crypto/provider/Cipher/AES/CICO.java b/jdk/test/com/sun/crypto/provider/Cipher/AES/CICO.java
index 811724be8ce..1bb9f0d061f 100644
--- a/jdk/test/com/sun/crypto/provider/Cipher/AES/CICO.java
+++ b/jdk/test/com/sun/crypto/provider/Cipher/AES/CICO.java
@@ -44,6 +44,7 @@ import javax.crypto.spec.IvParameterSpec;
* @summary Test AES ciphers with different modes and padding schemes (ECB mode
* doesn't use IV). The test tries 3 different read methods of
* CipherInputStream.
+ * @key randomness
*/
public class CICO {
private static final String ALGORITHM = "aEs";
diff --git a/jdk/test/com/sun/crypto/provider/Cipher/AES/CTR.java b/jdk/test/com/sun/crypto/provider/Cipher/AES/CTR.java
index 808f3e26916..d569965bca1 100644
--- a/jdk/test/com/sun/crypto/provider/Cipher/AES/CTR.java
+++ b/jdk/test/com/sun/crypto/provider/Cipher/AES/CTR.java
@@ -43,6 +43,7 @@ import javax.crypto.spec.IvParameterSpec;
* @bug 8043836
* @summary Test AES ciphers with 4 different modes with NoPadding. Check if
* data before encryption and after decryption is the same.
+ * @key randomness
*/
public class CTR {
diff --git a/jdk/test/com/sun/crypto/provider/Cipher/AES/Padding.java b/jdk/test/com/sun/crypto/provider/Cipher/AES/Padding.java
index 6023ec7cc67..9185efdf02c 100644
--- a/jdk/test/com/sun/crypto/provider/Cipher/AES/Padding.java
+++ b/jdk/test/com/sun/crypto/provider/Cipher/AES/Padding.java
@@ -42,6 +42,7 @@ import javax.crypto.spec.IvParameterSpec;
* @summary Test AES ciphers with different modes and padding schemes (ECB mode
* doesn't use IV). The test tries 3 different read methods of
* CipherInputStream.
+ * @key randomness
*/
public class Padding {
diff --git a/jdk/test/com/sun/crypto/provider/Cipher/AES/Test4513830.java b/jdk/test/com/sun/crypto/provider/Cipher/AES/Test4513830.java
index d3ecc9e27bf..c421b169c4a 100644
--- a/jdk/test/com/sun/crypto/provider/Cipher/AES/Test4513830.java
+++ b/jdk/test/com/sun/crypto/provider/Cipher/AES/Test4513830.java
@@ -27,6 +27,7 @@
* @summary Verify the output size returned by AES cipher.getOutputSize
* method in DECRYPT mode does not add extra bytes for padding
* @author Valerie Peng
+ * @key randomness
*/
import java.io.PrintStream;
import java.security.*;
diff --git a/jdk/test/com/sun/crypto/provider/Cipher/AES/Test4517355.java b/jdk/test/com/sun/crypto/provider/Cipher/AES/Test4517355.java
index a4716482918..7ea6b8316f8 100644
--- a/jdk/test/com/sun/crypto/provider/Cipher/AES/Test4517355.java
+++ b/jdk/test/com/sun/crypto/provider/Cipher/AES/Test4517355.java
@@ -27,6 +27,7 @@
* @summary Verify that AES cipher.doFinal method does NOT need more
* than necessary bytes in decrypt mode
* @author Valerie Peng
+ * @key randomness
*/
import java.io.PrintStream;
import java.security.*;
diff --git a/jdk/test/com/sun/crypto/provider/Cipher/AES/TestAESCipher.java b/jdk/test/com/sun/crypto/provider/Cipher/AES/TestAESCipher.java
index 190b58630cc..0ea8d01bc92 100644
--- a/jdk/test/com/sun/crypto/provider/Cipher/AES/TestAESCipher.java
+++ b/jdk/test/com/sun/crypto/provider/Cipher/AES/TestAESCipher.java
@@ -43,6 +43,7 @@ import javax.crypto.spec.IvParameterSpec;
* doesn't use IV).
* @author Liwen Wang
* @author Parag Salvi
+ * @key randomness
*/
public class TestAESCipher {
diff --git a/jdk/test/com/sun/crypto/provider/Cipher/AES/TestCICOWithGCM.java b/jdk/test/com/sun/crypto/provider/Cipher/AES/TestCICOWithGCM.java
index 8fec041d0a9..1d5e5abbb62 100644
--- a/jdk/test/com/sun/crypto/provider/Cipher/AES/TestCICOWithGCM.java
+++ b/jdk/test/com/sun/crypto/provider/Cipher/AES/TestCICOWithGCM.java
@@ -29,6 +29,7 @@
* @run main TestCICOWithGCM
* @summary Test CipherInputStream/OutputStream with AES GCM mode.
* @author Valerie Peng
+ * @key randomness
*/
import java.security.*;
diff --git a/jdk/test/com/sun/crypto/provider/Cipher/AES/TestCICOWithGCMAndAAD.java b/jdk/test/com/sun/crypto/provider/Cipher/AES/TestCICOWithGCMAndAAD.java
index 816f764f9ba..edc43d61ae3 100644
--- a/jdk/test/com/sun/crypto/provider/Cipher/AES/TestCICOWithGCMAndAAD.java
+++ b/jdk/test/com/sun/crypto/provider/Cipher/AES/TestCICOWithGCMAndAAD.java
@@ -29,6 +29,7 @@
* @run main TestCICOWithGCMAndAAD
* @summary Test CipherInputStream/OutputStream with AES GCM mode with AAD.
* @author Valerie Peng
+ * @key randomness
*/
import java.io.*;
import java.security.*;
diff --git a/jdk/test/com/sun/crypto/provider/Cipher/AES/TestISO10126Padding.java b/jdk/test/com/sun/crypto/provider/Cipher/AES/TestISO10126Padding.java
index edb62cb2b1f..926320393dd 100644
--- a/jdk/test/com/sun/crypto/provider/Cipher/AES/TestISO10126Padding.java
+++ b/jdk/test/com/sun/crypto/provider/Cipher/AES/TestISO10126Padding.java
@@ -26,6 +26,7 @@
* @bug 4921443
* @summary Ensure ISO10126Padding works correctly.
* @author Valerie Peng
+ * @key randomness
*/
import java.util.Arrays;
import java.security.*;
diff --git a/jdk/test/com/sun/crypto/provider/Cipher/AES/TestNonexpanding.java b/jdk/test/com/sun/crypto/provider/Cipher/AES/TestNonexpanding.java
index 200d38b547b..3ed865f5a98 100644
--- a/jdk/test/com/sun/crypto/provider/Cipher/AES/TestNonexpanding.java
+++ b/jdk/test/com/sun/crypto/provider/Cipher/AES/TestNonexpanding.java
@@ -40,6 +40,7 @@ import javax.crypto.spec.GCMParameterSpec;
* @bug 8043836
* @summary Test AES encryption with no padding. Expect the original data length
* is the same as the encrypted data.
+ * @key randomness
*/
public class TestNonexpanding {
diff --git a/jdk/test/com/sun/crypto/provider/Cipher/AES/TestSameBuffer.java b/jdk/test/com/sun/crypto/provider/Cipher/AES/TestSameBuffer.java
index bbba223a7c4..f4cc9276bbc 100644
--- a/jdk/test/com/sun/crypto/provider/Cipher/AES/TestSameBuffer.java
+++ b/jdk/test/com/sun/crypto/provider/Cipher/AES/TestSameBuffer.java
@@ -42,6 +42,7 @@ import javax.crypto.spec.IvParameterSpec;
* @summary Test AES ciphers with different modes and padding schemes (ECB mode
* doesn't use IV). The test tries 3 different read methods of
* CipherInputStream.
+ * @key randomness
*/
public class TestSameBuffer {
diff --git a/jdk/test/com/sun/crypto/provider/Cipher/DES/FlushBug.java b/jdk/test/com/sun/crypto/provider/Cipher/DES/FlushBug.java
index ab2dde8b434..bb03a885825 100644
--- a/jdk/test/com/sun/crypto/provider/Cipher/DES/FlushBug.java
+++ b/jdk/test/com/sun/crypto/provider/Cipher/DES/FlushBug.java
@@ -26,6 +26,7 @@
* @bug 0000000
* @summary FlushBug
* @author Jan Luehe
+ * @key randomness
*/
import java.io.*;
import java.security.*;
diff --git a/jdk/test/com/sun/crypto/provider/Cipher/PBE/PBESealedObject.java b/jdk/test/com/sun/crypto/provider/Cipher/PBE/PBESealedObject.java
index 2420b9bc4a3..f97acd547a8 100644
--- a/jdk/test/com/sun/crypto/provider/Cipher/PBE/PBESealedObject.java
+++ b/jdk/test/com/sun/crypto/provider/Cipher/PBE/PBESealedObject.java
@@ -45,6 +45,7 @@ import javax.crypto.spec.PBEParameterSpec;
* @author Bill Situ
* @author Alexander Fomin
* @run main PBESealedObject
+ * @key randomness
*/
public class PBESealedObject {
diff --git a/jdk/test/com/sun/crypto/provider/Cipher/PBE/PBKDF2Translate.java b/jdk/test/com/sun/crypto/provider/Cipher/PBE/PBKDF2Translate.java
index 36681591e46..d9ccf5cf7c1 100644
--- a/jdk/test/com/sun/crypto/provider/Cipher/PBE/PBKDF2Translate.java
+++ b/jdk/test/com/sun/crypto/provider/Cipher/PBE/PBKDF2Translate.java
@@ -37,6 +37,7 @@ import javax.crypto.spec.PBEKeySpec;
* @summary Verify if the SecretKeyFactory.translateKey() method works
* @author Alexander Fomin
* @run main PBKDF2Translate
+ * @key randomness
*/
public class PBKDF2Translate {
diff --git a/jdk/test/com/sun/crypto/provider/Cipher/PBE/PKCS12Cipher.java b/jdk/test/com/sun/crypto/provider/Cipher/PBE/PKCS12Cipher.java
index 4995a9a8b8e..00ff89ade69 100644
--- a/jdk/test/com/sun/crypto/provider/Cipher/PBE/PKCS12Cipher.java
+++ b/jdk/test/com/sun/crypto/provider/Cipher/PBE/PKCS12Cipher.java
@@ -27,6 +27,7 @@
* @summary basic test for PBEWithSHA1AndDESede, PBEWithSHA1AndRC2_40/128
* and PBEWithSHA1AndRC4_40/128
* @author Valerie Peng
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/com/sun/crypto/provider/Cipher/PBE/TestCipherKeyWrapperPBEKey.java b/jdk/test/com/sun/crypto/provider/Cipher/PBE/TestCipherKeyWrapperPBEKey.java
index cc237d0549d..dd767ba1fed 100644
--- a/jdk/test/com/sun/crypto/provider/Cipher/PBE/TestCipherKeyWrapperPBEKey.java
+++ b/jdk/test/com/sun/crypto/provider/Cipher/PBE/TestCipherKeyWrapperPBEKey.java
@@ -45,6 +45,7 @@ import javax.crypto.spec.PBEParameterSpec;
* @author Bill Situ
* @author Yun Ke
* @run main TestCipherKeyWrapperPBEKey
+ * @key randomness
*/
public class TestCipherKeyWrapperPBEKey {
diff --git a/jdk/test/com/sun/crypto/provider/Cipher/RSA/TestOAEP.java b/jdk/test/com/sun/crypto/provider/Cipher/RSA/TestOAEP.java
index 55b501ebf36..b35b8a2ef32 100644
--- a/jdk/test/com/sun/crypto/provider/Cipher/RSA/TestOAEP.java
+++ b/jdk/test/com/sun/crypto/provider/Cipher/RSA/TestOAEP.java
@@ -26,6 +26,7 @@
* @bug 4894151
* @summary encryption/decryption test for OAEP
* @author Andreas Sterbenz
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/com/sun/crypto/provider/Cipher/RSA/TestRSA.java b/jdk/test/com/sun/crypto/provider/Cipher/RSA/TestRSA.java
index b88a5dc524b..1e4c6ed10b1 100644
--- a/jdk/test/com/sun/crypto/provider/Cipher/RSA/TestRSA.java
+++ b/jdk/test/com/sun/crypto/provider/Cipher/RSA/TestRSA.java
@@ -26,6 +26,7 @@
* @bug 4853306
* @summary Test RSA Cipher implementation
* @author Andreas Sterbenz
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/com/sun/crypto/provider/Mac/HmacSaltLengths.java b/jdk/test/com/sun/crypto/provider/Mac/HmacSaltLengths.java
index 17447398403..38d4da44a4a 100644
--- a/jdk/test/com/sun/crypto/provider/Mac/HmacSaltLengths.java
+++ b/jdk/test/com/sun/crypto/provider/Mac/HmacSaltLengths.java
@@ -27,6 +27,7 @@
* @summary ensures various salt lengths can be used for
* HmacPBESHA1.
* @author Valerie Peng
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/com/sun/crypto/provider/Mac/MacSameTest.java b/jdk/test/com/sun/crypto/provider/Mac/MacSameTest.java
index 8d97f1a6a88..598ea6a910c 100644
--- a/jdk/test/com/sun/crypto/provider/Mac/MacSameTest.java
+++ b/jdk/test/com/sun/crypto/provider/Mac/MacSameTest.java
@@ -35,6 +35,7 @@ import javax.crypto.spec.SecretKeySpec;
* @author Yu-Ching Valerie Peng, Bill Situ, Alexander Fomin
* @build Utils
* @run main MacSameTest
+ * @key randomness
*/
public class MacSameTest implements MacTest {
diff --git a/jdk/test/com/sun/management/ThreadMXBean/ThreadCpuTimeArray.java b/jdk/test/com/sun/management/ThreadMXBean/ThreadCpuTimeArray.java
index 67dea226bd1..b364312f0bd 100644
--- a/jdk/test/com/sun/management/ThreadMXBean/ThreadCpuTimeArray.java
+++ b/jdk/test/com/sun/management/ThreadMXBean/ThreadCpuTimeArray.java
@@ -27,6 +27,7 @@
* @summary Basic test of ThreadMXBean.getThreadCpuTime(long[]) and
* getThreadUserTime(long[]).
* @author Paul Hohensee
+ * @key randomness
*/
import java.lang.management.*;
diff --git a/jdk/test/java/io/DataInputStream/ReadUTF.java b/jdk/test/java/io/DataInputStream/ReadUTF.java
index 16f346499e1..02c0f75efd4 100644
--- a/jdk/test/java/io/DataInputStream/ReadUTF.java
+++ b/jdk/test/java/io/DataInputStream/ReadUTF.java
@@ -24,6 +24,7 @@
/* @test
* @bug 4806007
* @summary Checks for vague exceptions from writeUTF/readUTF
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/java/io/File/GetXSpace.java b/jdk/test/java/io/File/GetXSpace.java
index e9aed50bbed..726a205d295 100644
--- a/jdk/test/java/io/File/GetXSpace.java
+++ b/jdk/test/java/io/File/GetXSpace.java
@@ -28,6 +28,7 @@
* @run build GetXSpace
* @run shell GetXSpace.sh
* @summary Basic functionality of File.get-X-Space methods.
+ * @key randomness
*/
import java.io.BufferedReader;
diff --git a/jdk/test/java/io/InputStream/TransferTo.java b/jdk/test/java/io/InputStream/TransferTo.java
index a32df7a62a3..50d8569caf9 100644
--- a/jdk/test/java/io/InputStream/TransferTo.java
+++ b/jdk/test/java/io/InputStream/TransferTo.java
@@ -37,6 +37,7 @@ import static java.lang.String.format;
* @bug 8066867
* @summary tests whether java.io.InputStream.transferTo conforms to its
* contract defined in the javadoc
+ * @key randomness
*/
public class TransferTo {
diff --git a/jdk/test/java/io/PrintStream/OversynchronizedTest.java b/jdk/test/java/io/PrintStream/OversynchronizedTest.java
index 1f687f8cab6..c5ac2bb2b80 100644
--- a/jdk/test/java/io/PrintStream/OversynchronizedTest.java
+++ b/jdk/test/java/io/PrintStream/OversynchronizedTest.java
@@ -24,6 +24,7 @@
/* @test
@bug 4905777
@summary PrintStream.println(Object) oversynchronized, can deadlock
+ @key randomness
*/
import java.io.PrintStream;
diff --git a/jdk/test/java/io/Serializable/corruptedUTFConsumption/CorruptedUTFConsumption.java b/jdk/test/java/io/Serializable/corruptedUTFConsumption/CorruptedUTFConsumption.java
index 0071b8d3acf..3cae0268be3 100644
--- a/jdk/test/java/io/Serializable/corruptedUTFConsumption/CorruptedUTFConsumption.java
+++ b/jdk/test/java/io/Serializable/corruptedUTFConsumption/CorruptedUTFConsumption.java
@@ -28,6 +28,7 @@
* ObjectInputStream consumes at most the expected number of utf
* bytes, even if the last byte(s) of the utf string indicate that the
* string overflows its expected length.
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/java/io/Serializable/longString/LongString.java b/jdk/test/java/io/Serializable/longString/LongString.java
index 3e1b4c3129f..6fbf3e340c8 100644
--- a/jdk/test/java/io/Serializable/longString/LongString.java
+++ b/jdk/test/java/io/Serializable/longString/LongString.java
@@ -25,6 +25,7 @@
* @bug 4217676
* @summary Ensure that object streams support serialization of long strings
* (strings whose UTF representation > 64k in length)
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/java/io/Serializable/proxy/Basic.java b/jdk/test/java/io/Serializable/proxy/Basic.java
index 402f797b139..3519334710b 100644
--- a/jdk/test/java/io/Serializable/proxy/Basic.java
+++ b/jdk/test/java/io/Serializable/proxy/Basic.java
@@ -23,6 +23,7 @@
/* @test
* @summary Verifies basic correct functioning of proxy serialization.
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/java/io/Serializable/sanityCheck/SanityCheck.java b/jdk/test/java/io/Serializable/sanityCheck/SanityCheck.java
index 486f55b547b..e2659868fe8 100644
--- a/jdk/test/java/io/Serializable/sanityCheck/SanityCheck.java
+++ b/jdk/test/java/io/Serializable/sanityCheck/SanityCheck.java
@@ -24,6 +24,7 @@
/* @test
* @summary Basic sanity check to test if default (de)serialization is
* transmitting values properly.
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/java/lang/Boolean/MakeBooleanComparable.java b/jdk/test/java/lang/Boolean/MakeBooleanComparable.java
index 900900a2c5d..81478209c85 100644
--- a/jdk/test/java/lang/Boolean/MakeBooleanComparable.java
+++ b/jdk/test/java/lang/Boolean/MakeBooleanComparable.java
@@ -26,6 +26,7 @@
* @bug 4329937
* @summary Basic test for making Boolean implement Comparable
* @author Josh Bloch
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/java/lang/ClassLoader/Assert.java b/jdk/test/java/lang/ClassLoader/Assert.java
index 2abe45ac156..fb2376d45d4 100644
--- a/jdk/test/java/lang/ClassLoader/Assert.java
+++ b/jdk/test/java/lang/ClassLoader/Assert.java
@@ -28,6 +28,7 @@
* @run main/othervm Assert
* @summary Test the assertion facility
* @author Mike McCloskey
+ * @key randomness
*/
import package1.*;
diff --git a/jdk/test/java/lang/Compare.java b/jdk/test/java/lang/Compare.java
index c037f76fd3c..eba0ae93c1e 100644
--- a/jdk/test/java/lang/Compare.java
+++ b/jdk/test/java/lang/Compare.java
@@ -25,6 +25,7 @@
* @test
* @bug 6582946
* @summary Test the primitive wrappers compare and compareTo methods
+ * @key randomness
*/
import java.util.Random;
diff --git a/jdk/test/java/lang/Double/ParseHexFloatingPoint.java b/jdk/test/java/lang/Double/ParseHexFloatingPoint.java
index b99ae5de1c1..0c70e02eca6 100644
--- a/jdk/test/java/lang/Double/ParseHexFloatingPoint.java
+++ b/jdk/test/java/lang/Double/ParseHexFloatingPoint.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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,14 +23,15 @@
/*
* @test
- * @bug 4826774
- * @summary Numerical tests for hexadecimal inputs to parseDouble, parseFloat
+ * @library /lib/testlibrary/
+ * @build jdk.testlibrary.*
+ * @run main ParseHexFloatingPoint
+ * @bug 4826774 8078672
+ * @summary Numerical tests for hexadecimal inputs to parse{Double, Float} (use -Dseed=X to set PRNG seed)
* @author Joseph D. Darcy
+ * @key randomness
*/
-
-import java.util.regex.*;
-
public class ParseHexFloatingPoint {
private ParseHexFloatingPoint(){}
@@ -255,7 +256,7 @@ public class ParseHexFloatingPoint {
failures += significandAlignmentTests();
{
- java.util.Random rand = new java.util.Random();
+ java.util.Random rand = RandomFactory.getRandom();
// Consistency check; double => hexadecimal => double
// preserves the original value.
for(int i = 0; i < 1000; i++) {
diff --git a/jdk/test/java/lang/Enum/ValueOf.java b/jdk/test/java/lang/Enum/ValueOf.java
index d01b9083ae5..711819653df 100644
--- a/jdk/test/java/lang/Enum/ValueOf.java
+++ b/jdk/test/java/lang/Enum/ValueOf.java
@@ -29,6 +29,7 @@
*
* @compile ValueOf.java
* @run main ValueOf
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/java/lang/HashCode.java b/jdk/test/java/lang/HashCode.java
index d113cb0d0fd..5f1d03f491a 100644
--- a/jdk/test/java/lang/HashCode.java
+++ b/jdk/test/java/lang/HashCode.java
@@ -25,6 +25,7 @@
* @test
* @bug 4245470 7088913
* @summary Test the primitive wrappers hashCode()
+ * @key randomness
*/
import java.util.Objects;
diff --git a/jdk/test/java/lang/Integer/BitTwiddle.java b/jdk/test/java/lang/Integer/BitTwiddle.java
index 6926facb5a4..95104df08ef 100644
--- a/jdk/test/java/lang/Integer/BitTwiddle.java
+++ b/jdk/test/java/lang/Integer/BitTwiddle.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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,9 +23,13 @@
/*
* @test
- * @bug 4495754
- * @summary Basic test for int bit twiddling
+ * @library /lib/testlibrary/
+ * @build jdk.testlibrary.*
+ * @run main BitTwiddle
+ * @bug 4495754 8078672
+ * @summary Basic test for int bit twiddling (use -Dseed=X to set PRNG seed)
* @author Josh Bloch
+ * @key randomness
*/
import java.util.Random;
@@ -35,7 +39,7 @@ public class BitTwiddle {
private static final int N = 1000; // # of repetitions per test
public static void main(String args[]) {
- Random rnd = new Random();
+ Random rnd = RandomFactory.getRandom();
if (highestOneBit(0) != 0)
throw new RuntimeException("a");
diff --git a/jdk/test/java/lang/Long/BitTwiddle.java b/jdk/test/java/lang/Long/BitTwiddle.java
index 5a34ccec3ec..9dacbc7579f 100644
--- a/jdk/test/java/lang/Long/BitTwiddle.java
+++ b/jdk/test/java/lang/Long/BitTwiddle.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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,9 +23,13 @@
/*
* @test
- * @bug 4495754
- * @summary Basic test for long bit twiddling
+ * @library /lib/testlibrary/
+ * @build jdk.testlibrary.*
+ * @run main BitTwiddle
+ * @bug 4495754 8078672
+ * @summary Basic test for long bit twiddling (use -Dseed=X to set PRNG seed)
* @author Josh Bloch
+ * @key randomness
*/
import java.util.Random;
@@ -35,7 +39,7 @@ public class BitTwiddle {
private static final int N = 1000; // # of repetitions per test
public static void main(String args[]) {
- Random rnd = new Random();
+ Random rnd = RandomFactory.getRandom();
if (highestOneBit(0) != 0)
throw new RuntimeException("a");
diff --git a/jdk/test/java/lang/Math/CubeRootTests.java b/jdk/test/java/lang/Math/CubeRootTests.java
index 116a7f4d4a7..956949f8ca4 100644
--- a/jdk/test/java/lang/Math/CubeRootTests.java
+++ b/jdk/test/java/lang/Math/CubeRootTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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,9 +23,13 @@
/*
* @test
- * @bug 4347132 4939441
- * @summary Tests for {Math, StrictMath}.cbrt
+ * @library /lib/testlibrary/
+ * @build jdk.testlibrary.*
+ * @run main CubeRootTests
+ * @bug 4347132 4939441 8078672
+ * @summary Tests for {Math, StrictMath}.cbrt (use -Dseed=X to set PRNG seed)
* @author Joseph D. Darcy
+ * @key randomness
*/
public class CubeRootTests {
@@ -35,7 +39,7 @@ public class CubeRootTests {
static final double NaNd = Double.NaN;
// Initialize shared random number generator
- static java.util.Random rand = new java.util.Random();
+ static java.util.Random rand = RandomFactory.getRandom();
static int testCubeRootCase(double input, double expected) {
int failures=0;
diff --git a/jdk/test/java/lang/Math/HypotTests.java b/jdk/test/java/lang/Math/HypotTests.java
index 1c1ff8c4d5d..21fa0b51736 100644
--- a/jdk/test/java/lang/Math/HypotTests.java
+++ b/jdk/test/java/lang/Math/HypotTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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,9 +23,13 @@
/*
* @test
- * @bug 4851638 4939441
- * @summary Tests for {Math, StrictMath}.hypot
+ * @library /lib/testlibrary/
+ * @build jdk.testlibrary.*
+ * @run main HypotTests
+ * @bug 4851638 4939441 8078672
+ * @summary Tests for {Math, StrictMath}.hypot (use -Dseed=X to set PRNG seed)
* @author Joseph D. Darcy
+ * @key randomness
*/
public class HypotTests {
@@ -119,7 +123,7 @@ public class HypotTests {
* exponent). While the exponent of r is less than or equal
* to (MAX_EXPONENT - 3), the computation should not overflow.
*/
- java.util.Random rand = new java.util.Random();
+ java.util.Random rand = RandomFactory.getRandom();
for(int i = 0; i < 1000; i++) {
double d = rand.nextDouble();
// Scale d to have an exponent equal to MAX_EXPONENT -15
diff --git a/jdk/test/java/lang/Math/IeeeRecommendedTests.java b/jdk/test/java/lang/Math/IeeeRecommendedTests.java
index d1d28245850..e9e276044f0 100644
--- a/jdk/test/java/lang/Math/IeeeRecommendedTests.java
+++ b/jdk/test/java/lang/Math/IeeeRecommendedTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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,9 +23,13 @@
/*
* @test
- * @bug 4860891 4826732 4780454 4939441 4826652
- * @summary Tests for IEEE 754[R] recommended functions and similar methods
+ * @library /lib/testlibrary/
+ * @build jdk.testlibrary.*
+ * @run main IeeeRecommendedTests
+ * @bug 4860891 4826732 4780454 4939441 4826652 8078672
+ * @summary Tests for IEEE 754[R] recommended functions and similar methods (use -Dseed=X to set PRNG seed)
* @author Joseph D. Darcy
+ * @key randomness
*/
public class IeeeRecommendedTests {
@@ -45,7 +49,7 @@ public class IeeeRecommendedTests {
static final double Double_MAX_SUBNORMALmm = 0x0.ffffffffffffeP-1022;
// Initialize shared random number generator
- static java.util.Random rand = new java.util.Random();
+ static java.util.Random rand = RandomFactory.getRandom();
/**
* Returns a floating-point power of two in the normal range.
diff --git a/jdk/test/java/lang/Math/Log1pTests.java b/jdk/test/java/lang/Math/Log1pTests.java
index eb4e8800224..445b0e3dfdc 100644
--- a/jdk/test/java/lang/Math/Log1pTests.java
+++ b/jdk/test/java/lang/Math/Log1pTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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,9 +23,13 @@
/*
* @test
- * @bug 4851638 4939441
- * @summary Tests for {Math, StrictMath}.log1p
+ * @library /lib/testlibrary/
+ * @build jdk.testlibrary.*
+ * @run main Log1pTests
+ * @bug 4851638 4939441 8078672
+ * @summary Tests for {Math, StrictMath}.log1p (use -Dseed=X to set PRNG seed)
* @author Joseph D. Darcy
+ * @key randomness
*/
public class Log1pTests {
@@ -98,7 +102,7 @@ public class Log1pTests {
// Construct random values with exponents ranging from -53 to
// 52 and compare against HP-15C formula.
- java.util.Random rand = new java.util.Random();
+ java.util.Random rand = RandomFactory.getRandom();
for(int i = 0; i < 1000; i++) {
double d = rand.nextDouble();
diff --git a/jdk/test/java/lang/Runtime/exec/LotsOfOutput.java b/jdk/test/java/lang/Runtime/exec/LotsOfOutput.java
index 2f8e594f2b6..b75f8e89eb1 100644
--- a/jdk/test/java/lang/Runtime/exec/LotsOfOutput.java
+++ b/jdk/test/java/lang/Runtime/exec/LotsOfOutput.java
@@ -41,7 +41,12 @@ public class LotsOfOutput {
long initMemory = Runtime.getRuntime().totalMemory();
for (int i=1; i< 10; i++) {
Thread.sleep(100);
- if (Runtime.getRuntime().totalMemory() > initMemory + 1000000)
+ long totalMemory = Runtime.getRuntime().totalMemory();
+ if (totalMemory != initMemory) {
+ System.out.printf("consuming memory: i: %d, initial: %d, total: %d, delta: %d%n",
+ i, initMemory, totalMemory, totalMemory - initMemory);
+ }
+ if (totalMemory > initMemory + 1000000)
throw new Exception("Process consumes memory.");
}
diff --git a/jdk/test/java/lang/Runtime/exec/WinCommand.java b/jdk/test/java/lang/Runtime/exec/WinCommand.java
index 1504c891eab..0d4c256393a 100644
--- a/jdk/test/java/lang/Runtime/exec/WinCommand.java
+++ b/jdk/test/java/lang/Runtime/exec/WinCommand.java
@@ -25,6 +25,7 @@
* @bug 5006520
* @summary Check many different ways to run Windows programs
* @author Martin Buchholz
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/java/lang/String/ContentEquals.java b/jdk/test/java/lang/String/ContentEquals.java
index 2231b71d0c7..eb46f58abab 100644
--- a/jdk/test/java/lang/String/ContentEquals.java
+++ b/jdk/test/java/lang/String/ContentEquals.java
@@ -25,6 +25,7 @@
* @test
* @bug 4242309 4982981
* @summary Test equals and contentEquals in String
+ * @key randomness
*/
import java.util.Random;
import java.nio.CharBuffer;
diff --git a/jdk/test/java/lang/String/ICCBasher.java b/jdk/test/java/lang/String/ICCBasher.java
index ed9a780629c..33cb1a2d7ee 100644
--- a/jdk/test/java/lang/String/ICCBasher.java
+++ b/jdk/test/java/lang/String/ICCBasher.java
@@ -25,6 +25,7 @@
* @test
* @bug 4152868
* @summary test Case Insensitive Comparator in String
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/java/lang/String/SBConstructor.java b/jdk/test/java/lang/String/SBConstructor.java
index 7566fea4379..0b38ed0c54e 100644
--- a/jdk/test/java/lang/String/SBConstructor.java
+++ b/jdk/test/java/lang/String/SBConstructor.java
@@ -25,7 +25,7 @@
* @test
* @bug 4915187
* @summary Test java.lang.String constructor that takes StringBuilder
- *
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/java/lang/String/Split.java b/jdk/test/java/lang/String/Split.java
index a70213a61ca..d95a26a56bc 100644
--- a/jdk/test/java/lang/String/Split.java
+++ b/jdk/test/java/lang/String/Split.java
@@ -25,6 +25,7 @@
* @test
* @bug 6840246 6559590
* @summary test String.split()
+ * @key randomness
*/
import java.util.Arrays;
import java.util.Random;
diff --git a/jdk/test/java/lang/StringBuffer/AppendCharSequence.java b/jdk/test/java/lang/StringBuffer/AppendCharSequence.java
index b7738ac68d1..e6012ca2718 100644
--- a/jdk/test/java/lang/StringBuffer/AppendCharSequence.java
+++ b/jdk/test/java/lang/StringBuffer/AppendCharSequence.java
@@ -24,6 +24,7 @@
/* @test
* @bug 4812591 4705328 5019111
* @summary Test append and insert methods with CharSequence params
+ * @key randomness
*/
import java.util.Random;
diff --git a/jdk/test/java/lang/StringBuffer/AppendSB.java b/jdk/test/java/lang/StringBuffer/AppendSB.java
index f1bcc475074..2ecc37903a1 100644
--- a/jdk/test/java/lang/StringBuffer/AppendSB.java
+++ b/jdk/test/java/lang/StringBuffer/AppendSB.java
@@ -24,6 +24,7 @@
/* @test
* @bug 4144267
* @summary Test StringBuffer.append(StringBuffer);
+ * @key randomness
*/
import java.util.Random;
diff --git a/jdk/test/java/lang/StringBuffer/AppendStringBuilder.java b/jdk/test/java/lang/StringBuffer/AppendStringBuilder.java
index a27f6a12a28..fed81ac253b 100644
--- a/jdk/test/java/lang/StringBuffer/AppendStringBuilder.java
+++ b/jdk/test/java/lang/StringBuffer/AppendStringBuilder.java
@@ -23,6 +23,7 @@
/* @test
* @bug 6206780
* @summary Test StringBuffer.append(StringBuilder);
+ * @key randomness
*/
import java.util.Random;
diff --git a/jdk/test/java/lang/StringBuffer/Capacity.java b/jdk/test/java/lang/StringBuffer/Capacity.java
index 4d2bc83445a..937ad8f9a76 100644
--- a/jdk/test/java/lang/StringBuffer/Capacity.java
+++ b/jdk/test/java/lang/StringBuffer/Capacity.java
@@ -25,6 +25,7 @@
* @test
* @bug 6952330
* @summary Test StringBuffer/StringBuilder capacity handling.
+ * @key randomness
*/
import java.util.Random;
diff --git a/jdk/test/java/lang/StringBuffer/IndexOf.java b/jdk/test/java/lang/StringBuffer/IndexOf.java
index f5741d80ed8..aceb25265b7 100644
--- a/jdk/test/java/lang/StringBuffer/IndexOf.java
+++ b/jdk/test/java/lang/StringBuffer/IndexOf.java
@@ -24,6 +24,7 @@
/* @test
* @bug 4162796 4162796
* @summary Test indexOf and lastIndexOf
+ * @key randomness
*/
import java.util.Random;
diff --git a/jdk/test/java/lang/StringBuffer/SBBasher.java b/jdk/test/java/lang/StringBuffer/SBBasher.java
index 9155f3b99c0..4cc6be46fb0 100644
--- a/jdk/test/java/lang/StringBuffer/SBBasher.java
+++ b/jdk/test/java/lang/StringBuffer/SBBasher.java
@@ -25,7 +25,7 @@
* @test
* @bug 4120694
* @summary Test new methods in StringBuffer
- *
+ * @key randomness
*/
import java.lang.*;
diff --git a/jdk/test/java/lang/StringBuffer/Trim.java b/jdk/test/java/lang/StringBuffer/Trim.java
index 3d1cc6acd91..d44720d9d45 100644
--- a/jdk/test/java/lang/StringBuffer/Trim.java
+++ b/jdk/test/java/lang/StringBuffer/Trim.java
@@ -24,6 +24,7 @@
/* @test
* @bug 4546734 5007612
* @summary Test StringBuffer.trimToSize
+ * @key randomness
*/
import java.util.Random;
diff --git a/jdk/test/java/lang/StringBuilder/AppendStringBuffer.java b/jdk/test/java/lang/StringBuilder/AppendStringBuffer.java
index a54cf0a0d29..3cb1de55a84 100644
--- a/jdk/test/java/lang/StringBuilder/AppendStringBuffer.java
+++ b/jdk/test/java/lang/StringBuilder/AppendStringBuffer.java
@@ -24,6 +24,7 @@
/* @test
* @bug 6206780
* @summary Test StringBuilder.append(StringBuffer);
+ * @key randomness
*/
import java.util.Random;
diff --git a/jdk/test/java/lang/ToString.java b/jdk/test/java/lang/ToString.java
index 3d90dd0c69c..181a4ec44d6 100644
--- a/jdk/test/java/lang/ToString.java
+++ b/jdk/test/java/lang/ToString.java
@@ -25,6 +25,7 @@
* @test
* @bug 4031762
* @summary Test the primitive wrappers static toString()
+ * @key randomness
*/
import java.util.Random;
diff --git a/jdk/test/java/lang/instrument/SingleTransformerTest.java b/jdk/test/java/lang/instrument/SingleTransformerTest.java
index bcbf04d8a97..d04adf1b266 100644
--- a/jdk/test/java/lang/instrument/SingleTransformerTest.java
+++ b/jdk/test/java/lang/instrument/SingleTransformerTest.java
@@ -30,6 +30,7 @@
* @run build SingleTransformerTest
* @run shell MakeJAR.sh redefineAgent
* @run main/othervm -javaagent:redefineAgent.jar SingleTransformerTest SingleTransformerTest
+ * @key randomness
*/
public class
SingleTransformerTest
diff --git a/jdk/test/java/lang/instrument/TransformMethodTest.java b/jdk/test/java/lang/instrument/TransformMethodTest.java
index 38e48d5288f..610729f1185 100644
--- a/jdk/test/java/lang/instrument/TransformMethodTest.java
+++ b/jdk/test/java/lang/instrument/TransformMethodTest.java
@@ -30,6 +30,7 @@
* @run build TransformMethodTest
* @run shell MakeJAR.sh redefineAgent
* @run main/othervm -javaagent:redefineAgent.jar TransformMethodTest TransformMethodTest
+ * @key randomness
*/
import java.lang.instrument.*;
diff --git a/jdk/test/java/lang/invoke/MethodHandles/CatchExceptionTest.java b/jdk/test/java/lang/invoke/MethodHandles/CatchExceptionTest.java
index 44e11e0985d..1d3cbeb64d1 100644
--- a/jdk/test/java/lang/invoke/MethodHandles/CatchExceptionTest.java
+++ b/jdk/test/java/lang/invoke/MethodHandles/CatchExceptionTest.java
@@ -41,7 +41,7 @@ import java.util.concurrent.TimeUnit;
* @library /lib/testlibrary/jsr292 /lib/testlibrary/
* @compile CatchExceptionTest.java
* @run main/othervm -esa test.java.lang.invoke.MethodHandles.CatchExceptionTest
- * @key intermittent
+ * @key intermittent randomness
*/
public class CatchExceptionTest {
private static final List<Class<?>> ARGS_CLASSES;
diff --git a/jdk/test/java/lang/management/BufferPoolMXBean/Basic.java b/jdk/test/java/lang/management/BufferPoolMXBean/Basic.java
index 6bdd96a2fa8..180551fdd26 100644
--- a/jdk/test/java/lang/management/BufferPoolMXBean/Basic.java
+++ b/jdk/test/java/lang/management/BufferPoolMXBean/Basic.java
@@ -25,6 +25,7 @@
* @bug 6606598 7024172
* @summary Unit test for java.lang.management.BufferPoolMXBean
* @run main/othervm Basic
+ * @key randomness
*/
import java.nio.ByteBuffer;
diff --git a/jdk/test/java/math/BigDecimal/StringConstructor.java b/jdk/test/java/math/BigDecimal/StringConstructor.java
index c8051eb98a5..fde327dd075 100644
--- a/jdk/test/java/math/BigDecimal/StringConstructor.java
+++ b/jdk/test/java/math/BigDecimal/StringConstructor.java
@@ -23,20 +23,20 @@
/*
* @test
- * @library ..
- * @bug 4103117 4331084 4488017 4490929 6255285 6268365 8074460
+ * @library /lib/testlibrary/
+ * @build jdk.testlibrary.*
+ * @run main StringConstructor
+ * @bug 4103117 4331084 4488017 4490929 6255285 6268365 8074460 8078672
* @summary Tests the BigDecimal string constructor (use -Dseed=X to set PRNG seed).
+ * @key randomness
*/
import java.math.*;
+import java.util.Random;
public class StringConstructor {
- private static RandomSeed rndSeed = new RandomSeed(false);
-
public static void main(String[] args) throws Exception {
- System.out.println("Random number generator seed = " + rndSeed.getSeed());
-
constructWithError("");
constructWithError("+");
constructWithError("-");
@@ -71,13 +71,14 @@ public class StringConstructor {
nonAsciiZeroTest();
// Roundtrip tests
+ Random random = RandomFactory.getRandom();
for (int i=0; i<100; i++) {
- int size = rndSeed.getRandom().nextInt(100) + 1;
- BigInteger bi = new BigInteger(size, rndSeed.getRandom());
- if (rndSeed.getRandom().nextBoolean())
+ int size = random.nextInt(100) + 1;
+ BigInteger bi = new BigInteger(size, random);
+ if (random.nextBoolean())
bi = bi.negate();
int decimalLength = bi.toString().length();
- int scale = rndSeed.getRandom().nextInt(decimalLength);
+ int scale = random.nextInt(decimalLength);
BigDecimal bd = new BigDecimal(bi, scale);
String bdString = bd.toString();
// System.err.println("bi" + bi.toString() + "\tscale " + scale);
diff --git a/jdk/test/java/math/BigInteger/BigIntegerTest.java b/jdk/test/java/math/BigInteger/BigIntegerTest.java
index e1b36c0812b..687d06e70e9 100644
--- a/jdk/test/java/math/BigInteger/BigIntegerTest.java
+++ b/jdk/test/java/math/BigInteger/BigIntegerTest.java
@@ -23,11 +23,14 @@
/*
* @test
- * @library ..
- * @bug 4181191 4161971 4227146 4194389 4823171 4624738 4812225 4837946 4026465 8074460
+ * @library /lib/testlibrary/
+ * @build jdk.testlibrary.*
+ * @run main BigIntegerTest
+ * @bug 4181191 4161971 4227146 4194389 4823171 4624738 4812225 4837946 4026465 8074460 8078672
* @summary tests methods in BigInteger (use -Dseed=X to set PRNG seed)
* @run main/timeout=400 BigIntegerTest
* @author madbot
+ * @key randomness
*/
import java.io.File;
@@ -36,6 +39,7 @@ import java.io.FileOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.math.BigInteger;
+import java.util.Random;
/**
* This is a simple test class created to ensure that the results
@@ -86,7 +90,7 @@ public class BigIntegerTest {
static final int SIZE = 1000; // numbers per batch
- private static RandomSeed rndSeed = new RandomSeed(false);
+ private static Random random = RandomFactory.getRandom();
static boolean failure = false;
@@ -98,7 +102,7 @@ public class BigIntegerTest {
int arrayLength = 23;
int halfLength = arrayLength/2;
byte[] array = new byte[arrayLength];
- rndSeed.getRandom().nextBytes(array);
+ random.nextBytes(array);
int[][] offLen = new int[][] { // offset, length, num exceptions
{-1, arrayLength, 1}, // negative offset
@@ -162,7 +166,7 @@ public class BigIntegerTest {
}
byte[] magNonZeroLength = new byte[42];
- rndSeed.getRandom().nextBytes(magNonZeroLength);
+ random.nextBytes(magNonZeroLength);
for (int signum = -1; signum <= 1; signum++) {
BigInteger bi = new BigInteger(signum, magNonZeroLength, 0, 0);
if (bi.compareTo(BigInteger.ZERO) != 0) {
@@ -175,13 +179,13 @@ public class BigIntegerTest {
for (int i = 0; i < SIZE; i++) {
// create reference value via a different code path from those tested
- BigInteger reference = new BigInteger(2 + rndSeed.getRandom().nextInt(336), 4, rndSeed.getRandom());
+ BigInteger reference = new BigInteger(2 + random.nextInt(336), 4, random);
byte[] refArray = reference.toByteArray();
int refLen = refArray.length;
- int factor = rndSeed.getRandom().nextInt(5);
- int objLen = refArray.length + factor*rndSeed.getRandom().nextInt(refArray.length) + 1;
- int offset = rndSeed.getRandom().nextInt(objLen - refLen);
+ int factor = random.nextInt(5);
+ int objLen = refArray.length + factor*random.nextInt(refArray.length) + 1;
+ int offset = random.nextInt(objLen - refLen);
byte[] objArray = new byte[objLen];
System.arraycopy(refArray, 0, objArray, offset, refLen);
@@ -192,7 +196,7 @@ public class BigIntegerTest {
failCount++;
}
- boolean isNegative = rndSeed.getRandom().nextBoolean();
+ boolean isNegative = random.nextBoolean();
BigInteger signMag = new BigInteger(isNegative ? -1 : 1, objArray, offset, refLen);
if (signMag.compareTo(isNegative ? reference.negate() : reference) != 0) {
System.err.println("Sign-magnitude BigInteger not equal for offset " +
@@ -209,7 +213,7 @@ public class BigIntegerTest {
for (int i=0; i<SIZE; i++) {
// Test identity x^power == x*x*x ... *x
- int power = rndSeed.getRandom().nextInt(6) + 2;
+ int power = random.nextInt(6) + 2;
BigInteger x = fetchNumber(order);
BigInteger y = x.pow(power);
BigInteger z = x;
@@ -310,12 +314,12 @@ public class BigIntegerTest {
for (int i=0; i<SIZE; i++) {
BigInteger x = fetchNumber(BITS_KARATSUBA - 32 - 1);
BigInteger u = base.add(x);
- int a = 1 + rndSeed.getRandom().nextInt(31);
+ int a = 1 + random.nextInt(31);
BigInteger w = u.shiftLeft(a);
BigInteger y = fetchNumber(BITS_KARATSUBA - 32 - 1);
BigInteger v = base.add(y);
- int b = 1 + rndSeed.getRandom().nextInt(32);
+ int b = 1 + random.nextInt(32);
BigInteger z = v.shiftLeft(b);
BigInteger multiplyResult = u.multiply(v).shiftLeft(a + b);
@@ -364,7 +368,7 @@ public class BigIntegerTest {
for (int i=0; i<SIZE; i++) {
BigInteger x = fetchNumber(BITS_KARATSUBA_SQUARE - 32 - 1);
BigInteger u = base.add(x);
- int a = 1 + rndSeed.getRandom().nextInt(31);
+ int a = 1 + random.nextInt(31);
BigInteger w = u.shiftLeft(a);
BigInteger squareResult = u.multiply(u).shiftLeft(2*a);
@@ -382,7 +386,7 @@ public class BigIntegerTest {
for (int i=0; i<SIZE; i++) {
BigInteger x = fetchNumber(BITS_TOOM_COOK_SQUARE - 32 - 1);
BigInteger u = base.add(x);
- int a = 1 + rndSeed.getRandom().nextInt(31);
+ int a = 1 + random.nextInt(31);
BigInteger w = u.shiftLeft(a);
BigInteger squareResult = u.multiply(u).shiftLeft(2*a);
@@ -416,20 +420,20 @@ public class BigIntegerTest {
BigInteger base = BigInteger.ONE.shiftLeft(BITS_BURNIKEL_ZIEGLER + BITS_BURNIKEL_ZIEGLER_OFFSET - 33);
for (int i=0; i<SIZE; i++) {
- BigInteger addend = new BigInteger(BITS_BURNIKEL_ZIEGLER + BITS_BURNIKEL_ZIEGLER_OFFSET - 34, rndSeed.getRandom());
+ BigInteger addend = new BigInteger(BITS_BURNIKEL_ZIEGLER + BITS_BURNIKEL_ZIEGLER_OFFSET - 34, random);
BigInteger v = base.add(addend);
- BigInteger u = v.multiply(BigInteger.valueOf(2 + rndSeed.getRandom().nextInt(Short.MAX_VALUE - 1)));
+ BigInteger u = v.multiply(BigInteger.valueOf(2 + random.nextInt(Short.MAX_VALUE - 1)));
- if(rndSeed.getRandom().nextBoolean()) {
+ if(random.nextBoolean()) {
u = u.negate();
}
- if(rndSeed.getRandom().nextBoolean()) {
+ if(random.nextBoolean()) {
v = v.negate();
}
- int a = BITS_BURNIKEL_ZIEGLER_OFFSET + rndSeed.getRandom().nextInt(16);
- int b = 1 + rndSeed.getRandom().nextInt(16);
+ int a = BITS_BURNIKEL_ZIEGLER_OFFSET + random.nextInt(16);
+ int b = 1 + random.nextInt(16);
BigInteger w = u.multiply(BigInteger.ONE.shiftLeft(a));
BigInteger z = v.multiply(BigInteger.ONE.shiftLeft(b));
@@ -451,7 +455,7 @@ public class BigIntegerTest {
int failCount = 0;
for (int i=0; i<SIZE*10; i++) {
- int x = rndSeed.getRandom().nextInt();
+ int x = random.nextInt();
BigInteger bigX = BigInteger.valueOf((long)x);
int bit = (x < 0 ? 0 : 1);
int tmp = x, bitCount = 0;
@@ -472,7 +476,7 @@ public class BigIntegerTest {
int failCount = 0;
for (int i=0; i<SIZE*10; i++) {
- int x = rndSeed.getRandom().nextInt();
+ int x = random.nextInt();
BigInteger bigX = BigInteger.valueOf((long)x);
int signBit = (x < 0 ? 0x80000000 : 0);
int tmp = x, bitLength, j;
@@ -576,7 +580,7 @@ public class BigIntegerTest {
for (int i=0; i<100; i++) {
BigInteger x = fetchNumber(order);
- int n = Math.abs(rndSeed.getRandom().nextInt()%200);
+ int n = Math.abs(random.nextInt()%200);
if (!x.shiftLeft(n).equals
(x.multiply(BigInteger.valueOf(2L).pow(n))))
@@ -643,8 +647,8 @@ public class BigIntegerTest {
// Generic string conversion.
for (int i=0; i<100; i++) {
- byte xBytes[] = new byte[Math.abs(rndSeed.getRandom().nextInt())%100+1];
- rndSeed.getRandom().nextBytes(xBytes);
+ byte xBytes[] = new byte[Math.abs(random.nextInt())%100+1];
+ random.nextBytes(xBytes);
BigInteger x = new BigInteger(xBytes);
for (int radix=Character.MIN_RADIX; radix < Character.MAX_RADIX; radix++) {
@@ -668,7 +672,7 @@ public class BigIntegerTest {
for (int bits = upper; bits >= lower; bits--) {
for (int i = 0; i < 50; i++) {
- BigInteger x = BigInteger.ONE.shiftLeft(bits - 1).or(new BigInteger(bits - 2, rndSeed.getRandom()));
+ BigInteger x = BigInteger.ONE.shiftLeft(bits - 1).or(new BigInteger(bits - 2, random));
for (int radix = Character.MIN_RADIX; radix < Character.MAX_RADIX; radix++) {
String result = x.toString(radix);
@@ -765,9 +769,9 @@ public class BigIntegerTest {
int failCount = 0;
for (int i=0; i<10; i++) {
- BigInteger m = new BigInteger(100, 5, rndSeed.getRandom());
+ BigInteger m = new BigInteger(100, 5, random);
while(m.compareTo(BigInteger.ONE) != 1)
- m = new BigInteger(100, 5, rndSeed.getRandom());
+ m = new BigInteger(100, 5, random);
BigInteger exp = m.subtract(BigInteger.ONE);
BigInteger base = fetchNumber(order).abs();
while(base.compareTo(m) != -1)
@@ -827,7 +831,7 @@ public class BigIntegerTest {
// Test consistency
for(int i=0; i<10; i++) {
- p1 = BigInteger.probablePrime(100, rndSeed.getRandom());
+ p1 = BigInteger.probablePrime(100, random);
if (!p1.isProbablePrime(100)) {
System.err.println("Consistency "+p1.toString(16));
failCount++;
@@ -868,7 +872,7 @@ public class BigIntegerTest {
// Numbers of the form (6k+1)(12k+1)(18k+1) are Carmichael numbers if
// each of the factors is prime
int found = 0;
- BigInteger f1 = new BigInteger(40, 100, rndSeed.getRandom());
+ BigInteger f1 = new BigInteger(40, 100, random);
while (found < NUM_CARMICHAELS_TO_TEST) {
BigInteger k = null;
BigInteger f2, f3;
@@ -895,8 +899,8 @@ public class BigIntegerTest {
// Test some composites that are products of 2 primes
for (int i=0; i<50; i++) {
- p1 = BigInteger.probablePrime(100, rndSeed.getRandom());
- p2 = BigInteger.probablePrime(100, rndSeed.getRandom());
+ p1 = BigInteger.probablePrime(100, random);
+ p2 = BigInteger.probablePrime(100, random);
c1 = p1.multiply(p2);
if (c1.isProbablePrime(100)) {
System.err.println("Composite failed "+c1.toString(16));
@@ -905,8 +909,8 @@ public class BigIntegerTest {
}
for (int i=0; i<4; i++) {
- p1 = BigInteger.probablePrime(600, rndSeed.getRandom());
- p2 = BigInteger.probablePrime(600, rndSeed.getRandom());
+ p1 = BigInteger.probablePrime(600, random);
+ p2 = BigInteger.probablePrime(600, random);
c1 = p1.multiply(p2);
if (c1.isProbablePrime(100)) {
System.err.println("Composite failed "+c1.toString(16));
@@ -961,7 +965,7 @@ public class BigIntegerTest {
// Next, pick some large primes, use nextProbablePrime to find the
// next one, and make sure there are no primes in between
for (int i=0; i<100; i+=10) {
- p1 = BigInteger.probablePrime(50 + i, rndSeed.getRandom());
+ p1 = BigInteger.probablePrime(50 + i, random);
p2 = p1.add(ONE);
p3 = p1.nextProbablePrime();
while(p2.compareTo(p3) < 0) {
@@ -1026,7 +1030,7 @@ public class BigIntegerTest {
}
for(int i=0; i<10; i++) {
- BigInteger b1 = fetchNumber(rndSeed.getRandom().nextInt(100));
+ BigInteger b1 = fetchNumber(random.nextInt(100));
BigInteger b2 = null;
File f = new File("serialtest");
try (FileOutputStream fos = new FileOutputStream(f)) {
@@ -1060,8 +1064,6 @@ public class BigIntegerTest {
*
*/
public static void main(String[] args) throws Exception {
- System.out.println("Random number generator seed = " + rndSeed.getSeed());
-
// Some variables for sizing test numbers in bits
int order1 = ORDER_MEDIUM;
int order2 = ORDER_SMALL;
@@ -1133,8 +1135,8 @@ public class BigIntegerTest {
* If order is less than 2, order is changed to 2.
*/
private static BigInteger fetchNumber(int order) {
- boolean negative = rndSeed.getRandom().nextBoolean();
- int numType = rndSeed.getRandom().nextInt(7);
+ boolean negative = random.nextBoolean();
+ int numType = random.nextInt(7);
BigInteger result = null;
if (order < 2) order = 2;
@@ -1158,14 +1160,14 @@ public class BigIntegerTest {
break;
case 3: // One bit in number
- result = BigInteger.ONE.shiftLeft(rndSeed.getRandom().nextInt(order));
+ result = BigInteger.ONE.shiftLeft(random.nextInt(order));
break;
case 4: // Random bit density
byte[] val = new byte[(order+7)/8];
- int iterations = rndSeed.getRandom().nextInt(order);
+ int iterations = random.nextInt(order);
for (int i=0; i<iterations; i++) {
- int bitIdx = rndSeed.getRandom().nextInt(order);
+ int bitIdx = random.nextInt(order);
val[bitIdx/8] |= 1 << (bitIdx%8);
}
result = new BigInteger(1, val);
@@ -1173,9 +1175,9 @@ public class BigIntegerTest {
case 5: // Runs of consecutive ones and zeros
result = ZERO;
int remaining = order;
- int bit = rndSeed.getRandom().nextInt(2);
+ int bit = random.nextInt(2);
while (remaining > 0) {
- int runLength = Math.min(remaining, rndSeed.getRandom().nextInt(order));
+ int runLength = Math.min(remaining, random.nextInt(order));
result = result.shiftLeft(runLength);
if (bit > 0)
result = result.add(ONE.shiftLeft(runLength).subtract(ONE));
@@ -1185,7 +1187,7 @@ public class BigIntegerTest {
break;
default: // random bits
- result = new BigInteger(order, rndSeed.getRandom());
+ result = new BigInteger(order, random);
}
if (negative)
diff --git a/jdk/test/java/math/BigInteger/ModPow65537.java b/jdk/test/java/math/BigInteger/ModPow65537.java
index f8e4a5422d1..7d9607acd3f 100644
--- a/jdk/test/java/math/BigInteger/ModPow65537.java
+++ b/jdk/test/java/math/BigInteger/ModPow65537.java
@@ -23,16 +23,20 @@
/*
* @test
- * @library ..
- * @bug 4891312 8074460
+ * @library /lib/testlibrary/
+ * @build jdk.testlibrary.*
+ * @run main ModPow65537
+ * @bug 4891312 8074460 8078672
* @summary verify that modPow() not broken by the special case for 65537 (use -Dseed=X to set PRNG seed)
* @author Andreas Sterbenz
+ * @key randomness
*/
import java.math.BigInteger;
import java.security.*;
import java.security.spec.*;
+import java.util.Random;
public class ModPow65537 {
@@ -78,9 +82,8 @@ public class ModPow65537 {
private static void testSigning(KeyPair kp) throws Exception {
System.out.println(kp.getPublic());
byte[] data = new byte[1024];
- RandomSeed rndSeed = new RandomSeed(false);
- System.out.println("Random number generator seed = " + rndSeed.getSeed());
- rndSeed.getRandom().nextBytes(data);
+ Random random = RandomFactory.getRandom();
+ random.nextBytes(data);
Signature sig = Signature.getInstance("SHA1withRSA", "SunRsaSign");
sig.initSign(kp.getPrivate());
diff --git a/jdk/test/java/math/BigInteger/PrimeTest.java b/jdk/test/java/math/BigInteger/PrimeTest.java
index fae4fd7979b..bb3d3494a0d 100644
--- a/jdk/test/java/math/BigInteger/PrimeTest.java
+++ b/jdk/test/java/math/BigInteger/PrimeTest.java
@@ -25,10 +25,13 @@
/*
* @test
- * @library ..
- * @bug 8026236 8074460
+ * @library /lib/testlibrary/
+ * @build jdk.testlibrary.*
+ * @run main PrimeTest
+ * @bug 8026236 8074460 8078672
* @summary test primality verification methods in BigInteger (use -Dseed=X to set PRNG seed)
* @author bpb
+ * @key randomness
*/
import java.math.BigInteger;
import java.util.BitSet;
@@ -178,9 +181,8 @@ public class PrimeTest {
}
// Create a list of non-prime BigIntegers.
- RandomSeed rndSeed = new RandomSeed(true);
- System.out.println("Random number generator seed = " + rndSeed.getSeed());
- List<BigInteger> nonPrimeBigInts = (rndSeed.getSplittableRandom())
+ SplittableRandom splitRandom = RandomFactory.getSplittableRandom();
+ List<BigInteger> nonPrimeBigInts = (splitRandom)
.ints(NUM_NON_PRIMES, 2, maxPrime).mapToObj(BigInteger::valueOf)
.filter(b -> !b.isProbablePrime(certainty)).collect(toList());
diff --git a/jdk/test/java/math/BigInteger/SymmetricRangeTests.java b/jdk/test/java/math/BigInteger/SymmetricRangeTests.java
index d3cb73cbef2..6565ff23b67 100644
--- a/jdk/test/java/math/BigInteger/SymmetricRangeTests.java
+++ b/jdk/test/java/math/BigInteger/SymmetricRangeTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 1025, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, 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
@@ -24,11 +24,13 @@
/*
* @test
* @ignore This test has huge memory requirements
- * @library ..
+ * @library /lib/testlibrary/
+ * @build jdk.testlibrary.*
* @run main/timeout=180/othervm -Xmx8g SymmetricRangeTests
- * @bug 6910473 8021204 8021203 9005933 8074460
+ * @bug 6910473 8021204 8021203 9005933 8074460 8078672
* @summary Test range of BigInteger values (use -Dseed=X to set PRNG seed)
* @author Dmitry Nadezhin
+ * @key randomness
*/
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
@@ -37,6 +39,7 @@ import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.Arrays;
import java.math.BigInteger;
+import java.util.Random;
public class SymmetricRangeTests {
@@ -114,9 +117,8 @@ public class SymmetricRangeTests {
System.out.println("Testing overflow in BitSieve.sieveSingle");
int bitLength = (5 << 27) - 1;
try {
- RandomSeed rndSeed = new RandomSeed(false);
- System.out.println("Random number generator seed = " + rndSeed.getSeed());
- BigInteger actual = new BigInteger(bitLength, 0, rndSeed.getRandom());
+ Random random = RandomFactory.getRandom();
+ BigInteger actual = new BigInteger(bitLength, 0, random);
throw new RuntimeException("new BigInteger(bitLength, 0, null).bitLength()=" + actual.bitLength());
} catch (ArithmeticException e) {
// expected
diff --git a/jdk/test/java/math/RandomSeed.java b/jdk/test/java/math/RandomSeed.java
deleted file mode 100644
index 494705c5fd6..00000000000
--- a/jdk/test/java/math/RandomSeed.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-import java.util.Random;
-import java.util.SplittableRandom;
-
-public class RandomSeed {
- private long seed = 0L;
- private Random rnd = null;
- private SplittableRandom srnd = null;
-
- public RandomSeed(boolean isSplittableRandom) {
- init(isSplittableRandom);
- }
-
- private void init(boolean isSplittableRandom) {
- // obtain seed from environment if supplied
- boolean isSeedProvided = false;
- try {
- // note that Long.valueOf(null) also throws a NumberFormatException
- // so if the property is undefined this will still work correctly
- seed = Long.valueOf(System.getProperty("seed"));
- isSeedProvided = true;
- } catch (NumberFormatException e) {
- // do nothing: isSeedProvided is already false
- }
-
- // if no seed from environment, create a fresh one
- Random tmpRnd = null;
- if (!isSeedProvided) {
- tmpRnd = new Random();
- seed = tmpRnd.nextLong();
- }
-
- // create the PRNG
- if (isSplittableRandom) {
- srnd = new SplittableRandom(seed);
- } else {
- rnd = tmpRnd != null ? tmpRnd : new Random();
- rnd.setSeed(seed);
- }
- }
-
- public Random getRandom() {
- if (rnd == null) {
- throw new IllegalStateException("Variable of type Random not initialized");
- }
- return rnd;
- }
-
- public SplittableRandom getSplittableRandom() {
- if (srnd == null) {
- throw new IllegalStateException("Variable of type SplittableRandom not initialized");
- }
- return srnd;
- }
-
- public long getSeed() {
- return seed;
- }
-}
diff --git a/jdk/test/java/net/InetAddress/HashSpread.java b/jdk/test/java/net/InetAddress/HashSpread.java
index 17f59438470..990eb531bd7 100644
--- a/jdk/test/java/net/InetAddress/HashSpread.java
+++ b/jdk/test/java/net/InetAddress/HashSpread.java
@@ -26,6 +26,7 @@
* @bug 4687909
* @summary Check Inet6Address.hashCode returns a reasonable spread of hash
* codes.
+ * @key randomness
*/
import java.net.InetAddress;
import java.net.UnknownHostException;
diff --git a/jdk/test/java/nio/Buffer/Chars.java b/jdk/test/java/nio/Buffer/Chars.java
index ef2df66ac14..01b53ea2405 100644
--- a/jdk/test/java/nio/Buffer/Chars.java
+++ b/jdk/test/java/nio/Buffer/Chars.java
@@ -26,6 +26,7 @@
* @bug 8014854
* @summary Exercises CharBuffer#chars on each of the CharBuffer types
* @run testng Chars
+ * @key randomness
*/
import java.nio.ByteBuffer;
diff --git a/jdk/test/java/nio/MappedByteBuffer/Force.java b/jdk/test/java/nio/MappedByteBuffer/Force.java
index 52717642c94..f9ae0810bce 100644
--- a/jdk/test/java/nio/MappedByteBuffer/Force.java
+++ b/jdk/test/java/nio/MappedByteBuffer/Force.java
@@ -25,6 +25,7 @@
* @bug 4625907
* @summary Testing force()
* @run main/othervm Force
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/java/nio/MappedByteBuffer/ZeroMap.java b/jdk/test/java/nio/MappedByteBuffer/ZeroMap.java
index 7c00bf72750..f28e1eb8963 100644
--- a/jdk/test/java/nio/MappedByteBuffer/ZeroMap.java
+++ b/jdk/test/java/nio/MappedByteBuffer/ZeroMap.java
@@ -25,6 +25,7 @@
* @bug 4802340
* @summary Testing force(), load() isLoaded() of zero len MBB
* @run main/othervm ZeroMap
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/java/nio/channels/AsynchronousChannelGroup/Basic.java b/jdk/test/java/nio/channels/AsynchronousChannelGroup/Basic.java
index 1c5da1309b3..0a62be8fc57 100644
--- a/jdk/test/java/nio/channels/AsynchronousChannelGroup/Basic.java
+++ b/jdk/test/java/nio/channels/AsynchronousChannelGroup/Basic.java
@@ -24,6 +24,7 @@
/* @test
* @bug 4607272
* @summary Unit test for AsynchronousChannelGroup
+ * @key randomness
*/
import java.nio.ByteBuffer;
diff --git a/jdk/test/java/nio/channels/AsynchronousChannelGroup/Identity.java b/jdk/test/java/nio/channels/AsynchronousChannelGroup/Identity.java
index 366449bfc32..654d5f92183 100644
--- a/jdk/test/java/nio/channels/AsynchronousChannelGroup/Identity.java
+++ b/jdk/test/java/nio/channels/AsynchronousChannelGroup/Identity.java
@@ -24,6 +24,7 @@
/* @test
* @bug 4607272 6842687
* @summary Unit test for AsynchronousChannelGroup
+ * @key randomness
*/
import java.nio.ByteBuffer;
diff --git a/jdk/test/java/nio/channels/AsynchronousChannelGroup/Restart.java b/jdk/test/java/nio/channels/AsynchronousChannelGroup/Restart.java
index 456f66a2eee..4d364017f0e 100644
--- a/jdk/test/java/nio/channels/AsynchronousChannelGroup/Restart.java
+++ b/jdk/test/java/nio/channels/AsynchronousChannelGroup/Restart.java
@@ -24,6 +24,7 @@
/* @test
* @bug 4607272 6842687
* @summary Unit test for AsynchronousChannelGroup
+ * @key randomness
*/
import java.nio.channels.*;
diff --git a/jdk/test/java/nio/channels/AsynchronousFileChannel/Basic.java b/jdk/test/java/nio/channels/AsynchronousFileChannel/Basic.java
index 10f51c978ca..55de744c0db 100644
--- a/jdk/test/java/nio/channels/AsynchronousFileChannel/Basic.java
+++ b/jdk/test/java/nio/channels/AsynchronousFileChannel/Basic.java
@@ -24,6 +24,7 @@
/* @test
* @bug 4607272 6822643 6830721 6842687
* @summary Unit test for AsynchronousFileChannel
+ * @key randomness
*/
import java.nio.file.*;
diff --git a/jdk/test/java/nio/channels/AsynchronousFileChannel/Lock.java b/jdk/test/java/nio/channels/AsynchronousFileChannel/Lock.java
index a7f2c7bb0cb..13a094e7d25 100644
--- a/jdk/test/java/nio/channels/AsynchronousFileChannel/Lock.java
+++ b/jdk/test/java/nio/channels/AsynchronousFileChannel/Lock.java
@@ -25,6 +25,7 @@
/* @test
* @bug 4607272 6814948 6842687
* @summary Unit test for AsynchronousFileChannel#lock method
+ * @key randomness
*/
import java.net.*;
diff --git a/jdk/test/java/nio/channels/AsynchronousFileChannel/LotsOfWrites.java b/jdk/test/java/nio/channels/AsynchronousFileChannel/LotsOfWrites.java
index 02453e57f26..9c2d5ec3f6b 100644
--- a/jdk/test/java/nio/channels/AsynchronousFileChannel/LotsOfWrites.java
+++ b/jdk/test/java/nio/channels/AsynchronousFileChannel/LotsOfWrites.java
@@ -24,6 +24,7 @@
/* @test
* @bug 6913877
* @summary Stress AsynchronousFileChannel.write
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/java/nio/channels/AsynchronousSocketChannel/Basic.java b/jdk/test/java/nio/channels/AsynchronousSocketChannel/Basic.java
index 9442f9b5408..23d9eb36e4e 100644
--- a/jdk/test/java/nio/channels/AsynchronousSocketChannel/Basic.java
+++ b/jdk/test/java/nio/channels/AsynchronousSocketChannel/Basic.java
@@ -25,6 +25,7 @@
* @bug 4607272 6842687 6878369 6944810 7023403
* @summary Unit test for AsynchronousSocketChannel
* @run main Basic -skipSlowConnectTest
+ * @key randomness
*/
import java.nio.ByteBuffer;
diff --git a/jdk/test/java/nio/channels/AsynchronousSocketChannel/StressLoopback.java b/jdk/test/java/nio/channels/AsynchronousSocketChannel/StressLoopback.java
index 4627aaa2a5a..8f8f816cad6 100644
--- a/jdk/test/java/nio/channels/AsynchronousSocketChannel/StressLoopback.java
+++ b/jdk/test/java/nio/channels/AsynchronousSocketChannel/StressLoopback.java
@@ -26,6 +26,7 @@
* @summary Stress test connections through the loopback interface
* @run main StressLoopback
* @run main/othervm -Djdk.net.useFastTcpLoopback StressLoopback
+ * @key randomness
*/
import java.nio.ByteBuffer;
diff --git a/jdk/test/java/nio/channels/Channels/Basic2.java b/jdk/test/java/nio/channels/Channels/Basic2.java
index 27a56c56bca..73acdf7b3c2 100644
--- a/jdk/test/java/nio/channels/Channels/Basic2.java
+++ b/jdk/test/java/nio/channels/Channels/Basic2.java
@@ -25,6 +25,7 @@
* @bug 4607272
* @summary Test Channels methods for interoperability between streams and
* asynchronous byte channels
+ * @key randomness
*/
import java.net.*;
diff --git a/jdk/test/java/nio/channels/Channels/ShortWrite.java b/jdk/test/java/nio/channels/Channels/ShortWrite.java
index 82c8f7265d8..d39f69e4842 100644
--- a/jdk/test/java/nio/channels/Channels/ShortWrite.java
+++ b/jdk/test/java/nio/channels/Channels/ShortWrite.java
@@ -25,6 +25,7 @@
* @bug 6448457
* @summary Test Channels.newOutputStream returns OutputStream that handles
* short writes from the underlying channel
+ * @key randomness
*/
import java.io.OutputStream;
diff --git a/jdk/test/java/nio/channels/DatagramChannel/AdaptDatagramSocket.java b/jdk/test/java/nio/channels/DatagramChannel/AdaptDatagramSocket.java
index 7937b56c59f..b8ec1c1060b 100644
--- a/jdk/test/java/nio/channels/DatagramChannel/AdaptDatagramSocket.java
+++ b/jdk/test/java/nio/channels/DatagramChannel/AdaptDatagramSocket.java
@@ -25,6 +25,7 @@
* @bug 4313882 4981129
* @summary Unit test for datagram-socket-channel adaptors
* @library ..
+ * @key randomness
*/
import java.net.*;
diff --git a/jdk/test/java/nio/channels/DatagramChannel/MulticastSendReceiveTests.java b/jdk/test/java/nio/channels/DatagramChannel/MulticastSendReceiveTests.java
index 848f2820954..db061a833fc 100644
--- a/jdk/test/java/nio/channels/DatagramChannel/MulticastSendReceiveTests.java
+++ b/jdk/test/java/nio/channels/DatagramChannel/MulticastSendReceiveTests.java
@@ -27,6 +27,7 @@
* @build MulticastSendReceiveTests NetworkConfiguration
* @run main MulticastSendReceiveTests
* @run main/othervm -Djava.net.preferIPv4Stack=true MulticastSendReceiveTests
+ * @key randomness
*/
import java.nio.ByteBuffer;
diff --git a/jdk/test/java/nio/channels/DatagramChannel/Promiscuous.java b/jdk/test/java/nio/channels/DatagramChannel/Promiscuous.java
index 027b4b79eea..884baaf581a 100644
--- a/jdk/test/java/nio/channels/DatagramChannel/Promiscuous.java
+++ b/jdk/test/java/nio/channels/DatagramChannel/Promiscuous.java
@@ -28,6 +28,7 @@
* @build Promiscuous NetworkConfiguration
* @run main Promiscuous
* @run main/othervm -Djava.net.preferIPv4Stack=true Promiscuous
+ * @key randomness
*/
import java.nio.ByteBuffer;
diff --git a/jdk/test/java/nio/channels/FileChannel/AtomicAppend.java b/jdk/test/java/nio/channels/FileChannel/AtomicAppend.java
index 25f6b64924c..8e00c60bfd4 100644
--- a/jdk/test/java/nio/channels/FileChannel/AtomicAppend.java
+++ b/jdk/test/java/nio/channels/FileChannel/AtomicAppend.java
@@ -24,6 +24,7 @@
/*
* @test
* @summary Check that appends are atomic
+ * @key randomness
*/
import java.io.File;
diff --git a/jdk/test/java/nio/channels/FileChannel/ClosedByInterrupt.java b/jdk/test/java/nio/channels/FileChannel/ClosedByInterrupt.java
index 153a2ad451f..a14d111b6f0 100644
--- a/jdk/test/java/nio/channels/FileChannel/ClosedByInterrupt.java
+++ b/jdk/test/java/nio/channels/FileChannel/ClosedByInterrupt.java
@@ -25,6 +25,7 @@
* @bug 6979009
* @summary Ensure ClosedByInterruptException is thrown when I/O operation
* interrupted by Thread.interrupt
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/java/nio/channels/FileChannel/MapTest.java b/jdk/test/java/nio/channels/FileChannel/MapTest.java
index 066d6097389..f2bbb08680e 100644
--- a/jdk/test/java/nio/channels/FileChannel/MapTest.java
+++ b/jdk/test/java/nio/channels/FileChannel/MapTest.java
@@ -25,6 +25,7 @@
* @bug 4429043 8002180
* @summary Test file mapping with FileChannel
* @run main/othervm MapTest
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/java/nio/channels/FileChannel/Position.java b/jdk/test/java/nio/channels/FileChannel/Position.java
index cbb7dd9de6e..825ba628248 100644
--- a/jdk/test/java/nio/channels/FileChannel/Position.java
+++ b/jdk/test/java/nio/channels/FileChannel/Position.java
@@ -24,6 +24,7 @@
/* @test
* @bug 4429043 6526860
* @summary Test position method of FileChannel
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/java/nio/channels/FileChannel/Pread.java b/jdk/test/java/nio/channels/FileChannel/Pread.java
index fca93f97f3f..8e3dd026c94 100644
--- a/jdk/test/java/nio/channels/FileChannel/Pread.java
+++ b/jdk/test/java/nio/channels/FileChannel/Pread.java
@@ -24,6 +24,7 @@
/* @test
* @bug 4862382 4862408
* @summary Test positional read method of FileChannel
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/java/nio/channels/FileChannel/Pwrite.java b/jdk/test/java/nio/channels/FileChannel/Pwrite.java
index 21f1c298b63..94f7780328e 100644
--- a/jdk/test/java/nio/channels/FileChannel/Pwrite.java
+++ b/jdk/test/java/nio/channels/FileChannel/Pwrite.java
@@ -24,6 +24,7 @@
/* @test
* @bug 4862411
* @summary Test positional write method of FileChannel
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/java/nio/channels/FileChannel/Size.java b/jdk/test/java/nio/channels/FileChannel/Size.java
index 8a658e07b05..d06ba81fa51 100644
--- a/jdk/test/java/nio/channels/FileChannel/Size.java
+++ b/jdk/test/java/nio/channels/FileChannel/Size.java
@@ -25,6 +25,7 @@
* @bug 4563125
* @summary Test size method of FileChannel
* @run main/othervm Size
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/java/nio/channels/FileChannel/Transfer.java b/jdk/test/java/nio/channels/FileChannel/Transfer.java
index e9524be7b5f..04a0f3251b2 100644
--- a/jdk/test/java/nio/channels/FileChannel/Transfer.java
+++ b/jdk/test/java/nio/channels/FileChannel/Transfer.java
@@ -26,6 +26,7 @@
* 6984545
* @summary Test FileChannel.transferFrom and transferTo
* @library ..
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/java/nio/channels/FileChannel/Truncate.java b/jdk/test/java/nio/channels/FileChannel/Truncate.java
index ff62d724a98..38a020d7de8 100644
--- a/jdk/test/java/nio/channels/FileChannel/Truncate.java
+++ b/jdk/test/java/nio/channels/FileChannel/Truncate.java
@@ -24,6 +24,7 @@
/* @test
* @bug 6191269 6709457 8000330
* @summary Test truncate method of FileChannel
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/java/nio/channels/Pipe/PipeChannel.java b/jdk/test/java/nio/channels/Pipe/PipeChannel.java
index 0ec9aaed735..2aaa4f84f08 100644
--- a/jdk/test/java/nio/channels/Pipe/PipeChannel.java
+++ b/jdk/test/java/nio/channels/Pipe/PipeChannel.java
@@ -23,6 +23,7 @@
/* @test
* @summary Test reading and writing from Pipes
+ * @key randomness
*/
import java.io.*;
@@ -37,7 +38,7 @@ import java.util.Random;
*/
public class PipeChannel {
- private static Random generator = new Random();
+ private static Random generator = new Random();
public static void main(String[] args) throws Exception {
for (int x=0; x<100; x++) {
diff --git a/jdk/test/java/nio/channels/Pipe/ScatteringRead.java b/jdk/test/java/nio/channels/Pipe/ScatteringRead.java
index 83b520ceda5..a2685eea55f 100644
--- a/jdk/test/java/nio/channels/Pipe/ScatteringRead.java
+++ b/jdk/test/java/nio/channels/Pipe/ScatteringRead.java
@@ -22,8 +22,9 @@
*/
/* @test
- @bug 4526754
+ * @bug 4526754
* @summary Test Pipe scattering reads
+ * @key randomness
*/
import java.nio.channels.*;
diff --git a/jdk/test/java/nio/channels/Pipe/SelectPipe.java b/jdk/test/java/nio/channels/Pipe/SelectPipe.java
index 85938eb1789..f782ee3ae1f 100644
--- a/jdk/test/java/nio/channels/Pipe/SelectPipe.java
+++ b/jdk/test/java/nio/channels/Pipe/SelectPipe.java
@@ -23,6 +23,7 @@
/* @test
* @summary Test selection of ready pipe
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/java/nio/channels/Selector/SelectorTest.java b/jdk/test/java/nio/channels/Selector/SelectorTest.java
index 8e835d88e2b..bd17d001816 100644
--- a/jdk/test/java/nio/channels/Selector/SelectorTest.java
+++ b/jdk/test/java/nio/channels/Selector/SelectorTest.java
@@ -24,6 +24,7 @@
/* @test
* @summary Test selectors and socketchannels
* @library ..
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/java/nio/channels/ServerSocketChannel/NonBlockingAccept.java b/jdk/test/java/nio/channels/ServerSocketChannel/NonBlockingAccept.java
index 7a425ad88ed..1b985e8c68a 100644
--- a/jdk/test/java/nio/channels/ServerSocketChannel/NonBlockingAccept.java
+++ b/jdk/test/java/nio/channels/ServerSocketChannel/NonBlockingAccept.java
@@ -27,6 +27,7 @@
* @library ..
* @build TestUtil
* @run main NonBlockingAccept
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/java/nio/channels/SocketChannel/CloseDuringWrite.java b/jdk/test/java/nio/channels/SocketChannel/CloseDuringWrite.java
index 83d05bfd96e..50b7dbb3747 100644
--- a/jdk/test/java/nio/channels/SocketChannel/CloseDuringWrite.java
+++ b/jdk/test/java/nio/channels/SocketChannel/CloseDuringWrite.java
@@ -23,6 +23,7 @@
/* @test
* @summary Test asynchronous close during a blocking write
+ * @key randomness
*/
import java.io.Closeable;
diff --git a/jdk/test/java/nio/channels/SocketChannel/OutOfBand.java b/jdk/test/java/nio/channels/SocketChannel/OutOfBand.java
index 68b973dca89..cd46f9ee6a2 100644
--- a/jdk/test/java/nio/channels/SocketChannel/OutOfBand.java
+++ b/jdk/test/java/nio/channels/SocketChannel/OutOfBand.java
@@ -24,6 +24,7 @@
/* @test
* @summary Test socket adapter sendUrgentData method
* @bug 6963907
+ * @key randomness
*/
import java.net.*;
diff --git a/jdk/test/java/nio/channels/SocketChannel/ShortWrite.java b/jdk/test/java/nio/channels/SocketChannel/ShortWrite.java
index 0988006800a..c1d7c33fc5d 100644
--- a/jdk/test/java/nio/channels/SocketChannel/ShortWrite.java
+++ b/jdk/test/java/nio/channels/SocketChannel/ShortWrite.java
@@ -24,6 +24,7 @@
/* @test
* @bug 7176630 7074436
* @summary Check for short writes on SocketChannels configured in blocking mode
+ * @key randomness
*/
import java.net.*;
diff --git a/jdk/test/java/nio/channels/SocketChannel/VectorIO.java b/jdk/test/java/nio/channels/SocketChannel/VectorIO.java
index 84c5a7f59e8..d7975dbfa44 100644
--- a/jdk/test/java/nio/channels/SocketChannel/VectorIO.java
+++ b/jdk/test/java/nio/channels/SocketChannel/VectorIO.java
@@ -24,6 +24,7 @@
/* @test
* @summary Test socketchannel vector IO
* @library ..
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/java/nio/channels/etc/AdaptorCloseAndInterrupt.java b/jdk/test/java/nio/channels/etc/AdaptorCloseAndInterrupt.java
index 8d99fde7a41..292851873ca 100644
--- a/jdk/test/java/nio/channels/etc/AdaptorCloseAndInterrupt.java
+++ b/jdk/test/java/nio/channels/etc/AdaptorCloseAndInterrupt.java
@@ -24,6 +24,7 @@
/* @test
* @bug 7184932
* @summary Test asynchronous close and interrupt of timed socket adapter methods
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/java/nio/charset/coders/BashCache.java b/jdk/test/java/nio/charset/coders/BashCache.java
index 2019af82393..2ded5c0ce07 100644
--- a/jdk/test/java/nio/charset/coders/BashCache.java
+++ b/jdk/test/java/nio/charset/coders/BashCache.java
@@ -24,6 +24,7 @@
/* @test
* @bug 4517279
* @summary Stochastic test of thread-local coder caches
+ * @key randomness
*/
import java.nio.*;
diff --git a/jdk/test/java/nio/charset/coders/BashStreams.java b/jdk/test/java/nio/charset/coders/BashStreams.java
index 5781464aeee..15ea14c3ddf 100644
--- a/jdk/test/java/nio/charset/coders/BashStreams.java
+++ b/jdk/test/java/nio/charset/coders/BashStreams.java
@@ -23,6 +23,7 @@
/* @test
* @summary Stochastic test of charset-based streams
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/java/nio/file/Files/BytesAndLines.java b/jdk/test/java/nio/file/Files/BytesAndLines.java
index c3a1db74ce1..ca486ab87fc 100644
--- a/jdk/test/java/nio/file/Files/BytesAndLines.java
+++ b/jdk/test/java/nio/file/Files/BytesAndLines.java
@@ -27,6 +27,7 @@
* @run testng BytesAndLines
* @summary Unit test for methods for Files readAllBytes, readAllLines and
* and write methods.
+ * @key randomness
*/
import java.nio.ByteBuffer;
diff --git a/jdk/test/java/nio/file/Files/CopyAndMove.java b/jdk/test/java/nio/file/Files/CopyAndMove.java
index 4853b0dcdf4..38470cc810b 100644
--- a/jdk/test/java/nio/file/Files/CopyAndMove.java
+++ b/jdk/test/java/nio/file/Files/CopyAndMove.java
@@ -27,6 +27,7 @@
* @library ..
* @build CopyAndMove PassThroughFileSystem
* @run main/othervm CopyAndMove
+ * @key randomness
*/
import java.nio.ByteBuffer;
diff --git a/jdk/test/java/nio/file/Files/walkFileTree/SkipSiblings.java b/jdk/test/java/nio/file/Files/walkFileTree/SkipSiblings.java
index bcdc4e1256c..d7bbdd974bc 100644
--- a/jdk/test/java/nio/file/Files/walkFileTree/SkipSiblings.java
+++ b/jdk/test/java/nio/file/Files/walkFileTree/SkipSiblings.java
@@ -27,6 +27,7 @@
* @library ../..
* @compile SkipSiblings.java CreateFileTree.java
* @run main SkipSiblings
+ * @key randomness
*/
import java.nio.file.*;
diff --git a/jdk/test/java/nio/file/Files/walkFileTree/SkipSubtree.java b/jdk/test/java/nio/file/Files/walkFileTree/SkipSubtree.java
index c5522839b5b..8a2eeb7d1ff 100644
--- a/jdk/test/java/nio/file/Files/walkFileTree/SkipSubtree.java
+++ b/jdk/test/java/nio/file/Files/walkFileTree/SkipSubtree.java
@@ -27,6 +27,7 @@
* @library ../..
* @compile SkipSubtree.java CreateFileTree.java
* @run main SkipSubtree
+ * @key randomness
*/
import java.nio.file.*;
import java.nio.file.attribute.BasicFileAttributes;
diff --git a/jdk/test/java/nio/file/Files/walkFileTree/TerminateWalk.java b/jdk/test/java/nio/file/Files/walkFileTree/TerminateWalk.java
index a4b3cf724d5..445b7bfe33c 100644
--- a/jdk/test/java/nio/file/Files/walkFileTree/TerminateWalk.java
+++ b/jdk/test/java/nio/file/Files/walkFileTree/TerminateWalk.java
@@ -27,6 +27,7 @@
* @library ../..
* @compile TerminateWalk.java CreateFileTree.java
* @run main TerminateWalk
+ * @key randomness
*/
import java.nio.file.*;
diff --git a/jdk/test/java/nio/file/WatchService/LotsOfEvents.java b/jdk/test/java/nio/file/WatchService/LotsOfEvents.java
index 64ab7aca65d..042dfd94146 100644
--- a/jdk/test/java/nio/file/WatchService/LotsOfEvents.java
+++ b/jdk/test/java/nio/file/WatchService/LotsOfEvents.java
@@ -26,6 +26,7 @@
* @summary Tests WatchService behavior when lots of events are pending
* @library ..
* @run main/timeout=180 LotsOfEvents
+ * @key randomness
*/
import java.nio.file.*;
diff --git a/jdk/test/java/nio/file/WatchService/MayFlies.java b/jdk/test/java/nio/file/WatchService/MayFlies.java
index ad0ed4c4131..3052ff6e695 100644
--- a/jdk/test/java/nio/file/WatchService/MayFlies.java
+++ b/jdk/test/java/nio/file/WatchService/MayFlies.java
@@ -27,6 +27,7 @@
* short lived files
* @library ..
* @run main MayFlies
+ * @key randomness
*/
import java.nio.file.*;
diff --git a/jdk/test/java/nio/file/WatchService/SensitivityModifier.java b/jdk/test/java/nio/file/WatchService/SensitivityModifier.java
index 4b7629db204..823539d1a23 100644
--- a/jdk/test/java/nio/file/WatchService/SensitivityModifier.java
+++ b/jdk/test/java/nio/file/WatchService/SensitivityModifier.java
@@ -26,6 +26,7 @@
* @summary Sanity test for Sun-specific sensitivity level watch event modifier
* @library ..
* @run main/timeout=240 SensitivityModifier
+ * @key randomness
*/
import java.nio.file.*;
diff --git a/jdk/test/java/nio/file/attribute/AclFileAttributeView/Basic.java b/jdk/test/java/nio/file/attribute/AclFileAttributeView/Basic.java
index aa613e22b78..00afd2cd1bf 100644
--- a/jdk/test/java/nio/file/attribute/AclFileAttributeView/Basic.java
+++ b/jdk/test/java/nio/file/attribute/AclFileAttributeView/Basic.java
@@ -25,6 +25,7 @@
* @bug 4313887 6838333 6891404
* @summary Unit test for java.nio.file.attribute.AclFileAttribueView
* @library ../..
+ * @key randomness
*/
import java.nio.file.*;
diff --git a/jdk/test/java/nio/file/attribute/FileTime/Basic.java b/jdk/test/java/nio/file/attribute/FileTime/Basic.java
index 8731ce77147..9e18d81d3db 100644
--- a/jdk/test/java/nio/file/attribute/FileTime/Basic.java
+++ b/jdk/test/java/nio/file/attribute/FileTime/Basic.java
@@ -24,6 +24,7 @@
/* @test
* @bug 6844313 8011647
* @summary Unit test for java.nio.file.FileTime
+ * @key randomness
*/
diff --git a/jdk/test/java/nio/file/attribute/UserDefinedFileAttributeView/Basic.java b/jdk/test/java/nio/file/attribute/UserDefinedFileAttributeView/Basic.java
index 69393a30a61..5f40d193cf0 100644
--- a/jdk/test/java/nio/file/attribute/UserDefinedFileAttributeView/Basic.java
+++ b/jdk/test/java/nio/file/attribute/UserDefinedFileAttributeView/Basic.java
@@ -25,6 +25,7 @@
* @bug 4313887 6838333
* @summary Unit test for java.nio.file.attribute.UserDefinedFileAttributeView
* @library ../..
+ * @key randomness
*/
import java.nio.ByteBuffer;
diff --git a/jdk/test/java/security/MessageDigest/ByteBuffers.java b/jdk/test/java/security/MessageDigest/ByteBuffers.java
index 4ce30846368..dd3467d0e67 100644
--- a/jdk/test/java/security/MessageDigest/ByteBuffers.java
+++ b/jdk/test/java/security/MessageDigest/ByteBuffers.java
@@ -26,6 +26,7 @@
* @bug 4844847
* @summary Test the MessageDigest.update(ByteBuffer) method
* @author Andreas Sterbenz
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/java/security/MessageDigest/TestDigestIOStream.java b/jdk/test/java/security/MessageDigest/TestDigestIOStream.java
index 46028e85af8..868da86ef62 100644
--- a/jdk/test/java/security/MessageDigest/TestDigestIOStream.java
+++ b/jdk/test/java/security/MessageDigest/TestDigestIOStream.java
@@ -36,6 +36,7 @@ import static java.lang.System.out;
* @bug 8050370
* @summary MessageDigest tests with DigestIOStream
* @author Kevin Liu
+ * @key randomness
*/
enum ReadModel {
diff --git a/jdk/test/java/security/MessageDigest/TestSameLength.java b/jdk/test/java/security/MessageDigest/TestSameLength.java
index eb59815c9bd..666baf3e69e 100644
--- a/jdk/test/java/security/MessageDigest/TestSameLength.java
+++ b/jdk/test/java/security/MessageDigest/TestSameLength.java
@@ -33,6 +33,7 @@ import java.util.Random;
* @summary Check md.getDigestLength() equal digest output length with various
* algorithm/dataLen/(update,digest methods).
* @author Kevin Liu
+ * @key randomness
*/
public class TestSameLength {
diff --git a/jdk/test/java/security/MessageDigest/TestSameValue.java b/jdk/test/java/security/MessageDigest/TestSameValue.java
index aef4ceae402..56b8652264a 100644
--- a/jdk/test/java/security/MessageDigest/TestSameValue.java
+++ b/jdk/test/java/security/MessageDigest/TestSameValue.java
@@ -34,6 +34,7 @@ import java.util.Random;
* @summary Check md.digest(data) value whether same with digest output value
* with various update/digest methods.
* @author Kevin Liu
+ * @key randomness
*/
public class TestSameValue {
diff --git a/jdk/test/java/security/Signature/ByteBuffers.java b/jdk/test/java/security/Signature/ByteBuffers.java
index e3063511d90..937c9842c3b 100644
--- a/jdk/test/java/security/Signature/ByteBuffers.java
+++ b/jdk/test/java/security/Signature/ByteBuffers.java
@@ -26,6 +26,7 @@
* @bug 4844847
* @summary Test the Signature.update(ByteBuffer) method
* @author Andreas Sterbenz
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/java/security/Signature/NONEwithRSA.java b/jdk/test/java/security/Signature/NONEwithRSA.java
index 16f7b53f087..6d18c7ac96f 100644
--- a/jdk/test/java/security/Signature/NONEwithRSA.java
+++ b/jdk/test/java/security/Signature/NONEwithRSA.java
@@ -26,6 +26,7 @@
* @bug 4955844
* @summary ensure that the NONEwithRSA adapter works correctly
* @author Andreas Sterbenz
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/java/security/spec/EllipticCurveMatch.java b/jdk/test/java/security/spec/EllipticCurveMatch.java
index 797f6d2e0f3..85af7df9a34 100644
--- a/jdk/test/java/security/spec/EllipticCurveMatch.java
+++ b/jdk/test/java/security/spec/EllipticCurveMatch.java
@@ -26,6 +26,7 @@
* @bug 6738532
* @summary Check EllipticCurve.equals() does not compare seed value of curve.
* @author Mike StJohns
+ * @key randomness
*/
import java.security.spec.*;
diff --git a/jdk/test/java/sql/JavatimeTest.java b/jdk/test/java/sql/JavatimeTest.java
index 3ff70d007d1..89344d7cdc6 100644
--- a/jdk/test/java/sql/JavatimeTest.java
+++ b/jdk/test/java/sql/JavatimeTest.java
@@ -25,6 +25,7 @@
*@test
*@bug 8007520
*@summary Test those bridge methods to/from java.time date/time classes
+ * @key randomness
*/
import java.util.Random;
diff --git a/jdk/test/java/text/Format/MessageFormat/Bug7003643.java b/jdk/test/java/text/Format/MessageFormat/Bug7003643.java
index aeb722cac17..35af811d221 100644
--- a/jdk/test/java/text/Format/MessageFormat/Bug7003643.java
+++ b/jdk/test/java/text/Format/MessageFormat/Bug7003643.java
@@ -25,6 +25,7 @@
* @test
* @bug 7003643
* @summary Make sure MessageFormat.toPattern produces correct quoting. (SPI part is tested in PluggableLocale tests.)
+ * @key randomness
*/
import java.text.*;
diff --git a/jdk/test/java/time/tck/java/time/TCKLocalDateTime.java b/jdk/test/java/time/tck/java/time/TCKLocalDateTime.java
index 51b1163dbca..93b385011d7 100644
--- a/jdk/test/java/time/tck/java/time/TCKLocalDateTime.java
+++ b/jdk/test/java/time/tck/java/time/TCKLocalDateTime.java
@@ -107,8 +107,6 @@ import static org.testng.Assert.assertSame;
import static org.testng.Assert.assertTrue;
import static org.testng.Assert.fail;
-import java.io.ByteArrayOutputStream;
-import java.io.DataOutputStream;
import java.time.Clock;
import java.time.DateTimeException;
import java.time.DayOfWeek;
@@ -260,16 +258,17 @@ public class TCKLocalDateTime extends AbstractDateTimeTest {
//-----------------------------------------------------------------------
@Test(timeOut=30000) // TODO: remove when time zone loading is faster
public void now() {
+ final long DELTA = 20_000_000_000L; // 20 seconds of nanos leeway
LocalDateTime expected = LocalDateTime.now(Clock.systemDefaultZone());
LocalDateTime test = LocalDateTime.now();
long diff = Math.abs(test.toLocalTime().toNanoOfDay() - expected.toLocalTime().toNanoOfDay());
- if (diff >= 100000000) {
+ if (diff >= DELTA) {
// may be date change
expected = LocalDateTime.now(Clock.systemDefaultZone());
test = LocalDateTime.now();
diff = Math.abs(test.toLocalTime().toNanoOfDay() - expected.toLocalTime().toNanoOfDay());
}
- assertTrue(diff < 100000000); // less than 0.1 secs
+ assertTrue(diff < DELTA);
}
//-----------------------------------------------------------------------
diff --git a/jdk/test/java/time/tck/java/time/TCKOffsetDateTime.java b/jdk/test/java/time/tck/java/time/TCKOffsetDateTime.java
index b77b7a8ba15..991b447a506 100644
--- a/jdk/test/java/time/tck/java/time/TCKOffsetDateTime.java
+++ b/jdk/test/java/time/tck/java/time/TCKOffsetDateTime.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, 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
@@ -104,8 +104,6 @@ import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;
import static org.testng.Assert.fail;
-import java.io.ByteArrayOutputStream;
-import java.io.DataOutputStream;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.time.Clock;
@@ -235,16 +233,17 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest {
//-----------------------------------------------------------------------
@Test
public void now() {
+ final long DELTA = 20_000_000_000L; // 20 seconds of nanos leeway
OffsetDateTime expected = OffsetDateTime.now(Clock.systemDefaultZone());
OffsetDateTime test = OffsetDateTime.now();
long diff = Math.abs(test.toLocalTime().toNanoOfDay() - expected.toLocalTime().toNanoOfDay());
- if (diff >= 100000000) {
+ if (diff >= DELTA) {
// may be date change
expected = OffsetDateTime.now(Clock.systemDefaultZone());
test = OffsetDateTime.now();
diff = Math.abs(test.toLocalTime().toNanoOfDay() - expected.toLocalTime().toNanoOfDay());
}
- assertTrue(diff < 100000000); // less than 0.1 secs
+ assertTrue(diff < DELTA);
}
//-----------------------------------------------------------------------
diff --git a/jdk/test/java/time/tck/java/time/TCKOffsetTime.java b/jdk/test/java/time/tck/java/time/TCKOffsetTime.java
index d373be443f3..0882dfcb19e 100644
--- a/jdk/test/java/time/tck/java/time/TCKOffsetTime.java
+++ b/jdk/test/java/time/tck/java/time/TCKOffsetTime.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, 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
@@ -89,8 +89,6 @@ import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.assertTrue;
import static org.testng.Assert.fail;
-import java.io.ByteArrayOutputStream;
-import java.io.DataOutputStream;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.time.Clock;
@@ -202,12 +200,19 @@ public class TCKOffsetTime extends AbstractDateTimeTest {
//-----------------------------------------------------------------------
@Test
public void now() {
+ final long DELTA = 20_000_000_000L; // 20 seconds of nanos leeway
ZonedDateTime nowDT = ZonedDateTime.now();
OffsetTime expected = OffsetTime.now(Clock.systemDefaultZone());
OffsetTime test = OffsetTime.now();
long diff = Math.abs(test.toLocalTime().toNanoOfDay() - expected.toLocalTime().toNanoOfDay());
- assertTrue(diff < 100000000); // less than 0.1 secs
+ if (diff >= DELTA) {
+ // may be date change
+ expected = OffsetTime.now(Clock.systemDefaultZone());
+ test = OffsetTime.now();
+ diff = Math.abs(test.toLocalTime().toNanoOfDay() - expected.toLocalTime().toNanoOfDay());
+ }
+ assertTrue(diff < DELTA);
assertEquals(test.getOffset(), nowDT.getOffset());
}
diff --git a/jdk/test/java/util/Arrays/ArrayObjectMethods.java b/jdk/test/java/util/Arrays/ArrayObjectMethods.java
index 8010f1b1d80..3d3e928b08c 100644
--- a/jdk/test/java/util/Arrays/ArrayObjectMethods.java
+++ b/jdk/test/java/util/Arrays/ArrayObjectMethods.java
@@ -26,6 +26,7 @@
* @bug 4906359 6239296
* @summary Basic test for content-based array object methods
* @author Josh Bloch, Martin Buchholz
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/java/util/Arrays/CopyMethods.java b/jdk/test/java/util/Arrays/CopyMethods.java
index e19b8073a59..4e38e8adf21 100644
--- a/jdk/test/java/util/Arrays/CopyMethods.java
+++ b/jdk/test/java/util/Arrays/CopyMethods.java
@@ -26,6 +26,7 @@
* @bug 4655503
* @summary Test for array cloning and slicing methods.
* @author John Rose
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/java/util/Arrays/Correct.java b/jdk/test/java/util/Arrays/Correct.java
index 93301619928..e9ddc7edef5 100644
--- a/jdk/test/java/util/Arrays/Correct.java
+++ b/jdk/test/java/util/Arrays/Correct.java
@@ -26,6 +26,7 @@
* @bug 4726380 8037097
* @summary Check that different sorts give equivalent results.
* @run testng Correct
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/java/util/Base64/TestBase64.java b/jdk/test/java/util/Base64/TestBase64.java
index 5466cf33355..bb2330721ec 100644
--- a/jdk/test/java/util/Base64/TestBase64.java
+++ b/jdk/test/java/util/Base64/TestBase64.java
@@ -25,6 +25,7 @@
* @test 4235519 8004212 8005394 8007298 8006295 8006315 8006530 8007379 8008925
* 8014217 8025003 8026330 8028397
* @summary tests java.util.Base64
+ * @key randomness
*/
import java.io.ByteArrayInputStream;
diff --git a/jdk/test/java/util/BitSet/BSMethods.java b/jdk/test/java/util/BitSet/BSMethods.java
index 86d7499a428..b8ed8b31999 100644
--- a/jdk/test/java/util/BitSet/BSMethods.java
+++ b/jdk/test/java/util/BitSet/BSMethods.java
@@ -27,6 +27,7 @@
* @summary Test the operation of the methods of BitSet class
* @author Mike McCloskey, Martin Buchholz
* @run main/othervm BSMethods
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/java/util/BitSet/ImportExport.java b/jdk/test/java/util/BitSet/ImportExport.java
index 9554b2e4ba4..6d01ab4b7c5 100644
--- a/jdk/test/java/util/BitSet/ImportExport.java
+++ b/jdk/test/java/util/BitSet/ImportExport.java
@@ -26,6 +26,7 @@
* @bug 5037068
* @summary Test import/export constructors and methods
* @author Martin Buchholz
+ * @key randomness
*/
import java.nio.*;
diff --git a/jdk/test/java/util/BitSet/PreviousBits.java b/jdk/test/java/util/BitSet/PreviousBits.java
index bba55318fdd..e83a6df27a8 100644
--- a/jdk/test/java/util/BitSet/PreviousBits.java
+++ b/jdk/test/java/util/BitSet/PreviousBits.java
@@ -25,6 +25,7 @@
* @test
* @bug 6410729 6586631
* @summary Test previousClearBit, previousSetBit
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/java/util/Calendar/JavatimeTest.java b/jdk/test/java/util/Calendar/JavatimeTest.java
index 6a0a4ff9a66..7af6e9d4c03 100644
--- a/jdk/test/java/util/Calendar/JavatimeTest.java
+++ b/jdk/test/java/util/Calendar/JavatimeTest.java
@@ -25,6 +25,7 @@
*@test
*@bug 8007520 8008254
*@summary Test those bridge methods to/from java.time date/time classes
+ * @key randomness
*/
import java.util.Calendar;
diff --git a/jdk/test/java/util/Collection/MOAT.java b/jdk/test/java/util/Collection/MOAT.java
index f55a1e87745..e04659c4dda 100644
--- a/jdk/test/java/util/Collection/MOAT.java
+++ b/jdk/test/java/util/Collection/MOAT.java
@@ -30,6 +30,7 @@
* @summary Run many tests on many Collection and Map implementations
* @author Martin Buchholz
* @run main MOAT
+ * @key randomness
*/
/* Mother Of All (Collection) Tests
diff --git a/jdk/test/java/util/Collections/AddAll.java b/jdk/test/java/util/Collections/AddAll.java
index dc768206085..0f8e6d9d527 100644
--- a/jdk/test/java/util/Collections/AddAll.java
+++ b/jdk/test/java/util/Collections/AddAll.java
@@ -26,6 +26,7 @@
* @bug 4822887
* @summary Basic test for Collections.addAll
* @author Josh Bloch
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/java/util/Collections/CheckedListBash.java b/jdk/test/java/util/Collections/CheckedListBash.java
index dfaa8773d03..80d7e3fd475 100644
--- a/jdk/test/java/util/Collections/CheckedListBash.java
+++ b/jdk/test/java/util/Collections/CheckedListBash.java
@@ -26,6 +26,7 @@
* @bug 4904067
* @summary Unit test for Collections.checkedList
* @author Josh Bloch
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/java/util/Collections/CheckedMapBash.java b/jdk/test/java/util/Collections/CheckedMapBash.java
index 9a6aab1cafc..7f622aa8e23 100644
--- a/jdk/test/java/util/Collections/CheckedMapBash.java
+++ b/jdk/test/java/util/Collections/CheckedMapBash.java
@@ -27,6 +27,7 @@
* @summary Unit test for Collections.checkedMap
* @author Josh Bloch
* @run testng CheckedMapBash
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/java/util/Collections/CheckedSetBash.java b/jdk/test/java/util/Collections/CheckedSetBash.java
index 462792cf1d8..c24878a81af 100644
--- a/jdk/test/java/util/Collections/CheckedSetBash.java
+++ b/jdk/test/java/util/Collections/CheckedSetBash.java
@@ -27,6 +27,7 @@
* @summary Unit test for Collections.checkedSet
* @author Josh Bloch
* @run testng CheckedSetBash
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/java/util/Collections/Disjoint.java b/jdk/test/java/util/Collections/Disjoint.java
index 762f5164a67..e13241efbb7 100644
--- a/jdk/test/java/util/Collections/Disjoint.java
+++ b/jdk/test/java/util/Collections/Disjoint.java
@@ -26,6 +26,7 @@
* @bug 4339792
* @summary Basic test for Collections.disjoint
* @author Josh Bloch
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/java/util/Collections/Rotate.java b/jdk/test/java/util/Collections/Rotate.java
index aae1deb7bc0..a759e90e1d3 100644
--- a/jdk/test/java/util/Collections/Rotate.java
+++ b/jdk/test/java/util/Collections/Rotate.java
@@ -25,6 +25,7 @@
* @test
* @bug 4323074
* @summary Basic test for new rotate algorithm
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/java/util/EnumSet/EnumSetBash.java b/jdk/test/java/util/EnumSet/EnumSetBash.java
index a7ab57019cf..873c781bfe0 100644
--- a/jdk/test/java/util/EnumSet/EnumSetBash.java
+++ b/jdk/test/java/util/EnumSet/EnumSetBash.java
@@ -28,6 +28,7 @@
* @author Josh Bloch
* @author Neal Gafter
* @author Yo Ma Ma
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/java/util/HashSet/Serialization.java b/jdk/test/java/util/HashSet/Serialization.java
index 7597ae1a564..b6f9e55373e 100644
--- a/jdk/test/java/util/HashSet/Serialization.java
+++ b/jdk/test/java/util/HashSet/Serialization.java
@@ -34,6 +34,7 @@ import java.util.concurrent.ThreadLocalRandom;
* @test
* @bug 8016252
* @summary Verify that a serialized HashSet may successfully be deserialized.
+ * @key randomness
*/
public class Serialization {
diff --git a/jdk/test/java/util/IdentityHashMap/Capacity.java b/jdk/test/java/util/IdentityHashMap/Capacity.java
index 3114e6c16de..1be172efc49 100644
--- a/jdk/test/java/util/IdentityHashMap/Capacity.java
+++ b/jdk/test/java/util/IdentityHashMap/Capacity.java
@@ -39,6 +39,7 @@ import static org.testng.Assert.*;
* @summary IdentityHashMap reallocates storage when inserting expected
* number of elements
* @run testng Capacity
+ * @key randomness
*/
@Test
diff --git a/jdk/test/java/util/List/LockStep.java b/jdk/test/java/util/List/LockStep.java
index 70538fcb2bb..100b63f9fe8 100644
--- a/jdk/test/java/util/List/LockStep.java
+++ b/jdk/test/java/util/List/LockStep.java
@@ -26,6 +26,7 @@
* @bug 6359979
* @summary Compare List implementations for identical behavior
* @author Martin Buchholz
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/java/util/Map/LockStep.java b/jdk/test/java/util/Map/LockStep.java
index 35cf98b9d52..45754a2f644 100644
--- a/jdk/test/java/util/Map/LockStep.java
+++ b/jdk/test/java/util/Map/LockStep.java
@@ -25,6 +25,7 @@
* @test
* @bug 6612102
* @summary Test Map implementations for mutual compatibility
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/java/util/NavigableMap/LockStep.java b/jdk/test/java/util/NavigableMap/LockStep.java
index 62ffc72877d..94f2cb1c93e 100644
--- a/jdk/test/java/util/NavigableMap/LockStep.java
+++ b/jdk/test/java/util/NavigableMap/LockStep.java
@@ -29,6 +29,7 @@
* @run main/othervm -XX:+AggressiveOpts LockStep
* @run main/othervm -XX:+AggressiveOpts -Dthorough=true LockStep
* @author Martin Buchholz
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/java/util/PluggableLocale/ExecTest.sh b/jdk/test/java/util/PluggableLocale/ExecTest.sh
index 7e8a5365f45..888f9348e51 100644
--- a/jdk/test/java/util/PluggableLocale/ExecTest.sh
+++ b/jdk/test/java/util/PluggableLocale/ExecTest.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2007, 2015, 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
@@ -33,7 +33,7 @@
# Parameters:
# providersToTest: [foo|bar|foobar]
# java class name: <class name>
-# providersInExtDir: [true|false]
+# java security policy file: (Optional. Installs security manager if exists)
if [ "${TESTSRC}" = "" ]
then
@@ -113,8 +113,14 @@ else
exit $result
fi
+# security options
+if [ "$3" != "" ]
+then
+ SECURITYOPTS="-Djava.security.manager -Djava.security.policy=${TESTSRC}${FS}$3"
+fi
+
# run
-RUNCMD="${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -classpath ${CLASSPATHARG} $2 "
+RUNCMD="${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} ${SECURITYOPTS} -classpath ${CLASSPATHARG} $2 "
echo ${RUNCMD}
${RUNCMD}
diff --git a/jdk/test/java/util/PluggableLocale/PermissionTest.java b/jdk/test/java/util/PluggableLocale/PermissionTest.java
new file mode 100644
index 00000000000..c70c5d195cb
--- /dev/null
+++ b/jdk/test/java/util/PluggableLocale/PermissionTest.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+/*
+ *
+ */
+public class PermissionTest{
+
+ // Make sure provider impls can be instantiated under a security manager.ZZ
+ com.foo.BreakIteratorProviderImpl breakIP = new com.foo.BreakIteratorProviderImpl();
+ com.foo.CollatorProviderImpl collatorP = new com.foo.CollatorProviderImpl();
+ com.foo.DateFormatProviderImpl dateFP = new com.foo.DateFormatProviderImpl();
+ com.foo.DateFormatSymbolsProviderImpl dateFSP = new com.foo.DateFormatSymbolsProviderImpl();
+ com.foo.DecimalFormatSymbolsProviderImpl decimalFSP = new com.foo.DecimalFormatSymbolsProviderImpl();
+ com.foo.NumberFormatProviderImpl numberFP = new com.foo.NumberFormatProviderImpl();
+ com.bar.CurrencyNameProviderImpl currencyNP = new com.bar.CurrencyNameProviderImpl();
+ com.bar.CurrencyNameProviderImpl2 currencyNP2 = new com.bar.CurrencyNameProviderImpl2();
+ com.bar.LocaleNameProviderImpl localeNP = new com.bar.LocaleNameProviderImpl();
+ com.bar.TimeZoneNameProviderImpl tzNP = new com.bar.TimeZoneNameProviderImpl();
+ com.bar.GenericTimeZoneNameProviderImpl tzGenNP = new com.bar.GenericTimeZoneNameProviderImpl();
+ com.bar.CalendarDataProviderImpl calDataP = new com.bar.CalendarDataProviderImpl();
+ com.bar.CalendarNameProviderImpl calNameP = new com.bar.CalendarNameProviderImpl();
+
+ public static void main(String[] s) {
+ new PermissionTest();
+ }
+}
diff --git a/jdk/test/java/util/PluggableLocale/PermissionTest.sh b/jdk/test/java/util/PluggableLocale/PermissionTest.sh
new file mode 100644
index 00000000000..50a42f1ff3e
--- /dev/null
+++ b/jdk/test/java/util/PluggableLocale/PermissionTest.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+#
+# @test
+# @bug 8075545
+# @summary Check whether RuntimePermission("localeServiceProvider") is
+# handled correctly
+# @run shell ExecTest.sh foobar PermissionTest
+# @run shell/fail ExecTest.sh foobar PermissionTest dummy
+# @run shell ExecTest.sh foobar PermissionTest localeServiceProvider.policy
diff --git a/jdk/test/java/util/PluggableLocale/localeServiceProvider.policy b/jdk/test/java/util/PluggableLocale/localeServiceProvider.policy
new file mode 100644
index 00000000000..4a5d969c0b0
--- /dev/null
+++ b/jdk/test/java/util/PluggableLocale/localeServiceProvider.policy
@@ -0,0 +1,3 @@
+grant {
+ permission java.lang.RuntimePermission "localeServiceProvider";
+};
diff --git a/jdk/test/java/util/Properties/ConcurrentLoadAndStoreXML.java b/jdk/test/java/util/Properties/ConcurrentLoadAndStoreXML.java
index 7bb187c228c..ed573a46a67 100644
--- a/jdk/test/java/util/Properties/ConcurrentLoadAndStoreXML.java
+++ b/jdk/test/java/util/Properties/ConcurrentLoadAndStoreXML.java
@@ -25,6 +25,7 @@
* @bug 8005281
* @summary Test that the Properties storeToXML and loadFromXML methods are
* thread safe
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/java/util/Random/DistinctSeeds.java b/jdk/test/java/util/Random/DistinctSeeds.java
index fd2bcfcb658..ddd541b3c60 100644
--- a/jdk/test/java/util/Random/DistinctSeeds.java
+++ b/jdk/test/java/util/Random/DistinctSeeds.java
@@ -35,6 +35,7 @@
* @test
* @bug 4949279 6937857
* @summary Independent instantiations of Random() have distinct seeds.
+ * @key randomness
*/
import java.util.ArrayList;
diff --git a/jdk/test/java/util/Random/RandomStreamTest.java b/jdk/test/java/util/Random/RandomStreamTest.java
index e96d57e2639..269fec8045e 100644
--- a/jdk/test/java/util/Random/RandomStreamTest.java
+++ b/jdk/test/java/util/Random/RandomStreamTest.java
@@ -47,6 +47,7 @@ import static org.testng.Assert.*;
* @run testng RandomStreamTest
* @summary test stream methods on Random
* @author Brian Goetz
+ * @key randomness
*/
public class RandomStreamTest {
diff --git a/jdk/test/java/util/Random/RandomTest.java b/jdk/test/java/util/Random/RandomTest.java
index e56ffde1961..3055f5cbbcb 100644
--- a/jdk/test/java/util/Random/RandomTest.java
+++ b/jdk/test/java/util/Random/RandomTest.java
@@ -35,6 +35,7 @@ import static org.testng.Assert.*;
* @test
* @run testng RandomTest
* @summary test methods on Random
+ * @key randomness
*/
@Test
public class RandomTest {
diff --git a/jdk/test/java/util/ResourceBundle/Control/StressTest.java b/jdk/test/java/util/ResourceBundle/Control/StressTest.java
index abead81d2e5..9766606fba9 100644
--- a/jdk/test/java/util/ResourceBundle/Control/StressTest.java
+++ b/jdk/test/java/util/ResourceBundle/Control/StressTest.java
@@ -25,6 +25,7 @@
* @bug 5102289
* @summary Stress test for ResourceBundle.getBundle with ResourceBundle.Control.
* @run main/othervm -esa StressTest 2 15
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/java/util/SplittableRandom/SplittableRandomTest.java b/jdk/test/java/util/SplittableRandom/SplittableRandomTest.java
index 57e1a3434a3..c2e97c1612c 100644
--- a/jdk/test/java/util/SplittableRandom/SplittableRandomTest.java
+++ b/jdk/test/java/util/SplittableRandom/SplittableRandomTest.java
@@ -39,6 +39,7 @@ import static org.testng.AssertJUnit.assertTrue;
* @run testng SplittableRandomTest
* @run testng/othervm -Djava.util.secureRandomSeed=true SplittableRandomTest
* @summary test methods on SplittableRandom
+ * @key randomness
*/
@Test
public class SplittableRandomTest {
diff --git a/jdk/test/java/util/Timer/DelayOverflow.java b/jdk/test/java/util/Timer/DelayOverflow.java
index b72a155e1b5..bf36bcc5705 100644
--- a/jdk/test/java/util/Timer/DelayOverflow.java
+++ b/jdk/test/java/util/Timer/DelayOverflow.java
@@ -27,6 +27,7 @@
* @summary java.util.Timer schedule delay Long.MAX_VALUE causes task to execute multiple times
* @author Chris Hegarty
* @author Martin Buchholz
+ * @key randomness
*/
import java.util.Date;
diff --git a/jdk/test/java/util/Timer/Purge.java b/jdk/test/java/util/Timer/Purge.java
index 69c92881776..b753ec81bcd 100644
--- a/jdk/test/java/util/Timer/Purge.java
+++ b/jdk/test/java/util/Timer/Purge.java
@@ -25,6 +25,7 @@
* @test
* @bug 4481072
* @summary Basic test for purge method
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/java/util/UUID/Serial.java b/jdk/test/java/util/UUID/Serial.java
index 4a6d2714135..97badcc34ac 100644
--- a/jdk/test/java/util/UUID/Serial.java
+++ b/jdk/test/java/util/UUID/Serial.java
@@ -25,6 +25,7 @@
* @test
* @bug 5014447
* @summary Test deserialization of UUID
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/java/util/UUID/UUIDTest.java b/jdk/test/java/util/UUID/UUIDTest.java
index 93ad7ad3490..06b240fa9fa 100644
--- a/jdk/test/java/util/UUID/UUIDTest.java
+++ b/jdk/test/java/util/UUID/UUIDTest.java
@@ -24,6 +24,7 @@
/* @test
* @bug 4173528 5068772
* @summary Unit tests for java.util.UUID
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/java/util/WeakHashMap/GCDuringIteration.java b/jdk/test/java/util/WeakHashMap/GCDuringIteration.java
index 4744ecce181..a66ad9580d7 100644
--- a/jdk/test/java/util/WeakHashMap/GCDuringIteration.java
+++ b/jdk/test/java/util/WeakHashMap/GCDuringIteration.java
@@ -27,6 +27,7 @@
* @ignore until 6842353 is resolved
* @summary Check that iterators work properly in the presence of
* concurrent finalization and removal of elements.
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/java/util/concurrent/forkjoin/SubmissionTest.java b/jdk/test/java/util/concurrent/forkjoin/SubmissionTest.java
new file mode 100644
index 00000000000..5a3db577ddd
--- /dev/null
+++ b/jdk/test/java/util/concurrent/forkjoin/SubmissionTest.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.util.concurrent.ForkJoinPool;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+/*
+ * @test
+ * @bug 8078490
+ * @summary Test submission and execution of task without joining
+ */
+public class SubmissionTest {
+ public static void main(String[] args) throws Throwable {
+ final ForkJoinPool e = new ForkJoinPool(1);
+ final AtomicBoolean b = new AtomicBoolean();
+ final Runnable setFalse = () -> b.set(false);
+ for (int i = 0; i < 100000; i++) {
+ b.set(true);
+ e.execute(setFalse);
+ long st = System.nanoTime();
+ while (b.get()) {
+ if (System.nanoTime() - st >= TimeUnit.SECONDS.toNanos(10)) {
+ throw new RuntimeException("Submitted task failed to execute");
+ }
+ }
+ }
+ }
+}
diff --git a/jdk/test/java/util/logging/CheckZombieLockTest.java b/jdk/test/java/util/logging/CheckZombieLockTest.java
index ab65a814f0b..16909532ceb 100644
--- a/jdk/test/java/util/logging/CheckZombieLockTest.java
+++ b/jdk/test/java/util/logging/CheckZombieLockTest.java
@@ -37,6 +37,7 @@
* @run main/othervm CheckZombieLockTest CLEANUP
* @run main/othervm CheckZombieLockTest REUSE
* @run main/othervm CheckZombieLockTest CLEANUP
+ * @key randomness
*/
import java.io.File;
import java.io.IOException;
diff --git a/jdk/test/java/util/logging/DrainFindDeadlockTest.java b/jdk/test/java/util/logging/DrainFindDeadlockTest.java
index 13a959c07ff..6d0bd084346 100644
--- a/jdk/test/java/util/logging/DrainFindDeadlockTest.java
+++ b/jdk/test/java/util/logging/DrainFindDeadlockTest.java
@@ -36,6 +36,7 @@ import java.util.Map;
* @author jim.gish@oracle.com
* @build DrainFindDeadlockTest
* @run main/othervm/timeout=10 DrainFindDeadlockTest
+ * @key randomness
*/
/**
diff --git a/jdk/test/java/util/logging/FileHandlerLongLimit.java b/jdk/test/java/util/logging/FileHandlerLongLimit.java
index 67e4001fb81..0aa2fc04641 100644
--- a/jdk/test/java/util/logging/FileHandlerLongLimit.java
+++ b/jdk/test/java/util/logging/FileHandlerLongLimit.java
@@ -55,6 +55,7 @@ import java.util.logging.LoggingPermission;
* @run main/othervm FileHandlerLongLimit UNSECURE
* @run main/othervm FileHandlerLongLimit SECURE
* @author danielfuchs
+ * @key randomness
*/
public class FileHandlerLongLimit {
diff --git a/jdk/test/java/util/logging/FileHandlerPath.java b/jdk/test/java/util/logging/FileHandlerPath.java
index 93859091c9b..602d4cf9c7d 100644
--- a/jdk/test/java/util/logging/FileHandlerPath.java
+++ b/jdk/test/java/util/logging/FileHandlerPath.java
@@ -56,6 +56,7 @@ import java.util.logging.LoggingPermission;
* @run main/othervm FileHandlerPath UNSECURE
* @run main/othervm FileHandlerPath SECURE
* @author danielfuchs
+ * @key randomness
*/
public class FileHandlerPath {
diff --git a/jdk/test/java/util/logging/FileHandlerPatternExceptions.java b/jdk/test/java/util/logging/FileHandlerPatternExceptions.java
index a4026d9bde9..fdcafa04c57 100644
--- a/jdk/test/java/util/logging/FileHandlerPatternExceptions.java
+++ b/jdk/test/java/util/logging/FileHandlerPatternExceptions.java
@@ -49,6 +49,7 @@ import java.util.logging.LogManager;
* @run main/othervm FileHandlerPatternExceptions UNSECURE
* @run main/othervm FileHandlerPatternExceptions SECURE
* @author danielfuchs
+ * @key randomness
*/
public class FileHandlerPatternExceptions {
diff --git a/jdk/test/java/util/logging/LogManager/Configuration/ParentLoggerWithHandlerGC.java b/jdk/test/java/util/logging/LogManager/Configuration/ParentLoggerWithHandlerGC.java
index 491d7583243..38a6c56cbd5 100644
--- a/jdk/test/java/util/logging/LogManager/Configuration/ParentLoggerWithHandlerGC.java
+++ b/jdk/test/java/util/logging/LogManager/Configuration/ParentLoggerWithHandlerGC.java
@@ -59,6 +59,7 @@ import java.util.logging.LoggingPermission;
* @run main/othervm ParentLoggerWithHandlerGC UNSECURE
* @run main/othervm ParentLoggerWithHandlerGC SECURE
* @author danielfuchs
+ * @key randomness
*/
public class ParentLoggerWithHandlerGC {
diff --git a/jdk/test/java/util/logging/LoggingDeadlock.java b/jdk/test/java/util/logging/LoggingDeadlock.java
index 41c9e8b3d05..131c92942f7 100644
--- a/jdk/test/java/util/logging/LoggingDeadlock.java
+++ b/jdk/test/java/util/logging/LoggingDeadlock.java
@@ -30,6 +30,10 @@
*
* @build LoggingDeadlock
* @run main/timeout=15 LoggingDeadlock
+ * @key randomness
+ */
+
+/*
*
* There can be a deadlock between two class initializations.
* It happens if the LogManager.<clinit> and the Logger.<clinit>
diff --git a/jdk/test/java/util/logging/LoggingDeadlock2.java b/jdk/test/java/util/logging/LoggingDeadlock2.java
index c5b4e893738..b33a25191fc 100644
--- a/jdk/test/java/util/logging/LoggingDeadlock2.java
+++ b/jdk/test/java/util/logging/LoggingDeadlock2.java
@@ -29,6 +29,10 @@
*
* @build LoggingDeadlock2
* @run main LoggingDeadlock2
+ * @key randomness
+ */
+
+/*
*
* There is a clear deadlock between LogManager.<clinit> and
* Cleaner.run() methods.
diff --git a/jdk/test/java/util/logging/TestLogConfigurationDeadLockWithConf.java b/jdk/test/java/util/logging/TestLogConfigurationDeadLockWithConf.java
index 9bde8d516fc..af8651d38b3 100644
--- a/jdk/test/java/util/logging/TestLogConfigurationDeadLockWithConf.java
+++ b/jdk/test/java/util/logging/TestLogConfigurationDeadLockWithConf.java
@@ -46,6 +46,7 @@ import java.util.logging.Logger;
* caused by synchronization issues in Logger and LogManager.
* @run main/othervm TestLogConfigurationDeadLockWithConf
* @author danielfuchs
+ * @key randomness
*/
// This test is a best effort to try & detect issues. The test itself will run
// for 8secs. This is usually sufficient to detect issues.
diff --git a/jdk/test/java/util/prefs/CodePointZeroPrefsTest.java b/jdk/test/java/util/prefs/CodePointZeroPrefsTest.java
index eb7299b4d98..79fe3f3fb87 100644
--- a/jdk/test/java/util/prefs/CodePointZeroPrefsTest.java
+++ b/jdk/test/java/util/prefs/CodePointZeroPrefsTest.java
@@ -26,9 +26,8 @@ import java.util.prefs.PreferencesFactory;
/*
* @test
- * @bug 8068373
- * @requires os.family == "linux" | os.family == "solaris"
- * @summary Ensure writing a code point U+0000 null control character is detected.
+ * @bug 8068373 8075110 8075156
+ * @summary Ensure a code point U+0000 null control character is detected.
*/
public class CodePointZeroPrefsTest
{
@@ -36,52 +35,70 @@ public class CodePointZeroPrefsTest
{
int failures = 0;
- // Deliberately reflect so you can reproduce it on any platform.
- Constructor<? extends PreferencesFactory> constructor =
- Class.forName("java.util.prefs.FileSystemPreferencesFactory").asSubclass(PreferencesFactory.class).getDeclaredConstructor();
- constructor.setAccessible(true);
- PreferencesFactory factory = constructor.newInstance();
+ Preferences node = Preferences.userRoot().node("com/acme/testing");
- Preferences node = factory.userRoot().node("com/acme/testing");
+ // --- put() ---
// legal key and value
try {
node.put("a", "1");
} catch (IllegalArgumentException iae) {
- System.err.println("Unexpected IllegalArgumentException for legal key");
+ System.err.println("Unexpected IllegalArgumentException for legal put() key");
failures++;
}
// illegal key only
- int numIAEs = 0;
try {
node.put("a\u0000b", "1");
- System.err.println("IllegalArgumentException not thrown for illegal key");
+ System.err.println("IllegalArgumentException not thrown for illegal put() key");
failures++;
} catch (IllegalArgumentException iae) {
// do nothing
}
// illegal value only
- numIAEs = 0;
try {
node.put("ab", "2\u00003");
- System.err.println("IllegalArgumentException not thrown for illegal value");
+ System.err.println("IllegalArgumentException not thrown for illegal put() value");
failures++;
} catch (IllegalArgumentException iae) {
// do nothing
}
// illegal key and value
- numIAEs = 0;
try {
node.put("a\u0000b", "2\u00003");
- System.err.println("IllegalArgumentException not thrown for illegal entry");
+ System.err.println("IllegalArgumentException not thrown for illegal put() entry");
failures++;
} catch (IllegalArgumentException iae) {
// do nothing
}
+ // --- get ---
+
+ // illegal key only
+ try {
+ String theDefault = "default";
+ String value = node.get("a\u0000b", theDefault);
+ System.err.println("IllegalArgumentException not thrown for illegal get() key");
+ failures++;
+ } catch (IllegalArgumentException iae) {
+ // do nothing
+ }
+
+ // --- remove ---
+
+ // illegal key only
+ try {
+ node.remove("a\u0000b");
+ System.err.println("IllegalArgumentException not thrown for illegal remove() key");
+ failures++;
+ } catch (IllegalArgumentException iae) {
+ // do nothing
+ }
+
+ node.removeNode();
+
if (failures != 0) {
throw new RuntimeException("CodePointZeroPrefsTest failed with "
+ failures + " errors!");
diff --git a/jdk/test/java/util/regex/RegExTest.java b/jdk/test/java/util/regex/RegExTest.java
index f04f6f1e8c7..488b431b257 100644
--- a/jdk/test/java/util/regex/RegExTest.java
+++ b/jdk/test/java/util/regex/RegExTest.java
@@ -33,6 +33,7 @@
* 6350801 6676425 6878475 6919132 6931676 6948903 6990617 7014645 7039066
* 7067045 7014640 7189363 8007395 8013252 8013254 8012646 8023647 6559590
* 8027645 8035076 8039124 8035975 8074678
+ * @key randomness
*/
import java.util.function.Function;
diff --git a/jdk/test/java/util/zip/3GBZipFiles.sh b/jdk/test/java/util/zip/3GBZipFiles.sh
index 7661b8445d2..a03290f9cae 100644
--- a/jdk/test/java/util/zip/3GBZipFiles.sh
+++ b/jdk/test/java/util/zip/3GBZipFiles.sh
@@ -29,6 +29,7 @@
# @run shell 3GBZipFiles.sh 9986
# @ignore runs for hours and eats up 7 Gigabytes of disk space
# @run shell/timeout=604800 3GBZipFiles.sh 3141592653
+# @key randomness
# Command-line usage:
# javac FileBuilder.java && sh 3GBZipFiles.sh /path/to/jdk filesize
diff --git a/jdk/test/java/util/zip/DeInflate.java b/jdk/test/java/util/zip/DeInflate.java
index c3ca7acf71f..886c9d4bc47 100644
--- a/jdk/test/java/util/zip/DeInflate.java
+++ b/jdk/test/java/util/zip/DeInflate.java
@@ -25,6 +25,7 @@
* @test
* @bug 7110149
* @summary Test basic deflater & inflater functionality
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/java/util/zip/DeflateIn_InflateOut.java b/jdk/test/java/util/zip/DeflateIn_InflateOut.java
index 29edda840ef..dd69a7773eb 100644
--- a/jdk/test/java/util/zip/DeflateIn_InflateOut.java
+++ b/jdk/test/java/util/zip/DeflateIn_InflateOut.java
@@ -25,6 +25,7 @@
* @test
* @bug 4679743
* @summary Test basic functionality of DeflaterInputStream and InflaterOutputStream
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/java/util/zip/FlaterTest.java b/jdk/test/java/util/zip/FlaterTest.java
index 2179a1303ea..ff11ab0bd1c 100644
--- a/jdk/test/java/util/zip/FlaterTest.java
+++ b/jdk/test/java/util/zip/FlaterTest.java
@@ -26,6 +26,7 @@
* @bug 6348045
* @summary GZipOutputStream/InputStream goes critical(calls JNI_Get*Critical)
* and causes slowness. This test uses Deflater and Inflater directly.
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/java/util/zip/GZIP/Accordion.java b/jdk/test/java/util/zip/GZIP/Accordion.java
index fa5399e6221..a0d7494a26f 100644
--- a/jdk/test/java/util/zip/GZIP/Accordion.java
+++ b/jdk/test/java/util/zip/GZIP/Accordion.java
@@ -25,6 +25,7 @@
* @bug 5092263
* @summary GZIPInputStream o GZIPOutputStream === the identity stream
* @author Martin Buchholz
+ * @key randomness
*/
// To manually test for uncompressed streams larger than 2GB, do
diff --git a/jdk/test/java/util/zip/GZIP/GZIPInputStreamRead.java b/jdk/test/java/util/zip/GZIP/GZIPInputStreamRead.java
index ba87f78373a..56bd58e1aaf 100644
--- a/jdk/test/java/util/zip/GZIP/GZIPInputStreamRead.java
+++ b/jdk/test/java/util/zip/GZIP/GZIPInputStreamRead.java
@@ -25,6 +25,7 @@
* @bug 4691425
* @summary Test the read and write of GZIPInput/OutputStream, including
* concatenated .gz inputstream
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/java/util/zip/InflateIn_DeflateOut.java b/jdk/test/java/util/zip/InflateIn_DeflateOut.java
index 1e4ef2bd073..0747d22b0a2 100644
--- a/jdk/test/java/util/zip/InflateIn_DeflateOut.java
+++ b/jdk/test/java/util/zip/InflateIn_DeflateOut.java
@@ -25,6 +25,7 @@
* @test
* @bug 4206909 4813885
* @summary Test basic functionality of DeflaterOutputStream/InflaterInputStream and GZIPOutputStream/GZIPInputStream, including flush
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/java/util/zip/InflaterBufferSize.java b/jdk/test/java/util/zip/InflaterBufferSize.java
index cf5363fca3e..1c512ec2c3d 100644
--- a/jdk/test/java/util/zip/InflaterBufferSize.java
+++ b/jdk/test/java/util/zip/InflaterBufferSize.java
@@ -26,6 +26,7 @@
* @bug 6571338
* @summary Inflater should not require a buffer to the inflate() methods
* larger than 1 byte.
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/java/util/zip/TimeChecksum.java b/jdk/test/java/util/zip/TimeChecksum.java
index cc81f1e7592..d6eb44f77f1 100644
--- a/jdk/test/java/util/zip/TimeChecksum.java
+++ b/jdk/test/java/util/zip/TimeChecksum.java
@@ -25,6 +25,7 @@
/* @test
* @bug 7109837
* @summary Test Adler32/CRC32.update(ByteBuffer)
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/java/util/zip/TotalInOut.java b/jdk/test/java/util/zip/TotalInOut.java
index 1ea12b3b82c..c7f22a63b31 100644
--- a/jdk/test/java/util/zip/TotalInOut.java
+++ b/jdk/test/java/util/zip/TotalInOut.java
@@ -24,6 +24,7 @@
/* @test
* @bug 7188852
* @summary Test De/Inflater.getBytesRead/Written()
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/java/util/zip/ZipFile/Assortment.java b/jdk/test/java/util/zip/ZipFile/Assortment.java
index b890b31ff1a..61cf415d51a 100644
--- a/jdk/test/java/util/zip/ZipFile/Assortment.java
+++ b/jdk/test/java/util/zip/ZipFile/Assortment.java
@@ -25,6 +25,7 @@
* @bug 4770745 6234507 6303183 8048990
* @summary test a variety of zip file entries
* @author Martin Buchholz
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/java/util/zip/ZipFile/ClearStaleZipFileInputStreams.java b/jdk/test/java/util/zip/ZipFile/ClearStaleZipFileInputStreams.java
index d1be7dc9cc6..2ba02300012 100644
--- a/jdk/test/java/util/zip/ZipFile/ClearStaleZipFileInputStreams.java
+++ b/jdk/test/java/util/zip/ZipFile/ClearStaleZipFileInputStreams.java
@@ -30,6 +30,7 @@
* @bug 7031076
* @summary Allow stale InputStreams from ZipFiles to be GC'd
* @author Neil Richards <neil.richards@ngmr.net>, <neil_richards@uk.ibm.com>
+ * @key randomness
*/
import java.lang.ref.ReferenceQueue;
import java.lang.ref.WeakReference;
diff --git a/jdk/test/java/util/zip/ZipFile/FinalizeZipFile.java b/jdk/test/java/util/zip/ZipFile/FinalizeZipFile.java
index 74866cac808..06dd4bc3bd6 100644
--- a/jdk/test/java/util/zip/ZipFile/FinalizeZipFile.java
+++ b/jdk/test/java/util/zip/ZipFile/FinalizeZipFile.java
@@ -24,6 +24,7 @@
/* @test
* @bug 7007609 7009618
* @summary Check that ZipFile objects are always collected
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/java/util/zip/ZipFile/MultiThreadedReadTest.java b/jdk/test/java/util/zip/ZipFile/MultiThreadedReadTest.java
index c1f69a90587..a97e1f35285 100644
--- a/jdk/test/java/util/zip/ZipFile/MultiThreadedReadTest.java
+++ b/jdk/test/java/util/zip/ZipFile/MultiThreadedReadTest.java
@@ -27,6 +27,7 @@
* @library /lib/testlibrary
* @build jdk.testlibrary.FileUtils
* @run main MultiThreadedReadTest
+ * @key randomness
*/
import java.io.File;
diff --git a/jdk/test/java/util/zip/ZipFile/ReadZip.java b/jdk/test/java/util/zip/ZipFile/ReadZip.java
index 44f1d9ed97f..1052642eda7 100644
--- a/jdk/test/java/util/zip/ZipFile/ReadZip.java
+++ b/jdk/test/java/util/zip/ZipFile/ReadZip.java
@@ -24,6 +24,7 @@
/* @test
@bug 4241361 4842702 4985614 6646605 5032358 6923692
@summary Make sure we can read a zip file.
+ @key randomness
*/
import java.io.*;
diff --git a/jdk/test/javax/crypto/Cipher/ByteBuffers.java b/jdk/test/javax/crypto/Cipher/ByteBuffers.java
index 99c807229f1..233e62fb83a 100644
--- a/jdk/test/javax/crypto/Cipher/ByteBuffers.java
+++ b/jdk/test/javax/crypto/Cipher/ByteBuffers.java
@@ -26,6 +26,7 @@
* @bug 4844847
* @summary Test the Cipher.update/doFinal(ByteBuffer, ByteBuffer) methods
* @author Andreas Sterbenz
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/javax/crypto/CipherSpi/DirectBBRemaining.java b/jdk/test/javax/crypto/CipherSpi/DirectBBRemaining.java
index 9cc840664c0..9e03c908660 100644
--- a/jdk/test/javax/crypto/CipherSpi/DirectBBRemaining.java
+++ b/jdk/test/javax/crypto/CipherSpi/DirectBBRemaining.java
@@ -26,6 +26,7 @@
* @bug 7142509
* @summary Cipher.doFinal(ByteBuffer,ByteBuffer) fails to
* process when in.remaining() == 0
+ * @key randomness
*/
import java.nio.ByteBuffer;
diff --git a/jdk/test/javax/crypto/CryptoPermission/AllPermCheck.java b/jdk/test/javax/crypto/CryptoPermission/AllPermCheck.java
index 3359fcd88e2..d7a1ad40e39 100644
--- a/jdk/test/javax/crypto/CryptoPermission/AllPermCheck.java
+++ b/jdk/test/javax/crypto/CryptoPermission/AllPermCheck.java
@@ -28,6 +28,7 @@
* InvalidKeyException is thrown instead of SecurityException when
* crypto permssion checks failed.
* @author Valerie Peng
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/javax/crypto/CryptoPermission/RC2PermCheck.java b/jdk/test/javax/crypto/CryptoPermission/RC2PermCheck.java
index a4270802fe5..fc49baec11e 100644
--- a/jdk/test/javax/crypto/CryptoPermission/RC2PermCheck.java
+++ b/jdk/test/javax/crypto/CryptoPermission/RC2PermCheck.java
@@ -27,6 +27,7 @@
* @summary Ensure the crypto permission check on cipher algorithms
* with restricted parameter values are correctly enforced.
* @author Valerie Peng
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/javax/crypto/JceSecurity/SunJCE_BC_LoadOrdering.java b/jdk/test/javax/crypto/JceSecurity/SunJCE_BC_LoadOrdering.java
index c2991bbcc07..50a1c188d0f 100644
--- a/jdk/test/javax/crypto/JceSecurity/SunJCE_BC_LoadOrdering.java
+++ b/jdk/test/javax/crypto/JceSecurity/SunJCE_BC_LoadOrdering.java
@@ -28,6 +28,7 @@
* @summary SunJCE depends on sun.security.provider.SignatureImpl
* behaviour, BC can't load into 1st slot.
* @author Brad R. Wetmore
+ * @key randomness
*/
import java.security.*;
diff --git a/jdk/test/javax/crypto/KeyGenerator/TestKGParity.java b/jdk/test/javax/crypto/KeyGenerator/TestKGParity.java
index 40752152c56..cb512274bf8 100644
--- a/jdk/test/javax/crypto/KeyGenerator/TestKGParity.java
+++ b/jdk/test/javax/crypto/KeyGenerator/TestKGParity.java
@@ -35,6 +35,7 @@ import static java.lang.System.out;
* @bug 8048607
* @compile ../../../com/sun/crypto/provider/Cipher/DES/TestUtility.java
* @summary Test key generation of DES and DESEDE
+ * @key randomness
*/
public class TestKGParity {
diff --git a/jdk/test/javax/crypto/Mac/ByteBuffers.java b/jdk/test/javax/crypto/Mac/ByteBuffers.java
index 96070881715..a00e5a43cd6 100644
--- a/jdk/test/javax/crypto/Mac/ByteBuffers.java
+++ b/jdk/test/javax/crypto/Mac/ByteBuffers.java
@@ -26,6 +26,7 @@
* @bug 4844847
* @summary Test the Mac.update(ByteBuffer) method
* @author Andreas Sterbenz
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/javax/crypto/NullCipher/TestNPE.java b/jdk/test/javax/crypto/NullCipher/TestNPE.java
index 45aa81ac78e..0e216d0226d 100644
--- a/jdk/test/javax/crypto/NullCipher/TestNPE.java
+++ b/jdk/test/javax/crypto/NullCipher/TestNPE.java
@@ -26,6 +26,7 @@
* @bug 4937853
* @summary Make sure normal calls of NullCipher does not throw NPE.
* @author Valerie Peng
+ * @key randomness
*/
import java.util.Arrays;
import java.security.AlgorithmParameters;
diff --git a/jdk/test/javax/management/monitor/MultiMonitorTest.java b/jdk/test/javax/management/monitor/MultiMonitorTest.java
index 93bba22553f..fe40f63d8ff 100644
--- a/jdk/test/javax/management/monitor/MultiMonitorTest.java
+++ b/jdk/test/javax/management/monitor/MultiMonitorTest.java
@@ -29,6 +29,7 @@
* @run clean MultiMonitorTest
* @run build MultiMonitorTest
* @run main MultiMonitorTest
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/javax/management/mxbean/ThreadMXBeanTest.java b/jdk/test/javax/management/mxbean/ThreadMXBeanTest.java
index f533f340b50..d2ca6a90102 100644
--- a/jdk/test/javax/management/mxbean/ThreadMXBeanTest.java
+++ b/jdk/test/javax/management/mxbean/ThreadMXBeanTest.java
@@ -29,6 +29,7 @@
* @run clean ThreadMXBeanTest
* @run build ThreadMXBeanTest
* @run main ThreadMXBeanTest
+ * @key randomness
*/
import java.lang.management.*;
diff --git a/jdk/test/javax/management/remote/mandatory/loading/MissingClassTest.java b/jdk/test/javax/management/remote/mandatory/loading/MissingClassTest.java
index 341bbfc5249..c6e212cf924 100644
--- a/jdk/test/javax/management/remote/mandatory/loading/MissingClassTest.java
+++ b/jdk/test/javax/management/remote/mandatory/loading/MissingClassTest.java
@@ -29,6 +29,7 @@
* @run clean MissingClassTest SingleClassLoader
* @run build MissingClassTest SingleClassLoader
* @run main MissingClassTest
+ * @key randomness
*/
/*
diff --git a/jdk/test/javax/management/timer/MissingNotificationTest.java b/jdk/test/javax/management/timer/MissingNotificationTest.java
index 39da6cb1098..9fedc74024b 100644
--- a/jdk/test/javax/management/timer/MissingNotificationTest.java
+++ b/jdk/test/javax/management/timer/MissingNotificationTest.java
@@ -29,6 +29,7 @@
* @run clean MissingNotificationTest
* @run build MissingNotificationTest
* @run main MissingNotificationTest
+ * @key randomness
*/
import java.util.Date;
diff --git a/jdk/test/javax/net/ssl/SSLEngine/LargeBufs.java b/jdk/test/javax/net/ssl/SSLEngine/LargeBufs.java
index 2eb940ed818..f63db4c98c9 100644
--- a/jdk/test/javax/net/ssl/SSLEngine/LargeBufs.java
+++ b/jdk/test/javax/net/ssl/SSLEngine/LargeBufs.java
@@ -33,6 +33,7 @@
* @run main/othervm -Djsse.enableCBCProtection=false LargeBufs
*
* @author Brad R. Wetmore
+ * @key randomness
*/
import javax.net.ssl.*;
diff --git a/jdk/test/javax/smartcardio/TestCommandAPDU.java b/jdk/test/javax/smartcardio/TestCommandAPDU.java
index 93517ea79de..543fcea2487 100644
--- a/jdk/test/javax/smartcardio/TestCommandAPDU.java
+++ b/jdk/test/javax/smartcardio/TestCommandAPDU.java
@@ -26,6 +26,7 @@
* @bug 6293767
* @summary Test for the CommandAPDU class
* @author Andreas Sterbenz
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/lib/testlibrary/jdk/testlibrary/RandomFactory.java b/jdk/test/lib/testlibrary/jdk/testlibrary/RandomFactory.java
new file mode 100644
index 00000000000..eee84b15573
--- /dev/null
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/RandomFactory.java
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.util.Random;
+import java.util.SplittableRandom;
+
+/**
+ * Factory class which generates and prints to STDOUT a long-valued seed
+ * for use in initializing a PRNG. An instance of {@code Random} or
+ * {@code SplittableRandom} may likewise be obtained.
+ */
+public class RandomFactory {
+ /**
+ * Attempt to obtain the seed from the value of the "seed" property.
+ * @return The seed or {@code null} if the "seed" property was not set or
+ * could not be parsed.
+ */
+ private static Long getSystemSeed() {
+ Long seed = null;
+ try {
+ // note that Long.valueOf(null) also throws a
+ // NumberFormatException so if the property is undefined this
+ // will still work correctly
+ seed = Long.valueOf(System.getProperty("seed"));
+ } catch (NumberFormatException e) {
+ // do nothing: seed is still null
+ }
+
+ return seed;
+ }
+
+ /**
+ * Obtain a seed from an independent PRNG.
+ *
+ * @return A random seed.
+ */
+ private static long getRandomSeed() {
+ return new Random().nextLong();
+ }
+
+ /**
+ * Obtain and print to STDOUT a seed appropriate for initializing a PRNG.
+ * If the system property "seed" is set and has value which may be correctly
+ * parsed it is used, otherwise a seed is generated using an independent
+ * PRNG.
+ *
+ * @return The seed.
+ */
+ public static long getSeed() {
+ Long seed = getSystemSeed();
+ if (seed == null) {
+ seed = getRandomSeed();
+ }
+ System.out.println("Seed from RandomFactory = "+seed+"L");
+ return seed;
+ }
+
+ /**
+ * Obtain and print to STDOUT a seed and use it to initialize a new
+ * {@code Random} instance which is returned. If the system
+ * property "seed" is set and has value which may be correctly parsed it
+ * is used, otherwise a seed is generated using an independent PRNG.
+ *
+ * @return The {@code Random} instance.
+ */
+ public static Random getRandom() {
+ return new Random(getSeed());
+ }
+
+ /**
+ * Obtain and print to STDOUT a seed and use it to initialize a new
+ * {@code SplittableRandom} instance which is returned. If the system
+ * property "seed" is set and has value which may be correctly parsed it
+ * is used, otherwise a seed is generated using an independent PRNG.
+ *
+ * @return The {@code SplittableRandom} instance.
+ */
+ public static SplittableRandom getSplittableRandom() {
+ return new SplittableRandom(getSeed());
+ }
+}
diff --git a/jdk/test/sun/management/jmxremote/startstop/JMXStartStopTest.java b/jdk/test/sun/management/jmxremote/startstop/JMXStartStopTest.java
index 59f947b756c..de5e9b6bbcd 100644
--- a/jdk/test/sun/management/jmxremote/startstop/JMXStartStopTest.java
+++ b/jdk/test/sun/management/jmxremote/startstop/JMXStartStopTest.java
@@ -60,6 +60,7 @@ import sun.management.AgentConfigurationError;
* @run main/othervm/timeout=600 -XX:+UsePerfData JMXStartStopTest
* @summary Makes sure that enabling/disabling the management agent through JCMD
* achieves the desired results
+ * @key randomness
*/
public class JMXStartStopTest {
diff --git a/jdk/test/sun/misc/CopyMemory.java b/jdk/test/sun/misc/CopyMemory.java
index 6ddcbc81d71..89266ed052d 100644
--- a/jdk/test/sun/misc/CopyMemory.java
+++ b/jdk/test/sun/misc/CopyMemory.java
@@ -24,6 +24,7 @@
/* @test
* @bug 6565543
* @summary Minimal test for unsafe.copyMemory() and unsafe.setMemory()
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/sun/misc/FloatingDecimal/TestFloatingDecimal.java b/jdk/test/sun/misc/FloatingDecimal/TestFloatingDecimal.java
index b04545a65f3..23e97d7421c 100644
--- a/jdk/test/sun/misc/FloatingDecimal/TestFloatingDecimal.java
+++ b/jdk/test/sun/misc/FloatingDecimal/TestFloatingDecimal.java
@@ -62,6 +62,7 @@ public class sun.misc.FloatingDecimal {
* @build DoubleConsts FloatConsts
* @run main TestFloatingDecimal
* @author Brian Burkhalter
+ * @key randomness
*/
public class TestFloatingDecimal {
private static enum ResultType {
diff --git a/jdk/test/sun/net/www/ParseUtil_4922813.java b/jdk/test/sun/net/www/ParseUtil_4922813.java
index 5646039b651..3dd5503af08 100644
--- a/jdk/test/sun/net/www/ParseUtil_4922813.java
+++ b/jdk/test/sun/net/www/ParseUtil_4922813.java
@@ -24,6 +24,7 @@
/* @test
@bug 4922813
@summary Check the new impl of encodePath will not cause regression
+ @key randomness
*/
import java.util.BitSet;
diff --git a/jdk/test/sun/nio/cs/FindDecoderBugs.java b/jdk/test/sun/nio/cs/FindDecoderBugs.java
index 8c1fd910f5b..df8afd18960 100644
--- a/jdk/test/sun/nio/cs/FindDecoderBugs.java
+++ b/jdk/test/sun/nio/cs/FindDecoderBugs.java
@@ -27,6 +27,7 @@
* @summary Decode many byte sequences in many ways
* @run main/timeout=1800 FindDecoderBugs
* @author Martin Buchholz
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/sun/nio/cs/FindEncoderBugs.java b/jdk/test/sun/nio/cs/FindEncoderBugs.java
index ecd63065980..bfef4037ec4 100644
--- a/jdk/test/sun/nio/cs/FindEncoderBugs.java
+++ b/jdk/test/sun/nio/cs/FindEncoderBugs.java
@@ -27,6 +27,7 @@
* @summary Encode many char sequences in many ways
* @run main/timeout=1200 FindEncoderBugs
* @author Martin Buchholz
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/sun/nio/cs/TestStringCoding.java b/jdk/test/sun/nio/cs/TestStringCoding.java
index aaee1bcd2e3..7c18a3596c6 100644
--- a/jdk/test/sun/nio/cs/TestStringCoding.java
+++ b/jdk/test/sun/nio/cs/TestStringCoding.java
@@ -25,6 +25,7 @@
@bug 6636323 6636319 7040220 7096080 7183053
@summary Test if StringCoding and NIO result have the same de/encoding result
* @run main/othervm/timeout=2000 TestStringCoding
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/sun/nio/cs/TestStringCodingUTF8.java b/jdk/test/sun/nio/cs/TestStringCodingUTF8.java
index d1f69950684..b936838ea13 100644
--- a/jdk/test/sun/nio/cs/TestStringCodingUTF8.java
+++ b/jdk/test/sun/nio/cs/TestStringCodingUTF8.java
@@ -25,6 +25,7 @@
@bug 7040220
@summary Test if StringCoding and NIO result have the same de/encoding result for UTF-8
* @run main/othervm/timeout=2000 TestStringCodingUTF8
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/sun/security/krb5/auto/KDC.java b/jdk/test/sun/security/krb5/auto/KDC.java
index 117e67655da..d288f563e44 100644
--- a/jdk/test/sun/security/krb5/auto/KDC.java
+++ b/jdk/test/sun/security/krb5/auto/KDC.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, 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
@@ -149,6 +149,9 @@ public class KDC {
private List<String> conf = new ArrayList<>();
private Thread thread1, thread2, thread3;
+ private volatile boolean udpConsumerReady = false;
+ private volatile boolean tcpConsumerReady = false;
+ private volatile boolean dispatcherReady = false;
DatagramSocket u1 = null;
ServerSocket t1 = null;
@@ -1228,6 +1231,7 @@ public class KDC {
// The UDP consumer
thread1 = new Thread() {
public void run() {
+ udpConsumerReady = true;
while (true) {
try {
byte[] inbuf = new byte[8192];
@@ -1248,6 +1252,7 @@ public class KDC {
// The TCP consumer
thread2 = new Thread() {
public void run() {
+ tcpConsumerReady = true;
while (true) {
try {
Socket socket = tcp.accept();
@@ -1270,6 +1275,7 @@ public class KDC {
// The dispatcher
thread3 = new Thread() {
public void run() {
+ dispatcherReady = true;
while (true) {
try {
q.take().send();
@@ -1280,6 +1286,19 @@ public class KDC {
};
thread3.setDaemon(true);
thread3.start();
+
+ // wait for the KDC is ready
+ try {
+ while (!isReady()) {
+ Thread.sleep(100);
+ }
+ } catch(InterruptedException e) {
+ throw new IOException(e);
+ }
+ }
+
+ boolean isReady() {
+ return udpConsumerReady && tcpConsumerReady && dispatcherReady;
}
public void terminate() {
diff --git a/jdk/test/sun/security/krb5/auto/UnboundSSL.java b/jdk/test/sun/security/krb5/auto/UnboundSSL.java
new file mode 100644
index 00000000000..0862f072f04
--- /dev/null
+++ b/jdk/test/sun/security/krb5/auto/UnboundSSL.java
@@ -0,0 +1,134 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.IOException;
+import java.security.NoSuchAlgorithmException;
+import java.security.PrivilegedActionException;
+import java.util.HashMap;
+import java.util.Map;
+import javax.security.auth.login.LoginException;
+
+/*
+ * @test
+ * @bug 8025123
+ * @summary Checks if an unbound server can handle connections
+ * only for allowed service principals
+ * @run main/othervm/policy=unbound.ssl.policy UnboundSSL
+ * unbound.ssl.jaas.conf server_star
+ * @run main/othervm/policy=unbound.ssl.policy UnboundSSL
+ * unbound.ssl.jaas.conf server_multiple_principals
+ */
+public class UnboundSSL {
+
+ public static void main(String[] args) throws IOException,
+ NoSuchAlgorithmException,LoginException, PrivilegedActionException,
+ InterruptedException {
+ UnboundSSL test = new UnboundSSL();
+ test.start(args[0], args[1]);
+ }
+
+ private void start(String jaacConfigFile, String serverJaasConfig)
+ throws IOException, NoSuchAlgorithmException,LoginException,
+ PrivilegedActionException, InterruptedException {
+
+ // define principals
+ String service1host = "service1." + UnboundSSLUtils.HOST;
+ String service2host = "service2." + UnboundSSLUtils.HOST;
+ String service3host = "service3." + UnboundSSLUtils.HOST;
+ String service1Principal = "host/" + service1host + "@"
+ + UnboundSSLUtils.REALM;
+ String service2Principal = "host/" + service2host + "@"
+ + UnboundSSLUtils.REALM;
+ String service3Principal = "host/" + service3host + "@"
+ + UnboundSSLUtils.REALM;
+
+ Map<String, String> principals = new HashMap<>();
+ principals.put(UnboundSSLUtils.USER_PRINCIPAL,
+ UnboundSSLUtils.USER_PASSWORD);
+ principals.put(UnboundSSLUtils.KRBTGT_PRINCIPAL, null);
+ principals.put(service1Principal, null);
+ principals.put(service2Principal, null);
+ principals.put(service3Principal, null);
+
+ System.setProperty("java.security.krb5.conf",
+ UnboundSSLUtils.KRB5_CONF_FILENAME);
+
+ // start a local KDC instance
+ UnboundSSLUtils.startKDC(UnboundSSLUtils.REALM, principals,
+ UnboundSSLUtils.KTAB_FILENAME, UnboundSSLUtils.KtabMode.APPEND);
+
+ System.setProperty("java.security.auth.login.config",
+ UnboundSSLUtils.TEST_SRC + UnboundSSLUtils.FS + jaacConfigFile);
+ System.setProperty("javax.security.auth.useSubjectCredsOnly", "false");
+
+ try (final SSLEchoServer server = SSLEchoServer.init(
+ UnboundSSLUtils.TLS_KRB5_FILTER, UnboundSSLUtils.SNI_PATTERN)) {
+
+ // start a server instance
+ UnboundSSLUtils.startServerWithJaas(server, serverJaasConfig);
+
+ // wait for the server is ready
+ while (!server.isReady()) {
+ Thread.sleep(UnboundSSLUtils.DELAY);
+ }
+
+ int port = server.getPort();
+
+ // run clients
+
+ // the server should have a permission to handle a request
+ // with this service principal (there should be an appropriate
+ // javax.security.auth.kerberos.ServicePermission in policy file)
+ System.out.println("Connect: SNI hostname = " + service1host
+ + ", successful connection is expected");
+ SSLClient.init(UnboundSSLUtils.HOST, port,
+ UnboundSSLUtils.TLS_KRB5_FILTER, service1host).connect();
+
+ // the server should NOT have a permission to handle a request
+ // with this service principal (there should be an appropriate
+ // javax.security.auth.kerberos.ServicePermission in policy file)
+ // handshake failures is expected
+ System.out.println("Connect: SNI hostname = " + service2host
+ + ", connection failure is expected");
+ try {
+ SSLClient.init(UnboundSSLUtils.HOST, port,
+ UnboundSSLUtils.TLS_KRB5_FILTER, service2host)
+ .connect();
+ throw new RuntimeException("Test failed: "
+ + "expected IOException not thrown");
+ } catch (IOException e) {
+ System.out.println("Expected exception: " + e);
+ }
+
+ // the server should have a permission to handle a request
+ // with this service principal (there should be an appropriate
+ // javax.security.auth.kerberos.ServicePermission in policy file)
+ System.out.println("Connect: SNI hostname = " + service3host
+ + ", successful connection is expected");
+ SSLClient.init(UnboundSSLUtils.HOST, port,
+ UnboundSSLUtils.TLS_KRB5_FILTER, service3host).connect();
+ }
+
+ System.out.println("Test passed");
+ }
+}
diff --git a/jdk/test/sun/security/krb5/auto/UnboundSSLMultipleKeys.java b/jdk/test/sun/security/krb5/auto/UnboundSSLMultipleKeys.java
new file mode 100644
index 00000000000..255a40ca106
--- /dev/null
+++ b/jdk/test/sun/security/krb5/auto/UnboundSSLMultipleKeys.java
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.IOException;
+import java.security.NoSuchAlgorithmException;
+import java.security.PrivilegedActionException;
+import java.util.HashMap;
+import java.util.Map;
+import javax.security.auth.login.LoginException;
+
+/*
+ * @test
+ * @bug 8025123
+ * @summary Checks if an unbound server pick up a correct key from keytab
+ * @run main/othervm UnboundSSLMultipleKeys
+ * unbound.ssl.jaas.conf server_star
+ * @run main/othervm UnboundSSLMultipleKeys
+ * unbound.ssl.jaas.conf server_multiple_principals
+ */
+public class UnboundSSLMultipleKeys {
+
+ public static void main(String[] args)
+ throws IOException, NoSuchAlgorithmException, LoginException,
+ PrivilegedActionException, InterruptedException {
+ UnboundSSLMultipleKeys test = new UnboundSSLMultipleKeys();
+ test.start(args[0], args[1]);
+ }
+
+ private void start(String jaacConfigFile, String serverJaasConfig)
+ throws IOException, NoSuchAlgorithmException, LoginException,
+ PrivilegedActionException, InterruptedException {
+
+ // define service principals
+ String service1host = "service1." + UnboundSSLUtils.HOST;
+ String service2host = "service2." + UnboundSSLUtils.HOST;
+ String service3host = "service3." + UnboundSSLUtils.HOST;
+ String service1Principal = "host/" + service1host + "@"
+ + UnboundSSLUtils.REALM;
+ String service2Principal = "host/" + service2host + "@"
+ + UnboundSSLUtils.REALM;
+ String service3Principal = "host/" + service3host + "@"
+ + UnboundSSLUtils.REALM;
+
+ Map<String, String> principals = new HashMap<>();
+ principals.put(UnboundSSLUtils.USER_PRINCIPAL,
+ UnboundSSLUtils.USER_PASSWORD);
+ principals.put(UnboundSSLUtils.KRBTGT_PRINCIPAL, "pass");
+ principals.put(service1Principal, "pass0");
+ principals.put(service1Principal, "pass1");
+ principals.put(service1Principal, "pass2");
+ principals.put(service2Principal, "pass");
+ principals.put(service3Principal, "pass");
+
+ System.setProperty("java.security.krb5.conf",
+ UnboundSSLUtils.KRB5_CONF_FILENAME);
+
+ /*
+ * Start a local KDC instance
+ *
+ * Keytab file contains 3 keys (with different KVNO) for service1
+ * principal, but password for only one key is the same with the record
+ * for service1 principal in KDC.
+ */
+ UnboundSSLUtils.startKDC(UnboundSSLUtils.REALM, principals,
+ UnboundSSLUtils.KTAB_FILENAME, UnboundSSLUtils.KtabMode.APPEND);
+
+ System.setProperty("java.security.auth.login.config",
+ UnboundSSLUtils.TEST_SRC + UnboundSSLUtils.FS + jaacConfigFile);
+ System.setProperty("javax.security.auth.useSubjectCredsOnly", "false");
+
+ // start an SSL server instance
+ try (SSLEchoServer server = SSLEchoServer.init(
+ UnboundSSLUtils.TLS_KRB5_FILTER, UnboundSSLUtils.SNI_PATTERN)) {
+
+ UnboundSSLUtils.startServerWithJaas(server, serverJaasConfig);
+
+ // wait for the server is ready
+ while (!server.isReady()) {
+ Thread.sleep(UnboundSSLUtils.DELAY);
+ }
+
+ // run a client
+ System.out.println("Successful connection is expected");
+ SSLClient.init(UnboundSSLUtils.HOST, server.getPort(),
+ UnboundSSLUtils.TLS_KRB5_FILTER, service1host).connect();
+ }
+
+ System.out.println("Test passed");
+ }
+
+}
diff --git a/jdk/test/sun/security/krb5/auto/UnboundSSLPrincipalProperty.java b/jdk/test/sun/security/krb5/auto/UnboundSSLPrincipalProperty.java
new file mode 100644
index 00000000000..3ccb4bf604a
--- /dev/null
+++ b/jdk/test/sun/security/krb5/auto/UnboundSSLPrincipalProperty.java
@@ -0,0 +1,119 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.IOException;
+import java.security.NoSuchAlgorithmException;
+import java.security.PrivilegedActionException;
+import java.util.HashMap;
+import java.util.Map;
+import javax.security.auth.login.LoginException;
+
+/*
+ * @test
+ * @bug 8025123
+ * @summary Checks if an unbound server uses a service principal
+ * from sun.security.krb5.principal system property if specified
+ * @run main/othervm UnboundSSLPrincipalProperty
+ * unbound.ssl.jaas.conf server_star
+ * @run main/othervm UnboundSSLPrincipalProperty
+ * unbound.ssl.jaas.conf server_multiple_principals
+ */
+public class UnboundSSLPrincipalProperty {
+
+ public static void main(String[] args) throws IOException,
+ NoSuchAlgorithmException,LoginException, PrivilegedActionException,
+ InterruptedException {
+ UnboundSSLPrincipalProperty test = new UnboundSSLPrincipalProperty();
+ test.start(args[0], args[1]);
+ }
+
+ public void start(String jaacConfigFile, String serverJaasConfig)
+ throws IOException, NoSuchAlgorithmException,LoginException,
+ PrivilegedActionException, InterruptedException {
+
+ // define principals
+ String service1host = "service1." + UnboundSSLUtils.HOST;
+ String service3host = "service3." + UnboundSSLUtils.HOST;
+ String service1Principal = "host/" + service1host + "@"
+ + UnboundSSLUtils.REALM;
+ String service3Principal = "host/" + service3host
+ + "@" + UnboundSSLUtils.REALM;
+
+ Map<String, String> principals = new HashMap<>();
+ principals.put(UnboundSSLUtils.USER_PRINCIPAL,
+ UnboundSSLUtils.USER_PASSWORD);
+ principals.put(UnboundSSLUtils.KRBTGT_PRINCIPAL, null);
+ principals.put(service1Principal, null);
+ principals.put(service3Principal, null);
+
+ System.setProperty("java.security.krb5.conf",
+ UnboundSSLUtils.KRB5_CONF_FILENAME);
+
+ // start a local KDC instance
+ UnboundSSLUtils.startKDC(UnboundSSLUtils.REALM, principals,
+ UnboundSSLUtils.KTAB_FILENAME, UnboundSSLUtils.KtabMode.APPEND);
+
+ System.setProperty("java.security.auth.login.config",
+ UnboundSSLUtils.TEST_SRC + UnboundSSLUtils.FS + jaacConfigFile);
+ System.setProperty("javax.security.auth.useSubjectCredsOnly", "false");
+
+ // start an SSL server instance
+ try (final SSLEchoServer server = SSLEchoServer.init(
+ UnboundSSLUtils.TLS_KRB5_FILTER, UnboundSSLUtils.SNI_PATTERN)) {
+
+ // specify a service principal for the server
+ System.setProperty("sun.security.krb5.principal",
+ service3Principal);
+
+ UnboundSSLUtils.startServerWithJaas(server, serverJaasConfig);
+
+ // wait for the server is ready
+ while (!server.isReady()) {
+ Thread.sleep(UnboundSSLUtils.DELAY);
+ }
+
+ int port = server.getPort();
+
+ // connetion failure is expected
+ // since service3 principal was specified to use by the server
+ System.out.println("Connect: SNI hostname = " + service1host
+ + ", connection failure is expected");
+ try {
+ SSLClient.init(UnboundSSLUtils.HOST, port,
+ UnboundSSLUtils.TLS_KRB5_FILTER, service1host)
+ .connect();
+ throw new RuntimeException("Test failed: "
+ + "expected IOException not thrown");
+ } catch (IOException e) {
+ System.out.println("Expected exception: " + e);
+ }
+
+ System.out.println("Connect: SNI hostname = " + service3host
+ + ", successful connection is expected");
+ SSLClient.init(UnboundSSLUtils.HOST, port,
+ UnboundSSLUtils.TLS_KRB5_FILTER, service3host).connect();
+ }
+
+ System.out.println("Test passed");
+ }
+}
diff --git a/jdk/test/sun/security/krb5/auto/UnboundSSLUtils.java b/jdk/test/sun/security/krb5/auto/UnboundSSLUtils.java
new file mode 100644
index 00000000000..ab55e1fa184
--- /dev/null
+++ b/jdk/test/sun/security/krb5/auto/UnboundSSLUtils.java
@@ -0,0 +1,353 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.security.NoSuchAlgorithmException;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import javax.net.ssl.SNIHostName;
+import javax.net.ssl.SNIMatcher;
+import javax.net.ssl.SNIServerName;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLParameters;
+import javax.net.ssl.SSLServerSocket;
+import javax.net.ssl.SSLServerSocketFactory;
+import javax.net.ssl.SSLSocket;
+import javax.net.ssl.SSLSocketFactory;
+import javax.security.auth.Subject;
+import javax.security.auth.login.LoginContext;
+import javax.security.auth.login.LoginException;
+
+/*
+ * Helper class for unbound krb5 tests.
+ */
+class UnboundSSLUtils {
+
+ static enum KtabMode { APPEND, EXISTING };
+
+ static final String KTAB_FILENAME = "krb5.keytab.data";
+ static final String HOST = "localhost";
+ static final String REALM = "TEST.REALM";
+ static final String KRBTGT_PRINCIPAL = "krbtgt/" + REALM;
+ static final String TEST_SRC = System.getProperty("test.src", ".");
+ static final String TLS_KRB5_FILTER = "TLS_KRB5";
+ static final String USER = "USER";
+ static final String USER_PASSWORD = "password";
+ static final String FS = System.getProperty("file.separator");
+ static final String SNI_PATTERN = ".*";
+ static final String USER_PRINCIPAL = USER + "@" + REALM;
+ static final String KRB5_CONF_FILENAME = "krb5.conf";
+ static final int DELAY = 1000;
+
+ static String[] filterStringArray(String[] src, String filter) {
+ return Arrays.stream(src).filter((item) -> item.startsWith(filter))
+ .toArray(size -> new String[size]);
+ }
+
+ /*
+ * The method does JAAS login,
+ * and runs an SSL server in the JAAS context.
+ */
+ static void startServerWithJaas(final SSLEchoServer server,
+ String config) throws LoginException, PrivilegedActionException {
+ LoginContext context = new LoginContext(config);
+ context.login();
+ System.out.println("Server: successful authentication");
+ Subject.doAs(context.getSubject(),
+ (PrivilegedExceptionAction<Object>) () -> {
+ SSLEchoServer.startServer(server);
+ return null;
+ });
+ }
+
+ /*
+ * Start a KDC server:
+ * - create a KDC instance
+ * - create Kerberos principals
+ * - save Kerberos configuration
+ * - save keys to keytab file
+ * - no pre-auth required
+ */
+ static void startKDC(String realm, Map<String, String> principals,
+ String ktab, KtabMode mode) {
+ try {
+ KDC kdc = KDC.create(realm, HOST, 0, true);
+ kdc.setOption(KDC.Option.PREAUTH_REQUIRED, Boolean.FALSE);
+ if (principals != null) {
+ for (Map.Entry<String, String> entry : principals.entrySet()) {
+ String name = entry.getKey();
+ String password = entry.getValue();
+ if (password == null || password.isEmpty()) {
+ System.out.println("KDC: add a principal '" + name +
+ "' with a random password");
+ kdc.addPrincipalRandKey(name);
+ } else {
+ System.out.println("KDC: add a principal '" + name +
+ "' with '" + password + "' password");
+ kdc.addPrincipal(name, password.toCharArray());
+ }
+ }
+ }
+
+ KDC.saveConfig(KRB5_CONF_FILENAME, kdc);
+
+ if (ktab != null) {
+ File ktabFile = new File(ktab);
+ if (mode == KtabMode.APPEND) {
+ if (ktabFile.exists()) {
+ System.out.println("KDC: append keys to an exising " +
+ "keytab file " + ktab);
+ kdc.appendKtab(ktab);
+ } else {
+ System.out.println("KDC: create a new keytab file " +
+ ktab);
+ kdc.writeKtab(ktab);
+ }
+ } else if (mode == KtabMode.EXISTING) {
+ System.out.println("KDC: use an existing keytab file "
+ + ktab);
+ } else {
+ throw new RuntimeException("KDC: unsupported keytab mode: "
+ + mode);
+ }
+ }
+
+ System.out.println("KDC: started on " + HOST + ":" + kdc.getPort()
+ + " with '" + realm + "' realm");
+ } catch (Exception e) {
+ throw new RuntimeException("KDC: unexpected exception", e);
+ }
+ }
+
+}
+
+class SSLClient {
+
+ private final static byte[][] arrays = {
+ new byte[] {-1, 0, 2},
+ new byte[] {}
+ };
+
+ private final SSLSocket socket;
+
+ private SSLClient(SSLSocket socket) {
+ this.socket = socket;
+ }
+
+ void connect() throws IOException {
+ System.out.println("Client: connect to server");
+ try (BufferedInputStream bis = new BufferedInputStream(
+ socket.getInputStream());
+ BufferedOutputStream bos = new BufferedOutputStream(
+ socket.getOutputStream())) {
+
+ for (byte[] bytes : arrays) {
+ System.out.println("Client: send byte array: "
+ + Arrays.toString(bytes));
+
+ bos.write(bytes);
+ bos.flush();
+
+ byte[] recieved = new byte[bytes.length];
+ int read = bis.read(recieved, 0, bytes.length);
+ if (read < 0) {
+ throw new IOException("Client: couldn't read a response");
+ }
+
+ System.out.println("Client: recieved byte array: "
+ + Arrays.toString(recieved));
+
+ if (!Arrays.equals(bytes, recieved)) {
+ throw new IOException("Client: sent byte array "
+ + "is not equal with recieved byte array");
+ }
+ }
+ socket.getSession().invalidate();
+ } finally {
+ if (!socket.isClosed()) {
+ socket.close();
+ }
+ }
+ }
+
+ static SSLClient init(String host, int port, String cipherSuiteFilter,
+ String sniHostName) throws NoSuchAlgorithmException, IOException {
+ SSLContext sslContext = SSLContext.getDefault();
+ SSLSocketFactory ssf = (SSLSocketFactory) sslContext.getSocketFactory();
+ SSLSocket socket = (SSLSocket) ssf.createSocket(host, port);
+ SSLParameters params = new SSLParameters();
+
+ if (cipherSuiteFilter != null) {
+ String[] cipherSuites = UnboundSSLUtils.filterStringArray(
+ ssf.getSupportedCipherSuites(), cipherSuiteFilter);
+ System.out.println("Client: enabled cipher suites: "
+ + Arrays.toString(cipherSuites));
+ params.setCipherSuites(cipherSuites);
+ }
+
+ if (sniHostName != null) {
+ System.out.println("Client: set SNI hostname: " + sniHostName);
+ SNIHostName serverName = new SNIHostName(sniHostName);
+ List<SNIServerName> serverNames = new ArrayList<>();
+ serverNames.add(serverName);
+ params.setServerNames(serverNames);
+ }
+
+ socket.setSSLParameters(params);
+
+ return new SSLClient(socket);
+ }
+
+}
+
+class SSLEchoServer implements Runnable, AutoCloseable {
+
+ private final SSLServerSocket ssocket;
+ private volatile boolean stopped = false;
+ private volatile boolean ready = false;
+
+ /*
+ * Starts the server in a separate thread.
+ */
+ static void startServer(SSLEchoServer server) {
+ Thread serverThread = new Thread(server, "SSL echo server thread");
+ serverThread.setDaemon(true);
+ serverThread.start();
+ }
+
+ private SSLEchoServer(SSLServerSocket ssocket) {
+ this.ssocket = ssocket;
+ }
+
+ /*
+ * Main server loop.
+ */
+ @Override
+ public void run() {
+ System.out.println("Server: started");
+ while (!stopped) {
+ ready = true;
+ try (SSLSocket socket = (SSLSocket) ssocket.accept()) {
+ System.out.println("Server: client connection accepted");
+ try (
+ BufferedInputStream bis = new BufferedInputStream(
+ socket.getInputStream());
+ BufferedOutputStream bos = new BufferedOutputStream(
+ socket.getOutputStream())
+ ) {
+ byte[] buffer = new byte[1024];
+ int read;
+ while ((read = bis.read(buffer)) > 0) {
+ bos.write(buffer, 0, read);
+ System.out.println("Server: recieved " + read
+ + " bytes: "
+ + Arrays.toString(Arrays.copyOf(buffer, read)));
+ bos.flush();
+ }
+ }
+ } catch (IOException e) {
+ if (stopped) {
+ // stopped == true means that stop() method was called,
+ // so just ignore the exception, and finish the loop
+ break;
+ }
+ System.out.println("Server: couldn't accept client connection: "
+ + e);
+ }
+ }
+ System.out.println("Server: finished");
+ }
+
+ boolean isReady() {
+ return ready;
+ }
+
+ void stop() {
+ stopped = true;
+ ready = false;
+
+ // close the server socket to interupt accept() method
+ try {
+ if (!ssocket.isClosed()) {
+ ssocket.close();
+ }
+ } catch (IOException e) {
+ throw new RuntimeException("Unexpected exception: " + e);
+ }
+ }
+
+ @Override
+ public void close() {
+ stop();
+ }
+
+ int getPort() {
+ return ssocket.getLocalPort();
+ }
+
+ /*
+ * Creates server instance.
+ *
+ * @param cipherSuiteFilter Filter for enabled cipher suites
+ * @param sniMatcherPattern Pattern for SNI server hame
+ */
+ static SSLEchoServer init(String cipherSuiteFilter,
+ String sniPattern) throws NoSuchAlgorithmException, IOException {
+ SSLContext context = SSLContext.getDefault();
+ SSLServerSocketFactory ssf =
+ (SSLServerSocketFactory) context.getServerSocketFactory();
+ SSLServerSocket ssocket =
+ (SSLServerSocket) ssf.createServerSocket(0);
+
+ // specify enabled cipher suites
+ if (cipherSuiteFilter != null) {
+ String[] ciphersuites = UnboundSSLUtils.filterStringArray(
+ ssf.getSupportedCipherSuites(), cipherSuiteFilter);
+ System.out.println("Server: enabled cipher suites: "
+ + Arrays.toString(ciphersuites));
+ ssocket.setEnabledCipherSuites(ciphersuites);
+ }
+
+ // specify SNI matcher pattern
+ if (sniPattern != null) {
+ System.out.println("Server: set SNI matcher: " + sniPattern);
+ SNIMatcher matcher = SNIHostName.createSNIMatcher(sniPattern);
+ List<SNIMatcher> matchers = new ArrayList<>();
+ matchers.add(matcher);
+ SSLParameters params = ssocket.getSSLParameters();
+ params.setSNIMatchers(matchers);
+ ssocket.setSSLParameters(params);
+ }
+
+ return new SSLEchoServer(ssocket);
+ }
+
+}
+
diff --git a/jdk/test/sun/security/krb5/auto/unbound.ssl.jaas.conf b/jdk/test/sun/security/krb5/auto/unbound.ssl.jaas.conf
new file mode 100644
index 00000000000..bee0a670c4b
--- /dev/null
+++ b/jdk/test/sun/security/krb5/auto/unbound.ssl.jaas.conf
@@ -0,0 +1,40 @@
+com.sun.net.ssl.client {
+ com.sun.security.auth.module.Krb5LoginModule required
+ principal="USER@TEST.REALM"
+ doNotPrompt=true
+ useKeyTab=true
+ keyTab="krb5.keytab.data";
+};
+
+server_star {
+ com.sun.security.auth.module.Krb5LoginModule required
+ principal="*"
+ isInitiator=false
+ useKeyTab=true
+ keyTab="krb5.keytab.data"
+ storeKey=true;
+};
+
+server_multiple_principals {
+ com.sun.security.auth.module.Krb5LoginModule required
+ principal="host/service1.localhost@TEST.REALM"
+ isInitiator=false
+ useKeyTab=true
+ keyTab="krb5.keytab.data"
+ storeKey=true;
+
+ com.sun.security.auth.module.Krb5LoginModule required
+ principal="host/service2.localhost@TEST.REALM"
+ isInitiator=false
+ useKeyTab=true
+ keyTab="krb5.keytab.data"
+ storeKey=true;
+
+ com.sun.security.auth.module.Krb5LoginModule required
+ principal="host/service3.localhost@TEST.REALM"
+ isInitiator=false
+ useKeyTab=true
+ keyTab="krb5.keytab.data"
+ storeKey=true;
+};
+
diff --git a/jdk/test/sun/security/krb5/auto/unbound.ssl.policy b/jdk/test/sun/security/krb5/auto/unbound.ssl.policy
new file mode 100644
index 00000000000..12bab4559f1
--- /dev/null
+++ b/jdk/test/sun/security/krb5/auto/unbound.ssl.policy
@@ -0,0 +1,26 @@
+grant {
+ permission java.util.PropertyPermission "*", "read,write";
+ permission java.net.SocketPermission "*:*", "listen,resolve,accept,connect";
+ permission java.io.FilePermission "*", "read,write,delete";
+ permission java.lang.RuntimePermission "accessDeclaredMembers";
+ permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
+ permission java.lang.RuntimePermission "accessClassInPackage.*";
+ permission javax.security.auth.AuthPermission "doAs";
+ permission javax.security.auth.AuthPermission "getSubject";
+ permission javax.security.auth.AuthPermission
+ "createLoginContext.server_star";
+ permission javax.security.auth.AuthPermission
+ "createLoginContext.server_multiple_principals";
+ permission javax.security.auth.AuthPermission "modifyPrincipals";
+ permission javax.security.auth.PrivateCredentialPermission "javax.security.auth.kerberos.KeyTab java.security.Principal \"krb5.keytab.data\"", "read";
+
+ // clients have a permission to use all service principals
+ permission javax.security.auth.kerberos.ServicePermission "*", "initiate";
+
+ // server has a service permission
+ // to accept only service1 and service3 principals
+ permission javax.security.auth.kerberos.ServicePermission
+ "host/service1.localhost@TEST.REALM", "accept";
+ permission javax.security.auth.kerberos.ServicePermission
+ "host/service3.localhost@TEST.REALM", "accept";
+};
diff --git a/jdk/test/sun/security/mscapi/PrngSlow.java b/jdk/test/sun/security/mscapi/PrngSlow.java
index f9001eea80d..3420cc6b2a1 100644
--- a/jdk/test/sun/security/mscapi/PrngSlow.java
+++ b/jdk/test/sun/security/mscapi/PrngSlow.java
@@ -25,6 +25,7 @@
* @test
* @bug 6449335
* @summary MSCAPI's PRNG is too slow
+ * @key randomness
*/
import java.security.SecureRandom;
diff --git a/jdk/test/sun/security/mscapi/SignUsingSHA2withRSA.sh b/jdk/test/sun/security/mscapi/SignUsingSHA2withRSA.sh
index 2d433f108f0..d70a4e1c973 100644
--- a/jdk/test/sun/security/mscapi/SignUsingSHA2withRSA.sh
+++ b/jdk/test/sun/security/mscapi/SignUsingSHA2withRSA.sh
@@ -28,6 +28,7 @@
# @bug 6753664
# @run shell SignUsingSHA2withRSA.sh
# @summary Support SHA256 (and higher) in SunMSCAPI
+# @key intermittent
# set a few environment variables so that the shell-script can run stand-alone
# in the source directory
diff --git a/jdk/test/sun/security/pkcs11/Cipher/ReinitCipher.java b/jdk/test/sun/security/pkcs11/Cipher/ReinitCipher.java
index 9c87ce2b503..2cd68b44a9b 100644
--- a/jdk/test/sun/security/pkcs11/Cipher/ReinitCipher.java
+++ b/jdk/test/sun/security/pkcs11/Cipher/ReinitCipher.java
@@ -27,6 +27,7 @@
* @summary
* @author Andreas Sterbenz
* @library ..
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/sun/security/pkcs11/Cipher/TestRSACipher.java b/jdk/test/sun/security/pkcs11/Cipher/TestRSACipher.java
index 4f27ff5de0c..876048f46cf 100644
--- a/jdk/test/sun/security/pkcs11/Cipher/TestRSACipher.java
+++ b/jdk/test/sun/security/pkcs11/Cipher/TestRSACipher.java
@@ -27,6 +27,7 @@
* @summary basic test for RSA cipher
* @author Andreas Sterbenz
* @library ..
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/sun/security/pkcs11/Cipher/TestRawRSACipher.java b/jdk/test/sun/security/pkcs11/Cipher/TestRawRSACipher.java
index d1dd0206031..17ffe9553c2 100644
--- a/jdk/test/sun/security/pkcs11/Cipher/TestRawRSACipher.java
+++ b/jdk/test/sun/security/pkcs11/Cipher/TestRawRSACipher.java
@@ -27,6 +27,7 @@
* @summary basic test for RSA/ECB/NoPadding cipher
* @author Valerie Peng
* @library ..
+ * @key randomness
*/
import javax.crypto.*;
diff --git a/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphers.java b/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphers.java
index 14e41cdddd2..e6b7f7d8a34 100644
--- a/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphers.java
+++ b/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphers.java
@@ -22,11 +22,12 @@
*/
/**
- * @test %I% %E%
+ * @test
* @bug 4898461 6604496
* @summary basic test for symmetric ciphers with padding
* @author Valerie Peng
* @library ..
+ * @key randomness
*/
import java.io.*;
import java.nio.*;
diff --git a/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphersNoPad.java b/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphersNoPad.java
index a8b71a30a4d..07d48649be5 100644
--- a/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphersNoPad.java
+++ b/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphersNoPad.java
@@ -27,6 +27,7 @@
* @summary basic test for symmetric ciphers with no padding
* @author Valerie Peng
* @library ..
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/sun/security/pkcs11/KeyGenerator/DESParity.java b/jdk/test/sun/security/pkcs11/KeyGenerator/DESParity.java
index 33ef9eb1749..2d7f77bc9c5 100644
--- a/jdk/test/sun/security/pkcs11/KeyGenerator/DESParity.java
+++ b/jdk/test/sun/security/pkcs11/KeyGenerator/DESParity.java
@@ -27,6 +27,7 @@
* @summary Verify that the parity bits are set correctly
* @author Andreas Sterbenz
* @library ..
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/sun/security/pkcs11/Mac/MacSameTest.java b/jdk/test/sun/security/pkcs11/Mac/MacSameTest.java
index f5e2787e609..21eae39b0c6 100644
--- a/jdk/test/sun/security/pkcs11/Mac/MacSameTest.java
+++ b/jdk/test/sun/security/pkcs11/Mac/MacSameTest.java
@@ -37,6 +37,7 @@ import javax.crypto.spec.SecretKeySpec;
* @author Yu-Ching Valerie Peng, Bill Situ, Alexander Fomin
* @library ..
* @run main MacSameTest
+ * @key randomness
*/
public class MacSameTest extends PKCS11Test {
diff --git a/jdk/test/sun/security/pkcs11/Mac/ReinitMac.java b/jdk/test/sun/security/pkcs11/Mac/ReinitMac.java
index 0466330572a..68bef343889 100644
--- a/jdk/test/sun/security/pkcs11/Mac/ReinitMac.java
+++ b/jdk/test/sun/security/pkcs11/Mac/ReinitMac.java
@@ -27,6 +27,7 @@
* @summary
* @author Andreas Sterbenz
* @library ..
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/sun/security/pkcs11/MessageDigest/ByteBuffers.java b/jdk/test/sun/security/pkcs11/MessageDigest/ByteBuffers.java
index 49b3c9c8337..1b502a95bcf 100644
--- a/jdk/test/sun/security/pkcs11/MessageDigest/ByteBuffers.java
+++ b/jdk/test/sun/security/pkcs11/MessageDigest/ByteBuffers.java
@@ -27,6 +27,7 @@
* @summary Test the MessageDigest.update(ByteBuffer) method
* @author Andreas Sterbenz
* @library ..
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/sun/security/pkcs11/MessageDigest/ReinitDigest.java b/jdk/test/sun/security/pkcs11/MessageDigest/ReinitDigest.java
index 417b4c28d77..2f8290a2a7a 100644
--- a/jdk/test/sun/security/pkcs11/MessageDigest/ReinitDigest.java
+++ b/jdk/test/sun/security/pkcs11/MessageDigest/ReinitDigest.java
@@ -27,6 +27,7 @@
* @summary
* @author Andreas Sterbenz
* @library ..
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/sun/security/pkcs11/MessageDigest/TestCloning.java b/jdk/test/sun/security/pkcs11/MessageDigest/TestCloning.java
index c998e8092e0..5ea2264109f 100644
--- a/jdk/test/sun/security/pkcs11/MessageDigest/TestCloning.java
+++ b/jdk/test/sun/security/pkcs11/MessageDigest/TestCloning.java
@@ -27,6 +27,7 @@
* @summary Ensure the cloning functionality works.
* @author Valerie Peng
* @library ..
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/sun/security/pkcs11/Secmod/AddPrivateKey.java b/jdk/test/sun/security/pkcs11/Secmod/AddPrivateKey.java
index c99c498946d..a42ca861396 100644
--- a/jdk/test/sun/security/pkcs11/Secmod/AddPrivateKey.java
+++ b/jdk/test/sun/security/pkcs11/Secmod/AddPrivateKey.java
@@ -28,6 +28,7 @@
* @author Andreas Sterbenz
* @library ..
* @run main/othervm AddPrivateKey
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/sun/security/pkcs11/Secmod/Crypto.java b/jdk/test/sun/security/pkcs11/Secmod/Crypto.java
index c44ab87835f..39465f794d1 100644
--- a/jdk/test/sun/security/pkcs11/Secmod/Crypto.java
+++ b/jdk/test/sun/security/pkcs11/Secmod/Crypto.java
@@ -28,6 +28,7 @@
* @author Andreas Sterbenz
* @library ..
* @run main/othervm Crypto
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/sun/security/pkcs11/Secmod/GetPrivateKey.java b/jdk/test/sun/security/pkcs11/Secmod/GetPrivateKey.java
index a41bef9c77e..2dd1ce69056 100644
--- a/jdk/test/sun/security/pkcs11/Secmod/GetPrivateKey.java
+++ b/jdk/test/sun/security/pkcs11/Secmod/GetPrivateKey.java
@@ -28,6 +28,7 @@
* @author Andreas Sterbenz
* @library ..
* @run main/othervm GetPrivateKey
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/sun/security/pkcs11/SecureRandom/Basic.java b/jdk/test/sun/security/pkcs11/SecureRandom/Basic.java
index 63ebcb4750b..f9bfb1759ef 100644
--- a/jdk/test/sun/security/pkcs11/SecureRandom/Basic.java
+++ b/jdk/test/sun/security/pkcs11/SecureRandom/Basic.java
@@ -27,6 +27,7 @@
* @summary basic test for PKCS#11 SecureRandom
* @author Andreas Sterbenz
* @library ..
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/sun/security/pkcs11/Signature/ByteBuffers.java b/jdk/test/sun/security/pkcs11/Signature/ByteBuffers.java
index 31ae86c9a5e..8a76866f73f 100644
--- a/jdk/test/sun/security/pkcs11/Signature/ByteBuffers.java
+++ b/jdk/test/sun/security/pkcs11/Signature/ByteBuffers.java
@@ -27,6 +27,7 @@
* @summary Test the Signature.update(ByteBuffer) method
* @author Andreas Sterbenz
* @library ..
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/sun/security/pkcs11/Signature/ReinitSignature.java b/jdk/test/sun/security/pkcs11/Signature/ReinitSignature.java
index 36f80f3436e..d5ace8b9602 100644
--- a/jdk/test/sun/security/pkcs11/Signature/ReinitSignature.java
+++ b/jdk/test/sun/security/pkcs11/Signature/ReinitSignature.java
@@ -27,6 +27,7 @@
* @summary test that reinitializing Signatures works correctly
* @author Andreas Sterbenz
* @library ..
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/sun/security/pkcs11/Signature/TestDSA.java b/jdk/test/sun/security/pkcs11/Signature/TestDSA.java
index c7845ae4831..9f8c099f4c2 100644
--- a/jdk/test/sun/security/pkcs11/Signature/TestDSA.java
+++ b/jdk/test/sun/security/pkcs11/Signature/TestDSA.java
@@ -27,6 +27,7 @@
* @summary basic test of SHA1withDSA and RawDSA signing/verifying
* @author Andreas Sterbenz
* @library ..
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/sun/security/pkcs11/Signature/TestDSAKeyLength.java b/jdk/test/sun/security/pkcs11/Signature/TestDSAKeyLength.java
index 89b2b7a1c18..0287e7d028f 100644
--- a/jdk/test/sun/security/pkcs11/Signature/TestDSAKeyLength.java
+++ b/jdk/test/sun/security/pkcs11/Signature/TestDSAKeyLength.java
@@ -26,6 +26,7 @@
* @summary verify that P11Signature impl will error out when initialized
* with unsupported key sizes
* @library ..
+ * @key randomness
*/
diff --git a/jdk/test/sun/security/pkcs11/ec/ReadPKCS12.java b/jdk/test/sun/security/pkcs11/ec/ReadPKCS12.java
index 930e0625b43..112470509fe 100644
--- a/jdk/test/sun/security/pkcs11/ec/ReadPKCS12.java
+++ b/jdk/test/sun/security/pkcs11/ec/ReadPKCS12.java
@@ -28,6 +28,7 @@
* @author Andreas Sterbenz
* @library ..
* @library ../../../../java/security/testlibrary
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/sun/security/pkcs11/ec/TestCurves.java b/jdk/test/sun/security/pkcs11/ec/TestCurves.java
index de53e2147fc..fb9cd836ad6 100644
--- a/jdk/test/sun/security/pkcs11/ec/TestCurves.java
+++ b/jdk/test/sun/security/pkcs11/ec/TestCurves.java
@@ -29,6 +29,7 @@
* @library ..
* @compile -XDignore.symbol.file TestCurves.java
* @run main TestCurves
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/sun/security/pkcs11/ec/TestECDSA.java b/jdk/test/sun/security/pkcs11/ec/TestECDSA.java
index 98dd939eaec..b811b44c6ef 100644
--- a/jdk/test/sun/security/pkcs11/ec/TestECDSA.java
+++ b/jdk/test/sun/security/pkcs11/ec/TestECDSA.java
@@ -28,6 +28,7 @@
* @author Andreas Sterbenz
* @library ..
* @library ../../../../java/security/testlibrary
+ * @key randomness
*/
import java.util.*;
diff --git a/jdk/test/sun/security/pkcs11/rsa/KeyWrap.java b/jdk/test/sun/security/pkcs11/rsa/KeyWrap.java
index ed31aa203fc..7f08481d6f7 100644
--- a/jdk/test/sun/security/pkcs11/rsa/KeyWrap.java
+++ b/jdk/test/sun/security/pkcs11/rsa/KeyWrap.java
@@ -27,6 +27,7 @@
* @summary Verify key wrapping (of extractable keys) works for RSA/PKCS1
* @author Andreas Sterbenz
* @library ..
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/sun/security/pkcs11/rsa/TestKeyPairGenerator.java b/jdk/test/sun/security/pkcs11/rsa/TestKeyPairGenerator.java
index 92eb0f91b93..dbabc0c3dfa 100644
--- a/jdk/test/sun/security/pkcs11/rsa/TestKeyPairGenerator.java
+++ b/jdk/test/sun/security/pkcs11/rsa/TestKeyPairGenerator.java
@@ -24,10 +24,13 @@
/**
* @test
* @bug 4856966
- * @summary Verify that the RSA KeyPairGenerator works
+ * @summary Verify that the RSA KeyPairGenerator works (use -Dseed=X to set PRNG seed)
* @author Andreas Sterbenz
* @library ..
+ * @library /lib/testlibrary
+ * @build jdk.testlibrary.*
* @run main/othervm TestKeyPairGenerator
+ * @key intermittent randomness
*/
import java.io.*;
@@ -105,7 +108,7 @@ public class TestKeyPairGenerator extends PKCS11Test {
int[] keyLengths = {512, 512, 1024};
BigInteger[] pubExps = {null, BigInteger.valueOf(3), null};
KeyPair[] keyPairs = new KeyPair[3];
- new Random().nextBytes(data);
+ RandomFactory.getRandom().nextBytes(data);
KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA", provider);
for (int i = 0; i < keyLengths.length; i++) {
int len = keyLengths[i];
diff --git a/jdk/test/sun/security/pkcs11/rsa/TestSignatures.java b/jdk/test/sun/security/pkcs11/rsa/TestSignatures.java
index fd11d0cb67b..b27de0a9b77 100644
--- a/jdk/test/sun/security/pkcs11/rsa/TestSignatures.java
+++ b/jdk/test/sun/security/pkcs11/rsa/TestSignatures.java
@@ -27,6 +27,7 @@
* @summary Test signing/verifying using all the signature algorithms
* @author Andreas Sterbenz
* @library ..
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/sun/security/provider/DSA/TestDSA.java b/jdk/test/sun/security/provider/DSA/TestDSA.java
index 197841bb0e1..d730b69f6cb 100644
--- a/jdk/test/sun/security/provider/DSA/TestDSA.java
+++ b/jdk/test/sun/security/provider/DSA/TestDSA.java
@@ -26,6 +26,7 @@
* @bug 4815057 4839277
* @summary basic test of SHA1withDSA and RawDSA signing/verifying
* @author Andreas Sterbenz
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/sun/security/provider/DSA/TestDSA2.java b/jdk/test/sun/security/provider/DSA/TestDSA2.java
index 600161d00f7..00691535ac1 100644
--- a/jdk/test/sun/security/provider/DSA/TestDSA2.java
+++ b/jdk/test/sun/security/provider/DSA/TestDSA2.java
@@ -26,6 +26,7 @@
* @run main/othervm/timeout=250 TestDSA2
* @summary verify that DSA signature works using SHA and SHA-224 and
* SHA-256 digests.
+ * @key randomness
*/
diff --git a/jdk/test/sun/security/provider/SeedGenerator/Priority_Inversion.java b/jdk/test/sun/security/provider/SeedGenerator/Priority_Inversion.java
index e41e2816142..857e55ceab9 100644
--- a/jdk/test/sun/security/provider/SeedGenerator/Priority_Inversion.java
+++ b/jdk/test/sun/security/provider/SeedGenerator/Priority_Inversion.java
@@ -29,6 +29,7 @@
*
* if the test returns, then it passed.
* if the test never returns (hangs forever), then it failed.
+ * @key randomness
*/
import java.security.SecureRandom;
diff --git a/jdk/test/sun/security/rsa/TestKeyPairGenerator.java b/jdk/test/sun/security/rsa/TestKeyPairGenerator.java
index 5e661b08ef1..1d7d1b82e2d 100644
--- a/jdk/test/sun/security/rsa/TestKeyPairGenerator.java
+++ b/jdk/test/sun/security/rsa/TestKeyPairGenerator.java
@@ -26,6 +26,7 @@
* @bug 4853305 4865198 4888410 4963723
* @summary Verify that the RSA KeyPairGenerator works
* @author Andreas Sterbenz
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/sun/security/rsa/TestSignatures.java b/jdk/test/sun/security/rsa/TestSignatures.java
index 1933f264295..f3b613f88ba 100644
--- a/jdk/test/sun/security/rsa/TestSignatures.java
+++ b/jdk/test/sun/security/rsa/TestSignatures.java
@@ -26,6 +26,7 @@
* @bug 4853305 4963723
* @summary Test signing/verifying using all the signature algorithms
* @author Andreas Sterbenz
+ * @key randomness
*/
import java.io.*;
diff --git a/jdk/test/sun/security/ssl/ClientHandshaker/LengthCheckTest.java b/jdk/test/sun/security/ssl/ClientHandshaker/LengthCheckTest.java
index 2d4940ac378..aaaaddff950 100644
--- a/jdk/test/sun/security/ssl/ClientHandshaker/LengthCheckTest.java
+++ b/jdk/test/sun/security/ssl/ClientHandshaker/LengthCheckTest.java
@@ -27,6 +27,7 @@
* @summary Vectors and fixed length fields should be verified
* for allowed sizes.
* @run main/othervm LengthCheckTest
+ * @key randomness
*/
/**
diff --git a/jdk/test/sun/security/ssl/GenSSLConfigs/main.java b/jdk/test/sun/security/ssl/GenSSLConfigs/main.java
index 13460595a81..0bfd59d8823 100644
--- a/jdk/test/sun/security/ssl/GenSSLConfigs/main.java
+++ b/jdk/test/sun/security/ssl/GenSSLConfigs/main.java
@@ -3,6 +3,7 @@
* @build TestThread Traffic Handler ServerHandler ServerThread ClientThread
* @run main/othervm/timeout=140 -Djsse.enableCBCProtection=false main
* @summary Make sure that different configurations of SSL sockets work
+ * @key randomness
*/
/*
diff --git a/jdk/test/tools/launcher/ExecutionEnvironment.java b/jdk/test/tools/launcher/ExecutionEnvironment.java
index 894c9a252fa..58acf380b0e 100644
--- a/jdk/test/tools/launcher/ExecutionEnvironment.java
+++ b/jdk/test/tools/launcher/ExecutionEnvironment.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, 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
@@ -184,15 +184,7 @@ public class ExecutionEnvironment extends TestHelper {
Map<String, String> env = new HashMap<>();
- if (TestHelper.isLinux || TestHelper.isMacOSX || TestHelper.isAIX) {
- for (String x : LD_PATH_STRINGS) {
- String pairs[] = x.split("=");
- env.put(pairs[0], pairs[1]);
- }
-
- tr = doExec(env, javaCmd, "-jar", testJarFile.getAbsolutePath());
- verifyJavaLibraryPathGeneric(tr);
- } else { // Solaris
+ if (TestHelper.isSolaris) {
// no override
env.clear();
env.put(LD_LIBRARY_PATH, LD_LIBRARY_PATH_VALUE);
@@ -208,6 +200,14 @@ public class ExecutionEnvironment extends TestHelper {
// verify the override occurs for 64-bit system
tr = doExec(env, javaCmd, "-jar", testJarFile.getAbsolutePath());
verifyJavaLibraryPathOverride(tr, false);
+ } else {
+ for (String x : LD_PATH_STRINGS) {
+ String pairs[] = x.split("=");
+ env.put(pairs[0], pairs[1]);
+ }
+
+ tr = doExec(env, javaCmd, "-jar", testJarFile.getAbsolutePath());
+ verifyJavaLibraryPathGeneric(tr);
}
}
diff --git a/nashorn/.hgtags b/nashorn/.hgtags
index 8fae27fd134..22199546e67 100644
--- a/nashorn/.hgtags
+++ b/nashorn/.hgtags
@@ -295,3 +295,4 @@ b2b332e64b7b2e06e25bccae9c0c0b585a03b4b5 jdk9-b55
ea4e794c3927df4e03f53202e15a3248375b7902 jdk9-b59
c55ce3738888b6c7596780b7b2ad1aa0f9ebccd7 jdk9-b60
89937bee80bd28826de8cf60aa63a21edab63f79 jdk9-b61
+1b5604bc81a6161b1c3c9dd654cd1399474ae9ee jdk9-b62
diff --git a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CodeGenerator.java b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CodeGenerator.java
index 21542874cbc..2b52713b6ab 100644
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CodeGenerator.java
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CodeGenerator.java
@@ -4526,7 +4526,7 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
}
if (addInitializer && !compiler.isOnDemandCompilation()) {
- compiler.addFunctionInitializer(data, functionNode);
+ functionNode.getCompileUnit().addFunctionInitializer(data, functionNode);
}
// We don't emit a ScriptFunction on stack for the outermost compiled function (as there's no code being
diff --git a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CompilationPhase.java b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CompilationPhase.java
index 2a1d2661202..bbdd347c1ac 100644
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CompilationPhase.java
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CompilationPhase.java
@@ -57,7 +57,6 @@ import jdk.nashorn.internal.ir.debug.ASTWriter;
import jdk.nashorn.internal.ir.debug.PrintVisitor;
import jdk.nashorn.internal.ir.visitor.NodeVisitor;
import jdk.nashorn.internal.runtime.CodeInstaller;
-import jdk.nashorn.internal.runtime.FunctionInitializer;
import jdk.nashorn.internal.runtime.RecompilableScriptFunctionData;
import jdk.nashorn.internal.runtime.ScriptEnvironment;
import jdk.nashorn.internal.runtime.logging.DebugLogger;
@@ -581,18 +580,7 @@ enum CompilationPhase {
continue;
}
unit.setCode(installedClasses.get(unit.getUnitClassName()));
- }
-
- if (!compiler.isOnDemandCompilation()) {
- // Initialize functions
- final Map<Integer, FunctionInitializer> initializers = compiler.getFunctionInitializers();
- if (initializers != null) {
- for (final Entry<Integer, FunctionInitializer> entry : initializers.entrySet()) {
- final FunctionInitializer initializer = entry.getValue();
- initializer.setCode(installedClasses.get(initializer.getClassName()));
- compiler.getScriptFunctionData(entry.getKey()).initializeCode(initializer);
- }
- }
+ unit.initializeFunctionsCode();
}
if (log.isEnabled()) {
diff --git a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CompileUnit.java b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CompileUnit.java
index a428e5bc5d2..86feeeda0a5 100644
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CompileUnit.java
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CompileUnit.java
@@ -26,10 +26,16 @@
package jdk.nashorn.internal.codegen;
import java.io.Serializable;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.IdentityHashMap;
+import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.TreeSet;
import jdk.nashorn.internal.ir.CompileUnitHolder;
+import jdk.nashorn.internal.ir.FunctionNode;
+import jdk.nashorn.internal.runtime.RecompilableScriptFunctionData;
/**
* Used to track split class compilation. Note that instances of the class are serializable, but all fields are
@@ -50,6 +56,8 @@ public final class CompileUnit implements Comparable<CompileUnit>, Serializable
private transient Class<?> clazz;
+ private transient Map<FunctionNode, RecompilableScriptFunctionData> functions = new IdentityHashMap<>();
+
private transient boolean isUsed;
private static int emittedUnitCount;
@@ -121,6 +129,32 @@ public final class CompileUnit implements Comparable<CompileUnit>, Serializable
this.classEmitter = null;
}
+ void addFunctionInitializer(final RecompilableScriptFunctionData data, final FunctionNode functionNode) {
+ functions.put(functionNode, data);
+ }
+
+ /**
+ * Returns true if this compile unit is responsible for initializing the specified function data with specified
+ * function node.
+ * @param data the function data to check
+ * @param functionNode the function node to check
+ * @return true if this unit is responsible for initializing the function data with the function node, otherwise
+ * false
+ */
+ public boolean isInitializing(final RecompilableScriptFunctionData data, final FunctionNode functionNode) {
+ return functions.get(functionNode) == data;
+ }
+
+ void initializeFunctionsCode() {
+ for(final Map.Entry<FunctionNode, RecompilableScriptFunctionData> entry : functions.entrySet()) {
+ entry.getValue().initializeCode(entry.getKey());
+ }
+ }
+
+ Collection<FunctionNode> getFunctionNodes() {
+ return Collections.unmodifiableCollection(functions.keySet());
+ }
+
/**
* Add weight to this compile unit
* @param w weight to add
diff --git a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/Compiler.java b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/Compiler.java
index 740022b2909..7cdd9be378f 100644
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/Compiler.java
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/Compiler.java
@@ -565,7 +565,7 @@ public final class Compiler implements Loggable {
* @return a copy of this compiler's current mapping of invalidated optimistic program points to their types.
*/
public Map<Integer, Type> getInvalidatedProgramPoints() {
- return invalidatedProgramPoints == null ? null : new TreeMap<>(invalidatedProgramPoints);
+ return invalidatedProgramPoints.isEmpty() ? null : new TreeMap<>(invalidatedProgramPoints);
}
TypeMap getTypeMap() {
@@ -704,21 +704,6 @@ public final class Compiler implements Loggable {
return sb.toString();
}
- Map<Integer, FunctionInitializer> functionInitializers;
-
- void addFunctionInitializer(final RecompilableScriptFunctionData functionData, final FunctionNode functionNode) {
- if (functionInitializers == null) {
- functionInitializers = new HashMap<>();
- }
- if (!functionInitializers.containsKey(functionData)) {
- functionInitializers.put(functionData.getFunctionNodeId(), new FunctionInitializer(functionNode));
- }
- }
-
- Map<Integer, FunctionInitializer> getFunctionInitializers() {
- return functionInitializers;
- }
-
/**
* Persist current compilation with the given {@code cacheKey}.
* @param cacheKey cache key
@@ -726,15 +711,17 @@ public final class Compiler implements Loggable {
*/
public void persistClassInfo(final String cacheKey, final FunctionNode functionNode) {
if (cacheKey != null && env._persistent_cache) {
- Map<Integer, FunctionInitializer> initializers;
// If this is an on-demand compilation create a function initializer for the function being compiled.
// Otherwise use function initializer map generated by codegen.
- if (functionInitializers == null) {
- initializers = new HashMap<>();
- final FunctionInitializer initializer = new FunctionInitializer(functionNode, getInvalidatedProgramPoints());
- initializers.put(functionNode.getId(), initializer);
+ Map<Integer, FunctionInitializer> initializers = new HashMap<>();
+ if (isOnDemandCompilation()) {
+ initializers.put(functionNode.getId(), new FunctionInitializer(functionNode, getInvalidatedProgramPoints()));
} else {
- initializers = functionInitializers;
+ for (final CompileUnit compileUnit : getCompileUnits()) {
+ for (final FunctionNode fn : compileUnit.getFunctionNodes()) {
+ initializers.put(fn.getId(), new FunctionInitializer(fn));
+ }
+ }
}
final String mainClassName = getFirstCompileUnit().getUnitClassName();
installer.storeScript(cacheKey, source, mainClassName, bytecode, initializers, constantData.toArray(), compilationId);
diff --git a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/TypeEvaluator.java b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/TypeEvaluator.java
index d5282a8b9db..ba9d7fd6aa2 100644
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/TypeEvaluator.java
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/TypeEvaluator.java
@@ -227,7 +227,8 @@ final class TypeEvaluator {
// gradually introduce them as needed. An easy one would be to do the same for .call(this) idiom.
final CallNode callExpr = (CallNode)expr;
final Expression fnExpr = callExpr.getFunction();
- if (fnExpr instanceof FunctionNode) {
+ // Skip evaluation if running with eager compilation as we may violate constraints in RecompilableScriptFunctionData
+ if (fnExpr instanceof FunctionNode && compiler.getContext().getEnv()._lazy_compilation) {
final FunctionNode fn = (FunctionNode)fnExpr;
if (callExpr.getArgs().isEmpty()) {
final RecompilableScriptFunctionData data = compiler.getScriptFunctionData(fn.getId());
diff --git a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/Context.java b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/Context.java
index 5c4bbd662f5..d3289b2a20e 100644
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/Context.java
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/Context.java
@@ -1281,7 +1281,7 @@ public final class Context {
compiler.persistClassInfo(cacheKey, compiledFunction);
} else {
Compiler.updateCompilationId(storedScript.getCompilationId());
- script = install(storedScript, source, installer);
+ script = storedScript.installScript(source, installer);
}
cacheClass(source, script);
@@ -1303,51 +1303,6 @@ public final class Context {
}
/**
- * Install a previously compiled class from the code cache.
- *
- * @param storedScript cached script containing class bytes and constants
- * @return main script class
- */
- private static Class<?> install(final StoredScript storedScript, final Source source, final CodeInstaller<ScriptEnvironment> installer) {
-
- final Map<String, Class<?>> installedClasses = new HashMap<>();
- final Map<String, byte[]> classBytes = storedScript.getClassBytes();
- final Object[] constants = storedScript.getConstants();
- final String mainClassName = storedScript.getMainClassName();
- final byte[] mainClassBytes = classBytes.get(mainClassName);
- final Class<?> mainClass = installer.install(mainClassName, mainClassBytes);
- final Map<Integer, FunctionInitializer> initializers = storedScript.getInitializers();
-
- installedClasses.put(mainClassName, mainClass);
-
- for (final Map.Entry<String, byte[]> entry : classBytes.entrySet()) {
- final String className = entry.getKey();
- if (className.equals(mainClassName)) {
- continue;
- }
- final byte[] code = entry.getValue();
-
- installedClasses.put(className, installer.install(className, code));
- }
-
- installer.initialize(installedClasses.values(), source, constants);
-
- for (final Object constant : constants) {
- if (constant instanceof RecompilableScriptFunctionData) {
- final RecompilableScriptFunctionData data = (RecompilableScriptFunctionData) constant;
- data.initTransients(source, installer);
- final FunctionInitializer initializer = initializers.get(data.getFunctionNodeId());
- if (initializer != null) {
- initializer.setCode(installedClasses.get(initializer.getClassName()));
- data.initializeCode(initializer);
- }
- }
- }
-
- return mainClass;
- }
-
- /**
* Cache for compiled script classes.
*/
@SuppressWarnings("serial")
diff --git a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/FunctionInitializer.java b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/FunctionInitializer.java
index 906024d7ffa..a2139ccafc4 100644
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/FunctionInitializer.java
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/FunctionInitializer.java
@@ -60,17 +60,6 @@ public final class FunctionInitializer implements Serializable {
}
/**
- * Copy constructor.
- *
- * @param init original initializer
- */
- FunctionInitializer(final FunctionInitializer init) {
- this.className = init.getClassName();
- this.methodType = init.getMethodType();
- this.flags = init.getFlags();
- }
-
- /**
* Constructor.
*
* @param functionNode the function node
@@ -130,7 +119,7 @@ public final class FunctionInitializer implements Serializable {
* Set the class implementing the function
* @param code the class
*/
- public void setCode(final Class<?> code) {
+ void setCode(final Class<?> code) {
// Make sure code has not been set and has expected class name
if (this.code != null) {
throw new IllegalStateException("code already set");
diff --git a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/RecompilableScriptFunctionData.java b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/RecompilableScriptFunctionData.java
index c65b031e010..3217c1c450b 100644
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/RecompilableScriptFunctionData.java
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/RecompilableScriptFunctionData.java
@@ -32,7 +32,6 @@ import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodType;
import java.util.Collection;
import java.util.Collections;
-import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
@@ -503,7 +502,7 @@ public final class RecompilableScriptFunctionData extends ScriptFunctionData imp
if (script != null) {
Compiler.updateCompilationId(script.getCompilationId());
- return installStoredScript(script, newInstaller);
+ return script.installFunction(this, newInstaller);
}
}
@@ -518,56 +517,6 @@ public final class RecompilableScriptFunctionData extends ScriptFunctionData imp
return new FunctionInitializer(compiledFn, compiler.getInvalidatedProgramPoints());
}
- private static Map<String, Class<?>> installStoredScriptClasses(final StoredScript script, final CodeInstaller<ScriptEnvironment> installer) {
- final Map<String, Class<?>> installedClasses = new HashMap<>();
- final Map<String, byte[]> classBytes = script.getClassBytes();
- final String mainClassName = script.getMainClassName();
- final byte[] mainClassBytes = classBytes.get(mainClassName);
-
- final Class<?> mainClass = installer.install(mainClassName, mainClassBytes);
-
- installedClasses.put(mainClassName, mainClass);
-
- for (final Map.Entry<String, byte[]> entry : classBytes.entrySet()) {
- final String className = entry.getKey();
- final byte[] bytecode = entry.getValue();
-
- if (className.equals(mainClassName)) {
- continue;
- }
-
- installedClasses.put(className, installer.install(className, bytecode));
- }
- return installedClasses;
- }
-
- /**
- * Install this script using the given {@code installer}.
- *
- * @param script the compiled script
- * @return the function initializer
- */
- private FunctionInitializer installStoredScript(final StoredScript script, final CodeInstaller<ScriptEnvironment> newInstaller) {
- final Map<String, Class<?>> installedClasses = installStoredScriptClasses(script, newInstaller);
-
- final Map<Integer, FunctionInitializer> initializers = script.getInitializers();
- assert initializers != null;
- assert initializers.size() == 1;
- final FunctionInitializer initializer = initializers.values().iterator().next();
-
- final Object[] constants = script.getConstants();
- for (int i = 0; i < constants.length; i++) {
- if (constants[i] instanceof RecompilableScriptFunctionData) {
- // replace deserialized function data with the ones we already have
- constants[i] = getScriptFunctionData(((RecompilableScriptFunctionData) constants[i]).getFunctionNodeId());
- }
- }
-
- newInstaller.initialize(installedClasses.values(), source, constants);
- initializer.setCode(installedClasses.get(initializer.getClassName()));
- return initializer;
- }
-
boolean usePersistentCodeCache() {
final ScriptEnvironment env = installer.getOwner();
return env._persistent_cache && env._optimistic_types;
@@ -645,13 +594,21 @@ public final class RecompilableScriptFunctionData extends ScriptFunctionData imp
* by the compiler internals in Nashorn and is public for implementation reasons only. Attempting to invoke it
* externally will result in an exception.
*
- * @param initializer FunctionInitializer for this data
+ * @param functionNode FunctionNode for this data
*/
- public void initializeCode(final FunctionInitializer initializer) {
+ public void initializeCode(final FunctionNode functionNode) {
// Since the method is public, we double-check that we aren't invoked with an inappropriate compile unit.
- if(!code.isEmpty()) {
+ if (!code.isEmpty() || functionNode.getId() != functionNodeId || !functionNode.getCompileUnit().isInitializing(this, functionNode)) {
throw new IllegalStateException(name);
}
+ addCode(lookup(functionNode), null, null, functionNode.getFlags());
+ }
+
+ /**
+ * Initializes this function with the given function code initializer.
+ * @param initializer function code initializer
+ */
+ void initializeCode(final FunctionInitializer initializer) {
addCode(lookup(initializer, true), null, null, initializer.getFlags());
}
diff --git a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/StoredScript.java b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/StoredScript.java
index b36cec8b9d1..66153e28337 100644
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/StoredScript.java
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/StoredScript.java
@@ -27,7 +27,7 @@ package jdk.nashorn.internal.runtime;
import java.io.Serializable;
import java.util.Arrays;
-import java.util.LinkedHashMap;
+import java.util.HashMap;
import java.util.Map;
/**
@@ -77,44 +77,70 @@ public final class StoredScript implements Serializable {
return compilationId;
}
- /**
- * Returns the main class name.
- * @return the main class name
- */
- public String getMainClassName() {
- return mainClassName;
- }
+ private Map<String, Class<?>> installClasses(final Source source, final CodeInstaller<ScriptEnvironment> installer) {
+ final Map<String, Class<?>> installedClasses = new HashMap<>();
+ final byte[] mainClassBytes = classBytes.get(mainClassName);
+ final Class<?> mainClass = installer.install(mainClassName, mainClassBytes);
+
+ installedClasses.put(mainClassName, mainClass);
- /**
- * Returns a map of class names to class bytes.
- * @return map of class bytes
- */
- public Map<String, byte[]> getClassBytes() {
- final Map<String, byte[]> clonedMap = new LinkedHashMap<>();
for (final Map.Entry<String, byte[]> entry : classBytes.entrySet()) {
- clonedMap.put(entry.getKey(), entry.getValue().clone());
+ final String className = entry.getKey();
+
+ if (!className.equals(mainClassName)) {
+ installedClasses.put(className, installer.install(className, entry.getValue()));
+ }
}
- return clonedMap;
+
+ installer.initialize(installedClasses.values(), source, constants);
+ return installedClasses;
}
- /**
- * Returns the constants array.
- * @return constants array
- */
- public Object[] getConstants() {
- return constants.clone();
+ FunctionInitializer installFunction(final RecompilableScriptFunctionData data, final CodeInstaller<ScriptEnvironment> installer) {
+ final Map<String, Class<?>> installedClasses = installClasses(data.getSource(), installer);
+
+ assert initializers != null;
+ assert initializers.size() == 1;
+ final FunctionInitializer initializer = initializers.values().iterator().next();
+
+ for (int i = 0; i < constants.length; i++) {
+ if (constants[i] instanceof RecompilableScriptFunctionData) {
+ // replace deserialized function data with the ones we already have
+ final RecompilableScriptFunctionData newData = data.getScriptFunctionData(((RecompilableScriptFunctionData) constants[i]).getFunctionNodeId());
+ assert newData != null;
+ newData.initTransients(data.getSource(), installer);
+ constants[i] = newData;
+ }
+ }
+
+ initializer.setCode(installedClasses.get(initializer.getClassName()));
+ return initializer;
}
/**
- * Returns the function initializers map.
- * @return The initializers map.
+ * Install as script.
+ *
+ * @param source the source
+ * @param installer the installer
+ * @return main script class
*/
- public Map<Integer, FunctionInitializer> getInitializers() {
- final Map<Integer, FunctionInitializer> clonedMap = new LinkedHashMap<>();
- for (final Map.Entry<Integer, FunctionInitializer> entry : initializers.entrySet()) {
- clonedMap.put(entry.getKey(), new FunctionInitializer(entry.getValue()));
+ Class<?> installScript(final Source source, final CodeInstaller<ScriptEnvironment> installer) {
+
+ final Map<String, Class<?>> installedClasses = installClasses(source, installer);
+
+ for (final Object constant : constants) {
+ if (constant instanceof RecompilableScriptFunctionData) {
+ final RecompilableScriptFunctionData data = (RecompilableScriptFunctionData) constant;
+ data.initTransients(source, installer);
+ final FunctionInitializer initializer = initializers.get(data.getFunctionNodeId());
+ if (initializer != null) {
+ initializer.setCode(installedClasses.get(initializer.getClassName()));
+ data.initializeCode(initializer);
+ }
+ }
}
- return clonedMap;
+
+ return installedClasses.get(mainClassName);
}
@Override
diff --git a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/regexp/RegExpFactory.java b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/regexp/RegExpFactory.java
index 77b1b3dcd3e..2d37a7614c2 100644
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/regexp/RegExpFactory.java
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/regexp/RegExpFactory.java
@@ -26,7 +26,7 @@
package jdk.nashorn.internal.runtime.regexp;
import java.util.Collections;
-import java.util.Set;
+import java.util.Map;
import java.util.WeakHashMap;
import jdk.nashorn.internal.runtime.ParserException;
import jdk.nashorn.internal.runtime.options.Options;
@@ -45,11 +45,10 @@ public class RegExpFactory {
/** Weak cache of already validated regexps - when reparsing, we don't, for example
* need to recompile (reverify) all regexps that have previously been parsed by this
* RegExpFactory in a previous compilation. This saves significant time in e.g. avatar
- * startup */
- private static final Set<String> VALID_CACHE_SET =
- Collections.newSetFromMap(
- Collections.synchronizedMap(
- new WeakHashMap<String, Boolean>()));
+ * startup
+ */
+ private static final Map<String, RegExp> REGEXP_CACHE =
+ Collections.synchronizedMap(new WeakHashMap<String, RegExp>());
static {
final String impl = Options.getStringProperty("nashorn.regexp.impl", JONI);
@@ -87,7 +86,13 @@ public class RegExpFactory {
* @throws ParserException if invalid source or flags
*/
public static RegExp create(final String pattern, final String flags) {
- return instance.compile(pattern, flags);
+ final String key = pattern + "/" + flags;
+ RegExp regexp = REGEXP_CACHE.get(key);
+ if (regexp == null) {
+ regexp = instance.compile(pattern, flags);
+ REGEXP_CACHE.put(key, regexp);
+ }
+ return regexp;
}
/**
@@ -98,11 +103,8 @@ public class RegExpFactory {
*
* @throws ParserException if invalid source or flags
*/
- // @SuppressWarnings({"unused"})
public static void validate(final String pattern, final String flags) throws ParserException {
- if (VALID_CACHE_SET.add(pattern + flags)) {
- instance.compile(pattern, flags);
- }
+ create(pattern, flags);
}
/**
diff --git a/nashorn/test/script/basic/JDK-8053905.js b/nashorn/test/script/basic/JDK-8053905.js
new file mode 100644
index 00000000000..aa6c9db2d6f
--- /dev/null
+++ b/nashorn/test/script/basic/JDK-8053905.js
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2010, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * JDK-8053905: Eager code generation fails for earley boyer with split threshold set to 1000
+ *
+ * @test
+ * @runif external.octane
+ * @fork
+ * @option -Dnashorn.compiler.splitter.threshold=1000
+ * @option -scripting
+ * @option --lazy-compilation=false
+ */
+
+var fn = __DIR__ + 'compile-octane.js';
+arguments.push("earley-boyer"); // run only earley-boyer
+var url = new java.io.File(fn).toURL();
+load(url);
diff --git a/nashorn/test/script/basic/JDK-8053905.js.EXPECTED b/nashorn/test/script/basic/JDK-8053905.js.EXPECTED
new file mode 100644
index 00000000000..d8c6c887ae0
--- /dev/null
+++ b/nashorn/test/script/basic/JDK-8053905.js.EXPECTED
@@ -0,0 +1,2 @@
+Compiling 'earley-boyer'...
+Done.
diff --git a/nashorn/test/script/basic/JDK-8066407.js b/nashorn/test/script/basic/JDK-8066407.js
new file mode 100644
index 00000000000..bc0290f5729
--- /dev/null
+++ b/nashorn/test/script/basic/JDK-8066407.js
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * JDK-8066407: Function with same body not reparsed after SyntaxError
+ *
+ * @test
+ * @run
+ */
+
+function testFunction(body) {
+ try {
+ Function(body);
+ Assert.fail("Should have thrown");
+ } catch (e) {
+ Assert.assertEquals(e.name, "SyntaxError");
+ count++;
+ }
+
+}
+
+var count = 0;
+
+testFunction("/a/r");
+testFunction("/a/r");
+testFunction("/a/r");
+
+Assert.assertTrue(count === 3);
diff --git a/nashorn/test/script/basic/compile-octane-splitter.js b/nashorn/test/script/basic/compile-octane-splitter.js
index 58c5966a2a7..4fffaa85476 100644
--- a/nashorn/test/script/basic/compile-octane-splitter.js
+++ b/nashorn/test/script/basic/compile-octane-splitter.js
@@ -29,11 +29,10 @@
* forever, so make this test future safe, we specify them explicitly
*
* @test
- * @fork
- * @option -Dnashorn.compiler.splitter.threshold=1000
- * @fork
* @runif external.octane
+ * @fork
* @option -scripting
+ * @option -Dnashorn.compiler.splitter.threshold=1000
* @option -Dnashorn.typeInfo.disabled=true
* @option --class-cache-size=0
* @option --persistent-code-cache=false