This commit is contained in:
Jesper Wilhelmsson 2020-07-03 00:14:21 +02:00
commit 6b8bf62a75
22 changed files with 425 additions and 248 deletions

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2015, 2020, 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
@ -632,10 +632,37 @@ class name java/security/cert/X509CRL
class name java/security/cert/X509Certificate
-method name verify descriptor (Ljava/security/PublicKey;Ljava/security/Provider;)V
class name java/security/interfaces/RSAKey
-method name getParams descriptor ()Ljava/security/spec/AlgorithmParameterSpec;
-class name java/security/spec/DSAGenParameterSpec
class name java/security/spec/MGF1ParameterSpec
-field name SHA224 descriptor Ljava/security/spec/MGF1ParameterSpec;
-field name SHA512_224 descriptor Ljava/security/spec/MGF1ParameterSpec;
-field name SHA512_256 descriptor Ljava/security/spec/MGF1ParameterSpec;
class name java/security/spec/PSSParameterSpec
-field name TRAILER_FIELD_BC descriptor I
-method name toString descriptor ()Ljava/lang/String;
class name java/security/spec/RSAKeyGenParameterSpec
-method name <init> descriptor (ILjava/math/BigInteger;Ljava/security/spec/AlgorithmParameterSpec;)V
-method name getKeyParams descriptor ()Ljava/security/spec/AlgorithmParameterSpec;
class name java/security/spec/RSAMultiPrimePrivateCrtKeySpec
-method name <init> descriptor (Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;[Ljava/security/spec/RSAOtherPrimeInfo;Ljava/security/spec/AlgorithmParameterSpec;)V
class name java/security/spec/RSAPrivateCrtKeySpec
-method name <init> descriptor (Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/security/spec/AlgorithmParameterSpec;)V
class name java/security/spec/RSAPrivateKeySpec
-method name <init> descriptor (Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/security/spec/AlgorithmParameterSpec;)V
-method name getParams descriptor ()Ljava/security/spec/AlgorithmParameterSpec;
class name java/security/spec/RSAPublicKeySpec
-method name <init> descriptor (Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/security/spec/AlgorithmParameterSpec;)V
-method name getParams descriptor ()Ljava/security/spec/AlgorithmParameterSpec;
class name java/text/Collator
-method name getInstance descriptor (Ljava/util/Locale;)Ljava/text/Collator;
@ -1457,6 +1484,14 @@ method name newUpdater descriptor (Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/
-class name java/util/function/UnaryOperator
class name java/util/jar/Attributes$Name
-field name EXTENSION_INSTALLATION descriptor Ljava/util/jar/Attributes$Name;
-field name IMPLEMENTATION_VENDOR_ID descriptor Ljava/util/jar/Attributes$Name;
-field name IMPLEMENTATION_URL descriptor Ljava/util/jar/Attributes$Name;
field name EXTENSION_INSTALLATION descriptor Ljava/util/jar/Attributes$Name; flags 19
field name IMPLEMENTATION_VENDOR_ID descriptor Ljava/util/jar/Attributes$Name; flags 19
field name IMPLEMENTATION_URL descriptor Ljava/util/jar/Attributes$Name; flags 19
class name java/util/jar/JarFile
-method name stream descriptor ()Ljava/util/stream/Stream;
@ -1535,6 +1570,9 @@ class name java/util/zip/ZipEntry
class name java/util/zip/ZipFile
-method name stream descriptor ()Ljava/util/stream/Stream;
class name javax/crypto/SealedObject
header extends java/lang/Object implements java/io/Serializable flags 21
class name javax/crypto/SecretKey
header extends java/lang/Object implements java/security/Key flags 601
@ -1559,6 +1597,12 @@ class name javax/net/ssl/ExtendedSSLSession
-class name javax/net/ssl/SNIServerName
class name javax/net/ssl/SSLEngine
-method name getApplicationProtocol descriptor ()Ljava/lang/String;
-method name getHandshakeApplicationProtocol descriptor ()Ljava/lang/String;
-method name setHandshakeApplicationProtocolSelector descriptor (Ljava/util/function/BiFunction;)V
-method name getHandshakeApplicationProtocolSelector descriptor ()Ljava/util/function/BiFunction;
class name javax/net/ssl/SSLParameters
-method name setServerNames descriptor (Ljava/util/List;)V
-method name getServerNames descriptor ()Ljava/util/List;
@ -1566,6 +1610,14 @@ class name javax/net/ssl/SSLParameters
-method name getSNIMatchers descriptor ()Ljava/util/Collection;
-method name setUseCipherSuitesOrder descriptor (Z)V
-method name getUseCipherSuitesOrder descriptor ()Z
-method name getApplicationProtocols descriptor ()[Ljava/lang/String;
-method name setApplicationProtocols descriptor ([Ljava/lang/String;)V
class name javax/net/ssl/SSLSocket
-method name getApplicationProtocol descriptor ()Ljava/lang/String;
-method name getHandshakeApplicationProtocol descriptor ()Ljava/lang/String;
-method name setHandshakeApplicationProtocolSelector descriptor (Ljava/util/function/BiFunction;)V
-method name getHandshakeApplicationProtocolSelector descriptor ()Ljava/util/function/BiFunction;
class name javax/net/ssl/SSLSocketFactory
-method name createSocket descriptor (Ljava/net/Socket;Ljava/io/InputStream;Z)Ljava/net/Socket;

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2015, 2020, 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
@ -8200,6 +8200,7 @@ method name getW descriptor ()Ljava/security/spec/ECPoint; flags 401
class name java/security/interfaces/RSAKey
header extends java/lang/Object flags 601 classAnnotations @Ljdk/Profile+Annotation;(value=I1)
method name getModulus descriptor ()Ljava/math/BigInteger; flags 401
method name getParams descriptor ()Ljava/security/spec/AlgorithmParameterSpec; flags 1
class name java/security/interfaces/RSAMultiPrimePrivateCrtKey
header extends java/lang/Object implements java/security/interfaces/RSAPrivateKey flags 601 classAnnotations @Ljdk/Profile+Annotation;(value=I1)
@ -8363,6 +8364,8 @@ field name SHA224 descriptor Ljava/security/spec/MGF1ParameterSpec; flags 19
field name SHA256 descriptor Ljava/security/spec/MGF1ParameterSpec; flags 19
field name SHA384 descriptor Ljava/security/spec/MGF1ParameterSpec; flags 19
field name SHA512 descriptor Ljava/security/spec/MGF1ParameterSpec; flags 19
field name SHA512_224 descriptor Ljava/security/spec/MGF1ParameterSpec; flags 19
field name SHA512_256 descriptor Ljava/security/spec/MGF1ParameterSpec; flags 19
method name <init> descriptor (Ljava/lang/String;)V flags 1
method name getDigestAlgorithm descriptor ()Ljava/lang/String; flags 1
@ -8375,6 +8378,7 @@ method name getFormat descriptor ()Ljava/lang/String; flags 11
class name java/security/spec/PSSParameterSpec
header extends java/lang/Object implements java/security/spec/AlgorithmParameterSpec flags 21 classAnnotations @Ljdk/Profile+Annotation;(value=I1)
field name DEFAULT descriptor Ljava/security/spec/PSSParameterSpec; flags 19
field name TRAILER_FIELD_BC descriptor I constantValue 1 flags 19
method name <init> descriptor (Ljava/lang/String;Ljava/lang/String;Ljava/security/spec/AlgorithmParameterSpec;II)V flags 1
method name <init> descriptor (I)V flags 1
method name getDigestAlgorithm descriptor ()Ljava/lang/String; flags 1
@ -8382,6 +8386,7 @@ method name getMGFAlgorithm descriptor ()Ljava/lang/String; flags 1
method name getMGFParameters descriptor ()Ljava/security/spec/AlgorithmParameterSpec; flags 1
method name getSaltLength descriptor ()I flags 1
method name getTrailerField descriptor ()I flags 1
method name toString descriptor ()Ljava/lang/String; flags 1
class name java/security/spec/RSAKeyGenParameterSpec
header extends java/lang/Object implements java/security/spec/AlgorithmParameterSpec flags 21 classAnnotations @Ljdk/Profile+Annotation;(value=I1)
@ -8390,6 +8395,8 @@ field name F4 descriptor Ljava/math/BigInteger; flags 19
method name <init> descriptor (ILjava/math/BigInteger;)V flags 1
method name getKeysize descriptor ()I flags 1
method name getPublicExponent descriptor ()Ljava/math/BigInteger; flags 1
method name <init> descriptor (ILjava/math/BigInteger;Ljava/security/spec/AlgorithmParameterSpec;)V flags 1
method name getKeyParams descriptor ()Ljava/security/spec/AlgorithmParameterSpec; flags 1
class name java/security/spec/RSAMultiPrimePrivateCrtKeySpec
header extends java/security/spec/RSAPrivateKeySpec flags 21 classAnnotations @Ljdk/Profile+Annotation;(value=I1)
@ -8401,6 +8408,7 @@ method name getPrimeExponentP descriptor ()Ljava/math/BigInteger; flags 1
method name getPrimeExponentQ descriptor ()Ljava/math/BigInteger; flags 1
method name getCrtCoefficient descriptor ()Ljava/math/BigInteger; flags 1
method name getOtherPrimeInfo descriptor ()[Ljava/security/spec/RSAOtherPrimeInfo; flags 1
method name <init> descriptor (Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;[Ljava/security/spec/RSAOtherPrimeInfo;Ljava/security/spec/AlgorithmParameterSpec;)V flags 1
class name java/security/spec/RSAOtherPrimeInfo
header extends java/lang/Object flags 21 classAnnotations @Ljdk/Profile+Annotation;(value=I1)
@ -8418,18 +8426,23 @@ method name getPrimeQ descriptor ()Ljava/math/BigInteger; flags 1
method name getPrimeExponentP descriptor ()Ljava/math/BigInteger; flags 1
method name getPrimeExponentQ descriptor ()Ljava/math/BigInteger; flags 1
method name getCrtCoefficient descriptor ()Ljava/math/BigInteger; flags 1
method name <init> descriptor (Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/security/spec/AlgorithmParameterSpec;)V flags 1
class name java/security/spec/RSAPrivateKeySpec
header extends java/lang/Object implements java/security/spec/KeySpec flags 21 classAnnotations @Ljdk/Profile+Annotation;(value=I1)
method name <init> descriptor (Ljava/math/BigInteger;Ljava/math/BigInteger;)V flags 1
method name getModulus descriptor ()Ljava/math/BigInteger; flags 1
method name getPrivateExponent descriptor ()Ljava/math/BigInteger; flags 1
method name <init> descriptor (Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/security/spec/AlgorithmParameterSpec;)V flags 1
method name getParams descriptor ()Ljava/security/spec/AlgorithmParameterSpec; flags 1
class name java/security/spec/RSAPublicKeySpec
header extends java/lang/Object implements java/security/spec/KeySpec flags 21 classAnnotations @Ljdk/Profile+Annotation;(value=I1)
method name <init> descriptor (Ljava/math/BigInteger;Ljava/math/BigInteger;)V flags 1
method name getModulus descriptor ()Ljava/math/BigInteger; flags 1
method name getPublicExponent descriptor ()Ljava/math/BigInteger; flags 1
method name <init> descriptor (Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/security/spec/AlgorithmParameterSpec;)V flags 1
method name getParams descriptor ()Ljava/security/spec/AlgorithmParameterSpec; flags 1
class name java/security/spec/X509EncodedKeySpec
header extends java/security/spec/EncodedKeySpec flags 21 classAnnotations @Ljdk/Profile+Annotation;(value=I1)
@ -10429,6 +10442,7 @@ method name values descriptor ()[Ljava/time/chrono/JapaneseEra; flags 9
method name getValue descriptor ()I flags 1
method name range descriptor (Ljava/time/temporal/TemporalField;)Ljava/time/temporal/ValueRange; flags 1
method name toString descriptor ()Ljava/lang/String; flags 1
method name getDisplayName descriptor (Ljava/time/format/TextStyle;Ljava/util/Locale;)Ljava/lang/String; flags 1
class name java/time/chrono/MinguoChronology
header extends java/time/chrono/AbstractChronology implements java/io/Serializable flags 31 classAnnotations @Ljdk/Profile+Annotation;(value=I1)
@ -15563,15 +15577,15 @@ field name MAIN_CLASS descriptor Ljava/util/jar/Attributes$Name; flags 19
field name SEALED descriptor Ljava/util/jar/Attributes$Name; flags 19
field name EXTENSION_LIST descriptor Ljava/util/jar/Attributes$Name; flags 19
field name EXTENSION_NAME descriptor Ljava/util/jar/Attributes$Name; flags 19
field name EXTENSION_INSTALLATION descriptor Ljava/util/jar/Attributes$Name; flags 19
field name IMPLEMENTATION_TITLE descriptor Ljava/util/jar/Attributes$Name; flags 19
field name IMPLEMENTATION_VERSION descriptor Ljava/util/jar/Attributes$Name; flags 19
field name IMPLEMENTATION_VENDOR descriptor Ljava/util/jar/Attributes$Name; flags 19
field name IMPLEMENTATION_VENDOR_ID descriptor Ljava/util/jar/Attributes$Name; flags 19
field name IMPLEMENTATION_URL descriptor Ljava/util/jar/Attributes$Name; flags 19
field name SPECIFICATION_TITLE descriptor Ljava/util/jar/Attributes$Name; flags 19
field name SPECIFICATION_VERSION descriptor Ljava/util/jar/Attributes$Name; flags 19
field name SPECIFICATION_VENDOR descriptor Ljava/util/jar/Attributes$Name; flags 19
field name EXTENSION_INSTALLATION descriptor Ljava/util/jar/Attributes$Name; flags 19 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;
field name IMPLEMENTATION_VENDOR_ID descriptor Ljava/util/jar/Attributes$Name; flags 19 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;
field name IMPLEMENTATION_URL descriptor Ljava/util/jar/Attributes$Name; flags 19 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;
method name <init> descriptor (Ljava/lang/String;)V flags 1
method name equals descriptor (Ljava/lang/Object;)Z flags 1
method name hashCode descriptor ()I flags 1
@ -16698,6 +16712,7 @@ method name <init> descriptor ()V flags 1
class name javax/crypto/SealedObject
header extends java/lang/Object implements java/io/Serializable flags 21
innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19
field name encodedParams descriptor [B flags 4
method name <init> descriptor (Ljava/io/Serializable;Ljavax/crypto/Cipher;)V thrownTypes java/io/IOException,javax/crypto/IllegalBlockSizeException flags 1
method name <init> descriptor (Ljavax/crypto/SealedObject;)V flags 4
@ -17086,6 +17101,10 @@ method name setEnableSessionCreation descriptor (Z)V flags 401
method name getEnableSessionCreation descriptor ()Z flags 401
method name getSSLParameters descriptor ()Ljavax/net/ssl/SSLParameters; flags 1
method name setSSLParameters descriptor (Ljavax/net/ssl/SSLParameters;)V flags 1
method name getApplicationProtocol descriptor ()Ljava/lang/String; flags 1
method name getHandshakeApplicationProtocol descriptor ()Ljava/lang/String; flags 1
method name setHandshakeApplicationProtocolSelector descriptor (Ljava/util/function/BiFunction;)V flags 1 signature (Ljava/util/function/BiFunction<Ljavax/net/ssl/SSLEngine;Ljava/util/List<Ljava/lang/String;>;Ljava/lang/String;>;)V
method name getHandshakeApplicationProtocolSelector descriptor ()Ljava/util/function/BiFunction; flags 1 signature ()Ljava/util/function/BiFunction<Ljavax/net/ssl/SSLEngine;Ljava/util/List<Ljava/lang/String;>;Ljava/lang/String;>;
class name javax/net/ssl/SSLEngineResult
header extends java/lang/Object flags 21 classAnnotations @Ljdk/Profile+Annotation;(value=I1)
@ -17156,6 +17175,8 @@ method name setSNIMatchers descriptor (Ljava/util/Collection;)V flags 11 signatu
method name getSNIMatchers descriptor ()Ljava/util/Collection; flags 11 signature ()Ljava/util/Collection<Ljavax/net/ssl/SNIMatcher;>;
method name setUseCipherSuitesOrder descriptor (Z)V flags 11
method name getUseCipherSuitesOrder descriptor ()Z flags 11
method name getApplicationProtocols descriptor ()[Ljava/lang/String; flags 1
method name setApplicationProtocols descriptor ([Ljava/lang/String;)V flags 1
class name javax/net/ssl/SSLPeerUnverifiedException
header extends javax/net/ssl/SSLException flags 21 classAnnotations @Ljdk/Profile+Annotation;(value=I1)
@ -17272,6 +17293,10 @@ method name setEnableSessionCreation descriptor (Z)V flags 401
method name getEnableSessionCreation descriptor ()Z flags 401
method name getSSLParameters descriptor ()Ljavax/net/ssl/SSLParameters; flags 1
method name setSSLParameters descriptor (Ljavax/net/ssl/SSLParameters;)V flags 1
method name getApplicationProtocol descriptor ()Ljava/lang/String; flags 1
method name getHandshakeApplicationProtocol descriptor ()Ljava/lang/String; flags 1
method name setHandshakeApplicationProtocolSelector descriptor (Ljava/util/function/BiFunction;)V flags 1 signature (Ljava/util/function/BiFunction<Ljavax/net/ssl/SSLSocket;Ljava/util/List<Ljava/lang/String;>;Ljava/lang/String;>;)V
method name getHandshakeApplicationProtocolSelector descriptor ()Ljava/util/function/BiFunction; flags 1 signature ()Ljava/util/function/BiFunction<Ljavax/net/ssl/SSLSocket;Ljava/util/List<Ljava/lang/String;>;Ljava/lang/String;>;
class name javax/net/ssl/SSLSocketFactory
header extends javax/net/SocketFactory flags 421 classAnnotations @Ljdk/Profile+Annotation;(value=I1)

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2015, 2020, 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
@ -2083,13 +2083,42 @@ method name equals descriptor (Ljava/lang/Object;)Z flags 1
method name toString descriptor ()Ljava/lang/String; flags 1
method name clone descriptor ()Ljava/lang/Object; thrownTypes java/lang/CloneNotSupportedException flags 1041
class name java/security/interfaces/RSAKey
-method name getParams descriptor ()Ljava/security/spec/AlgorithmParameterSpec;
class name java/security/spec/EncodedKeySpec
method name <init> descriptor ([BLjava/lang/String;)V flags 4
method name getAlgorithm descriptor ()Ljava/lang/String; flags 1
class name java/security/spec/MGF1ParameterSpec
-field name SHA512_224 descriptor Ljava/security/spec/MGF1ParameterSpec;
-field name SHA512_256 descriptor Ljava/security/spec/MGF1ParameterSpec;
class name java/security/spec/PKCS8EncodedKeySpec
method name <init> descriptor ([BLjava/lang/String;)V flags 1
class name java/security/spec/PSSParameterSpec
-field name TRAILER_FIELD_BC descriptor I
-method name toString descriptor ()Ljava/lang/String;
class name java/security/spec/RSAKeyGenParameterSpec
-method name <init> descriptor (ILjava/math/BigInteger;Ljava/security/spec/AlgorithmParameterSpec;)V
-method name getKeyParams descriptor ()Ljava/security/spec/AlgorithmParameterSpec;
class name java/security/spec/RSAMultiPrimePrivateCrtKeySpec
-method name <init> descriptor (Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;[Ljava/security/spec/RSAOtherPrimeInfo;Ljava/security/spec/AlgorithmParameterSpec;)V
class name java/security/spec/RSAPrivateCrtKeySpec
-method name <init> descriptor (Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/security/spec/AlgorithmParameterSpec;)V
class name java/security/spec/RSAPrivateKeySpec
-method name <init> descriptor (Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/security/spec/AlgorithmParameterSpec;)V
-method name getParams descriptor ()Ljava/security/spec/AlgorithmParameterSpec;
class name java/security/spec/RSAPublicKeySpec
-method name <init> descriptor (Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/security/spec/AlgorithmParameterSpec;)V
-method name getParams descriptor ()Ljava/security/spec/AlgorithmParameterSpec;
class name java/security/spec/X509EncodedKeySpec
method name <init> descriptor ([BLjava/lang/String;)V flags 1
@ -2224,9 +2253,6 @@ innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang
class name java/time/chrono/IsoChronology
method name epochSecond descriptor (IIIIIILjava/time/ZoneOffset;)J flags 1
class name java/time/chrono/JapaneseEra
method name getDisplayName descriptor (Ljava/time/format/TextStyle;Ljava/util/Locale;)Ljava/lang/String; flags 1
class name java/time/format/DateTimeFormatter
header extends java/lang/Object flags 31
innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19
@ -3221,12 +3247,6 @@ header extends java/lang/Object implements java/util/function/Function flags 601
innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19
class name java/util/jar/Attributes$Name
-field name EXTENSION_INSTALLATION descriptor Ljava/util/jar/Attributes$Name;
-field name IMPLEMENTATION_VENDOR_ID descriptor Ljava/util/jar/Attributes$Name;
-field name IMPLEMENTATION_URL descriptor Ljava/util/jar/Attributes$Name;
field name EXTENSION_INSTALLATION descriptor Ljava/util/jar/Attributes$Name; flags 19 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;
field name IMPLEMENTATION_VENDOR_ID descriptor Ljava/util/jar/Attributes$Name; flags 19 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;
field name IMPLEMENTATION_URL descriptor Ljava/util/jar/Attributes$Name; flags 19 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;
field name MULTI_RELEASE descriptor Ljava/util/jar/Attributes$Name; flags 19
class name java/util/jar/JarFile
@ -3381,6 +3401,9 @@ method name finalize descriptor ()V thrownTypes java/io/IOException flags 4 depr
class name javax/crypto/ExemptionMechanism
-method name finalize descriptor ()V
class name javax/crypto/SealedObject
header extends java/lang/Object implements java/io/Serializable flags 21
class name javax/net/ssl/ExtendedSSLSession
method name getStatusResponses descriptor ()Ljava/util/List; flags 1 signature ()Ljava/util/List<[B>;
@ -3388,12 +3411,6 @@ class name javax/net/ssl/HandshakeCompletedEvent
-method name getPeerCertificateChain descriptor ()[Ljavax/security/cert/X509Certificate;
method name getPeerCertificateChain descriptor ()[Ljavax/security/cert/X509Certificate; thrownTypes javax/net/ssl/SSLPeerUnverifiedException flags 1 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(since="9")
class name javax/net/ssl/SSLEngine
method name getApplicationProtocol descriptor ()Ljava/lang/String; flags 1
method name getHandshakeApplicationProtocol descriptor ()Ljava/lang/String; flags 1
method name setHandshakeApplicationProtocolSelector descriptor (Ljava/util/function/BiFunction;)V flags 1 signature (Ljava/util/function/BiFunction<Ljavax/net/ssl/SSLEngine;Ljava/util/List<Ljava/lang/String;>;Ljava/lang/String;>;)V
method name getHandshakeApplicationProtocolSelector descriptor ()Ljava/util/function/BiFunction; flags 1 signature ()Ljava/util/function/BiFunction<Ljavax/net/ssl/SSLEngine;Ljava/util/List<Ljava/lang/String;>;Ljava/lang/String;>;
class name javax/net/ssl/SSLEngineResult
header extends java/lang/Object flags 21
innerclass innerClass javax/net/ssl/SSLEngineResult$HandshakeStatus outerClass javax/net/ssl/SSLEngineResult innerClassName HandshakeStatus flags 4019
@ -3409,19 +3426,11 @@ method name setEnableRetransmissions descriptor (Z)V flags 1
method name getEnableRetransmissions descriptor ()Z flags 1
method name setMaximumPacketSize descriptor (I)V flags 1
method name getMaximumPacketSize descriptor ()I flags 1
method name getApplicationProtocols descriptor ()[Ljava/lang/String; flags 1
method name setApplicationProtocols descriptor ([Ljava/lang/String;)V flags 1
class name javax/net/ssl/SSLSession
-method name getPeerCertificateChain descriptor ()[Ljavax/security/cert/X509Certificate;
method name getPeerCertificateChain descriptor ()[Ljavax/security/cert/X509Certificate; thrownTypes javax/net/ssl/SSLPeerUnverifiedException flags 401 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(since="9")
class name javax/net/ssl/SSLSocket
method name getApplicationProtocol descriptor ()Ljava/lang/String; flags 1
method name getHandshakeApplicationProtocol descriptor ()Ljava/lang/String; flags 1
method name setHandshakeApplicationProtocolSelector descriptor (Ljava/util/function/BiFunction;)V flags 1 signature (Ljava/util/function/BiFunction<Ljavax/net/ssl/SSLSocket;Ljava/util/List<Ljava/lang/String;>;Ljava/lang/String;>;)V
method name getHandshakeApplicationProtocolSelector descriptor ()Ljava/util/function/BiFunction; flags 1 signature ()Ljava/util/function/BiFunction<Ljavax/net/ssl/SSLSocket;Ljava/util/List<Ljava/lang/String;>;Ljava/lang/String;>;
class name javax/security/auth/Policy
header extends java/lang/Object flags 421 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(since="1.4")

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2015, 2020, 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
@ -77,6 +77,9 @@ class name javax/swing/ImageIcon
field name component descriptor Ljava/awt/Component; flags 1c
field name tracker descriptor Ljava/awt/MediaTracker; flags 1c
class name javax/swing/JComboBox
-method name processKeyBinding descriptor (Ljavax/swing/KeyStroke;Ljava/awt/event/KeyEvent;IZ)Z
class name javax/swing/JComponent
field name accessibleContext descriptor Ljavax/accessibility/AccessibleContext; flags 4
-method name hide descriptor ()V
@ -90,8 +93,12 @@ field name accessibleFocusHandler descriptor Ljava/awt/event/FocusListener; flag
class name javax/swing/JDesktopPane
-method name remove descriptor (Ljava/awt/Component;)V
class name javax/swing/JViewport
-method name addNotify descriptor ()V
class name javax/swing/JList$AccessibleJList$AccessibleJListChild
method name getAccessibleAction descriptor ()Ljavax/accessibility/AccessibleAction; flags 1
class name javax/swing/plaf/basic/BasicRadioButtonUI
-method name installListeners descriptor (Ljavax/swing/AbstractButton;)V
-method name uninstallListeners descriptor (Ljavax/swing/AbstractButton;)V
class name javax/swing/tree/DefaultMutableTreeNode
-method name setParent descriptor (Ljavax/swing/tree/MutableTreeNode;)V

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2015, 2020, 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
@ -13524,6 +13524,7 @@ method name getItemAt descriptor (I)Ljava/lang/Object; flags 1 signature (I)TE;
method name createDefaultKeySelectionManager descriptor ()Ljavax/swing/JComboBox$KeySelectionManager; flags 4
method name paramString descriptor ()Ljava/lang/String; flags 4
method name getAccessibleContext descriptor ()Ljavax/accessibility/AccessibleContext; flags 1
method name processKeyBinding descriptor (Ljavax/swing/KeyStroke;Ljava/awt/event/KeyEvent;IZ)Z flags 4
class name javax/swing/JComboBox$AccessibleJComboBox
header extends javax/swing/JComponent$AccessibleJComponent implements javax/accessibility/AccessibleAction,javax/accessibility/AccessibleSelection flags 21
@ -14604,7 +14605,6 @@ method name getAccessibleChild descriptor (I)Ljavax/accessibility/Accessible; fl
method name getLocale descriptor ()Ljava/util/Locale; flags 1
method name addPropertyChangeListener descriptor (Ljava/beans/PropertyChangeListener;)V flags 1
method name removePropertyChangeListener descriptor (Ljava/beans/PropertyChangeListener;)V flags 1
method name getAccessibleAction descriptor ()Ljavax/accessibility/AccessibleAction; flags 1
method name getAccessibleComponent descriptor ()Ljavax/accessibility/AccessibleComponent; flags 1
method name getAccessibleSelection descriptor ()Ljavax/accessibility/AccessibleSelection; flags 1
method name getAccessibleText descriptor ()Ljavax/accessibility/AccessibleText; flags 1
@ -16720,7 +16720,6 @@ method name updateUI descriptor ()V flags 1
method name getUIClassID descriptor ()Ljava/lang/String; flags 1
method name addImpl descriptor (Ljava/awt/Component;Ljava/lang/Object;I)V flags 4
method name remove descriptor (Ljava/awt/Component;)V flags 1
method name addNotify descriptor ()V flags 1
method name scrollRectToVisible descriptor (Ljava/awt/Rectangle;)V flags 1
method name setBorder descriptor (Ljavax/swing/border/Border;)V flags 11
method name getInsets descriptor ()Ljava/awt/Insets; flags 11
@ -20281,6 +20280,8 @@ method name getDefaultIcon descriptor ()Ljavax/swing/Icon; flags 1
method name paint descriptor (Ljava/awt/Graphics;Ljavax/swing/JComponent;)V flags 21
method name paintFocus descriptor (Ljava/awt/Graphics;Ljava/awt/Rectangle;Ljava/awt/Dimension;)V flags 4
method name getPreferredSize descriptor (Ljavax/swing/JComponent;)Ljava/awt/Dimension; flags 1
method name installListeners descriptor (Ljavax/swing/AbstractButton;)V flags 4
method name uninstallListeners descriptor (Ljavax/swing/AbstractButton;)V flags 4
class name javax/swing/plaf/basic/BasicRootPaneUI
header extends javax/swing/plaf/RootPaneUI implements java/beans/PropertyChangeListener flags 21 classAnnotations @Ljdk/Profile+Annotation;(value=I4)

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2015, 2020, 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
@ -2524,7 +2524,6 @@ method name getPopupMenuListeners descriptor ()[Ljavax/swing/event/PopupMenuList
method name setAction descriptor (Ljavax/swing/Action;)V flags 1 runtimeAnnotations @Ljava/beans/BeanProperty;(visualUpdate=Ztrue,description="the\u005C;u0020;Action\u005C;u0020;instance\u005C;u0020;connected\u005C;u0020;with\u005C;u0020;this\u005C;u0020;ActionEvent\u005C;u0020;source")
method name getSelectedObjects descriptor ()[Ljava/lang/Object; flags 1 runtimeAnnotations @Ljava/beans/BeanProperty;(bound=Zfalse)
method name setEnabled descriptor (Z)V flags 1 runtimeAnnotations @Ljava/beans/BeanProperty;(description="The\u005C;u0020;enabled\u005C;u0020;state\u005C;u0020;of\u005C;u0020;the\u005C;u0020;component.",preferred=Ztrue)
method name processKeyBinding descriptor (Ljavax/swing/KeyStroke;Ljava/awt/event/KeyEvent;IZ)Z flags 4
method name setKeySelectionManager descriptor (Ljavax/swing/JComboBox$KeySelectionManager;)V flags 1 runtimeAnnotations @Ljava/beans/BeanProperty;(expert=Ztrue,bound=Zfalse,description="The\u005C;u0020;objects\u005C;u0020;that\u005C;u0020;changes\u005C;u0020;the\u005C;u0020;selection\u005C;u0020;when\u005C;u0020;a\u005C;u0020;key\u005C;u0020;is\u005C;u0020;pressed.")
method name getItemCount descriptor ()I flags 1 runtimeAnnotations @Ljava/beans/BeanProperty;(bound=Zfalse)
method name getAccessibleContext descriptor ()Ljavax/accessibility/AccessibleContext; flags 1 runtimeAnnotations @Ljava/beans/BeanProperty;(bound=Zfalse)
@ -3039,6 +3038,7 @@ class name javax/swing/JList$AccessibleJList$AccessibleJListChild
header extends javax/accessibility/AccessibleContext implements javax/accessibility/Accessible,javax/accessibility/AccessibleComponent,javax/accessibility/AccessibleAction flags 21
innerclass innerClass javax/swing/JList$AccessibleJList outerClass javax/swing/JList innerClassName AccessibleJList flags 4
innerclass innerClass javax/swing/JList$AccessibleJList$AccessibleJListChild outerClass javax/swing/JList$AccessibleJList innerClassName AccessibleJListChild flags 4
method name getAccessibleAction descriptor ()Ljavax/accessibility/AccessibleAction; flags 1
method name doAccessibleAction descriptor (I)Z flags 1
method name getAccessibleActionDescription descriptor (I)Ljava/lang/String; flags 1
method name getAccessibleActionCount descriptor ()I flags 1
@ -3907,7 +3907,6 @@ innerclass innerClass javax/swing/JViewport$AccessibleJViewport outerClass javax
innerclass innerClass javax/swing/JViewport$ViewListener outerClass javax/swing/JViewport innerClassName ViewListener flags 4
innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19
-method name setUI descriptor (Ljavax/swing/plaf/ViewportUI;)V
-method name addNotify descriptor ()V
-method name getInsets descriptor (Ljava/awt/Insets;)Ljava/awt/Insets;
-method name setScrollMode descriptor (I)V
method name setUI descriptor (Ljavax/swing/plaf/ViewportUI;)V flags 1 runtimeAnnotations @Ljava/beans/BeanProperty;(hidden=Ztrue,visualUpdate=Ztrue,description="The\u005C;u0020;UI\u005C;u0020;object\u005C;u0020;that\u005C;u0020;implements\u005C;u0020;the\u005C;u0020;Component's\u005C;u0020;LookAndFeel.")
@ -4402,8 +4401,6 @@ innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang
class name javax/swing/plaf/basic/BasicRadioButtonUI
header extends javax/swing/plaf/basic/BasicToggleButtonUI flags 21
innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19
method name installListeners descriptor (Ljavax/swing/AbstractButton;)V flags 4
method name uninstallListeners descriptor (Ljavax/swing/AbstractButton;)V flags 4
class name javax/swing/plaf/basic/BasicScrollBarUI
header extends javax/swing/plaf/ScrollBarUI implements java/awt/LayoutManager,javax/swing/SwingConstants flags 21

View File

@ -27,7 +27,7 @@
# ##########################################################
#
#command used to generate this file:
#build.tools.symbolgenerator.CreateSymbols build-description-incremental symbols include.list
#build.tools.symbolgenerator.CreateSymbols build-description-incremental-file symbols include.list 8 jdk8-updated.classes <none> --normalize-method-flags
#
generate platforms 7:8:9:A:B:C:D:E:F
platform version 8 files java.activation-8.sym.txt:java.base-8.sym.txt:java.compiler-8.sym.txt:java.corba-8.sym.txt:java.datatransfer-8.sym.txt:java.desktop-8.sym.txt:java.instrument-8.sym.txt:java.logging-8.sym.txt:java.management-8.sym.txt:java.management.rmi-8.sym.txt:java.naming-8.sym.txt:java.prefs-8.sym.txt:java.rmi-8.sym.txt:java.scripting-8.sym.txt:java.security.jgss-8.sym.txt:java.security.sasl-8.sym.txt:java.sql-8.sym.txt:java.sql.rowset-8.sym.txt:java.transaction-8.sym.txt:java.xml-8.sym.txt:java.xml.bind-8.sym.txt:java.xml.crypto-8.sym.txt:java.xml.ws-8.sym.txt:java.xml.ws.annotation-8.sym.txt:jdk.httpserver-8.sym.txt:jdk.management-8.sym.txt:jdk.scripting.nashorn-8.sym.txt:jdk.sctp-8.sym.txt:jdk.security.auth-8.sym.txt:jdk.security.jgss-8.sym.txt

View File

@ -31,6 +31,7 @@ import build.tools.symbolgenerator.CreateSymbols
import build.tools.symbolgenerator.CreateSymbols
.ModuleHeaderDescription
.RequiresDescription;
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.BufferedOutputStream;
@ -43,6 +44,7 @@ import java.io.InputStream;
import java.io.OutputStream;
import java.io.StringWriter;
import java.io.Writer;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.FileVisitResult;
import java.nio.file.FileVisitor;
@ -220,7 +222,7 @@ public class CreateSymbols {
long timestamp, String currentVersion, String systemModules) throws IOException {
LoadDescriptions data = load(ctDescriptionFileExtra != null ? Paths.get(ctDescriptionFileExtra)
: null,
Paths.get(ctDescriptionFile), null);
Paths.get(ctDescriptionFile));
splitHeaders(data.classes);
@ -303,7 +305,7 @@ public class CreateSymbols {
public static String EXTENSION = ".sig";
LoadDescriptions load(Path ctDescriptionWithExtraContent, Path ctDescriptionOpen, String deletePlatform) throws IOException {
LoadDescriptions load(Path ctDescriptionWithExtraContent, Path ctDescriptionOpen) throws IOException {
Map<String, PlatformInput> platforms = new LinkedHashMap<>();
if (ctDescriptionWithExtraContent != null && Files.isRegularFile(ctDescriptionWithExtraContent)) {
@ -317,8 +319,7 @@ public class CreateSymbols {
case "platform":
PlatformInput platform = PlatformInput.load(ctDescriptionWithExtraContent,
reader);
if (!platform.version.equals(deletePlatform))
platforms.put(platform.version, platform);
platforms.put(platform.version, platform);
reader.moveNext();
break;
default:
@ -336,13 +337,11 @@ public class CreateSymbols {
case "generate":
String[] platformsAttr = reader.attributes.get("platforms").split(":");
generatePlatforms = new HashSet<>(List.of(platformsAttr));
generatePlatforms.remove(deletePlatform);
reader.moveNext();
break;
case "platform":
PlatformInput platform = PlatformInput.load(ctDescriptionOpen, reader);
if (!platform.version.equals(deletePlatform) &&
!platforms.containsKey(platform.version))
if (!platforms.containsKey(platform.version))
platforms.put(platform.version, platform);
reader.moveNext();
break;
@ -408,18 +407,28 @@ public class CreateSymbols {
ClassList result = new ClassList();
for (ClassDescription desc : classes.values()) {
classes.values().forEach(result::add);
return new LoadDescriptions(result,
modules,
new ArrayList<>(platforms.values()));
}
private static void removeVersion(LoadDescriptions load, String deletePlatform) {
for (Iterator<ClassDescription> it = load.classes.iterator(); it.hasNext();) {
ClassDescription desc = it.next();
Iterator<ClassHeaderDescription> chdIt = desc.header.iterator();
while (chdIt.hasNext()) {
ClassHeaderDescription chd = chdIt.next();
chd.versions = reduce(chd.versions, generatePlatforms);
if (chd.versions.isEmpty())
chd.versions = removeVersion(chd.versions, deletePlatform);
if (chd.versions.isEmpty()) {
chdIt.remove();
}
}
if (desc.header.isEmpty()) {
it.remove();
continue;
}
@ -428,7 +437,7 @@ public class CreateSymbols {
while (methodIt.hasNext()) {
MethodDescription method = methodIt.next();
method.versions = reduce(method.versions, generatePlatforms);
method.versions = removeVersion(method.versions, deletePlatform);
if (method.versions.isEmpty())
methodIt.remove();
}
@ -438,37 +447,29 @@ public class CreateSymbols {
while (fieldIt.hasNext()) {
FieldDescription field = fieldIt.next();
field.versions = reduce(field.versions, generatePlatforms);
field.versions = removeVersion(field.versions, deletePlatform);
if (field.versions.isEmpty())
fieldIt.remove();
}
result.add(desc);
}
Map<String, ModuleDescription> moduleList = new HashMap<>();
for (ModuleDescription desc : modules.values()) {
for (Iterator<ModuleDescription> it = load.modules.values().iterator(); it.hasNext();) {
ModuleDescription desc = it.next();
Iterator<ModuleHeaderDescription> mhdIt = desc.header.iterator();
while (mhdIt.hasNext()) {
ModuleHeaderDescription mhd = mhdIt.next();
mhd.versions = reduce(mhd.versions, generatePlatforms);
mhd.versions = removeVersion(mhd.versions, deletePlatform);
if (mhd.versions.isEmpty())
mhdIt.remove();
}
if (desc.header.isEmpty()) {
it.remove();
continue;
}
moduleList.put(desc.name, desc);
}
return new LoadDescriptions(result,
moduleList,
new ArrayList<>(platforms.values()));
}
static final class LoadDescriptions {
@ -550,6 +551,17 @@ public class CreateSymbols {
return sb.toString();
}
private static String removeVersion(String original, String remove) {
StringBuilder sb = new StringBuilder();
for (char v : original.toCharArray()) {
if (v != remove.charAt(0)) {
sb.append(v);
}
}
return sb.toString();
}
private static class PlatformInput {
public final String version;
public final String basePlatform;
@ -1271,24 +1283,9 @@ public class CreateSymbols {
Map<String, ModuleDescription> modules = new HashMap<>();
for (VersionDescription desc : versions) {
List<byte[]> classFileData = new ArrayList<>();
Iterable<byte[]> classFileData = loadClassData(desc.classes);
try (BufferedReader descIn =
Files.newBufferedReader(Paths.get(desc.classes))) {
String line;
while ((line = descIn.readLine()) != null) {
ByteArrayOutputStream data = new ByteArrayOutputStream();
for (int i = 0; i < line.length(); i += 2) {
String hex = line.substring(i, i + 2);
data.write(Integer.parseInt(hex, 16));
}
classFileData.add(data.toByteArray());
}
} catch (IOException ex) {
throw new IllegalStateException(ex);
}
loadVersionClasses(classes, modules, classFileData, excludesIncludes, desc.version);
loadVersionClasses(classes, modules, classFileData, excludesIncludes, desc.version, null);
}
List<PlatformInput> platforms =
@ -1299,7 +1296,7 @@ public class CreateSymbols {
null))
.collect(Collectors.toList());
dumpDescriptions(classes, modules, platforms, descDest.resolve("symbols"), args);
dumpDescriptions(classes, modules, platforms, Set.of(), descDest.resolve("symbols"), args);
}
//where:
private static final String DO_NO_MODIFY =
@ -1332,11 +1329,33 @@ public class CreateSymbols {
"# ##########################################################\n" +
"#\n";
private Iterable<byte[]> loadClassData(String path) {
List<byte[]> classFileData = new ArrayList<>();
try (BufferedReader descIn =
Files.newBufferedReader(Paths.get(path))) {
String line;
while ((line = descIn.readLine()) != null) {
ByteArrayOutputStream data = new ByteArrayOutputStream();
for (int i = 0; i < line.length(); i += 2) {
String hex = line.substring(i, i + 2);
data.write(Integer.parseInt(hex, 16));
}
classFileData.add(data.toByteArray());
}
} catch (IOException ex) {
throw new IllegalStateException(ex);
}
return classFileData;
}
private void loadVersionClasses(ClassList classes,
Map<String, ModuleDescription> modules,
Iterable<byte[]> classData,
ExcludeIncludeList excludesIncludes,
String version) {
String version,
String baseline) {
Map<String, ModuleDescription> currentVersionModules =
new HashMap<>();
@ -1460,12 +1479,12 @@ public class CreateSymbols {
ClassDescription existing = classes.find(clazz.name, true);
if (existing != null) {
addClassHeader(existing, header, version);
addClassHeader(existing, header, version, baseline);
for (MethodDescription currentMethod : clazz.methods) {
addMethod(existing, currentMethod, version);
addMethod(existing, currentMethod, version, baseline);
}
for (FieldDescription currentField : clazz.fields) {
addField(existing, currentField, version);
addField(existing, currentField, version, baseline);
}
} else {
classes.add(clazz);
@ -1502,6 +1521,7 @@ public class CreateSymbols {
private void dumpDescriptions(ClassList classes,
Map<String, ModuleDescription> modules,
List<PlatformInput> versions,
Set<String> forceWriteVersions,
Path ctDescriptionFile,
String[] args) throws IOException {
classes.sort();
@ -1568,7 +1588,7 @@ public class CreateSymbols {
for (PlatformInput desc : versions) {
List<String> files = desc.files;
if (files == null) {
if (files == null || forceWriteVersions.contains(desc.version)) {
files = new ArrayList<>();
for (Entry<String, List<ClassDescription>> e : module2Classes.entrySet()) {
StringWriter data = new StringWriter();
@ -1586,9 +1606,34 @@ public class CreateSymbols {
String dataString = data.toString();
if (!dataString.isEmpty()) {
try (Writer out = Files.newBufferedWriter(f)) {
out.append(DO_NO_MODIFY.replace("{YEAR}", String.valueOf(year)));
out.write(dataString);
String existingYear = null;
boolean hasChange = true;
if (Files.isReadable(f)) {
String oldContent = Files.readString(f, StandardCharsets.UTF_8);
int yearPos = DO_NO_MODIFY.indexOf("{YEAR}");
String headerPattern =
Pattern.quote(DO_NO_MODIFY.substring(0, yearPos)) +
"([0-9]+)(, [0-9]+)?" +
Pattern.quote(DO_NO_MODIFY.substring(yearPos + "{YEAR}".length()));
String pattern = headerPattern +
Pattern.quote(dataString);
Matcher m = Pattern.compile(pattern, Pattern.MULTILINE).matcher(oldContent);
if (m.matches()) {
hasChange = false;
} else {
m = Pattern.compile(headerPattern).matcher(oldContent);
if (m.find()) {
existingYear = m.group(1);
}
}
}
if (hasChange) {
try (Writer out = Files.newBufferedWriter(f, StandardCharsets.UTF_8)) {
String currentYear = String.valueOf(year);
String yearSpec = (existingYear != null && !currentYear.equals(existingYear) ? existingYear + ", " : "") + currentYear;
out.append(DO_NO_MODIFY.replace("{YEAR}", yearSpec));
out.write(dataString);
}
}
files.add(f.getFileName().toString());
}
@ -1630,15 +1675,17 @@ public class CreateSymbols {
}
}
public void createIncrementalBaseLine(String ctDescriptionFile,
String excludeFile,
String[] args) throws IOException {
String specVersion = System.getProperty("java.specification.version");
private void incrementalUpdate(String ctDescriptionFile,
String excludeFile,
String platformVersion,
Iterable<byte[]> classBytes,
Function<LoadDescriptions, String> baseline,
String[] args) throws IOException {
String currentVersion =
Integer.toString(Integer.parseInt(specVersion), Character.MAX_RADIX);
currentVersion = currentVersion.toUpperCase(Locale.ROOT);
Integer.toString(Integer.parseInt(platformVersion), Character.MAX_RADIX);
String version = currentVersion.toUpperCase(Locale.ROOT);
Path ctDescriptionPath = Paths.get(ctDescriptionFile).toAbsolutePath();
LoadDescriptions data = load(null, ctDescriptionPath, currentVersion);
LoadDescriptions data = load(null, ctDescriptionPath);
ClassList classes = data.classes;
Map<String, ModuleDescription> modules = data.modules;
@ -1647,23 +1694,70 @@ public class CreateSymbols {
ExcludeIncludeList excludeList =
ExcludeIncludeList.create(excludeFile);
Iterable<byte[]> classBytes = dumpCurrentClasses();
loadVersionClasses(classes, modules, classBytes, excludeList, currentVersion);
loadVersionClasses(classes, modules, classBytes, excludeList, "$", version);
String baseline;
removeVersion(data, version);
if (versions.isEmpty()) {
baseline = null;
} else {
baseline = versions.stream()
.sorted((v1, v2) -> v2.version.compareTo(v1.version))
.findFirst()
.get()
.version;
for (ModuleDescription md : data.modules.values()) {
for (ModuleHeaderDescription header : md.header) {
header.versions = header.versions.replace("$", version);
}
}
versions.add(new PlatformInput(null, currentVersion, baseline, null));
dumpDescriptions(classes, modules, versions, ctDescriptionPath, args);
for (ClassDescription clazzDesc : data.classes) {
for (ClassHeaderDescription header : clazzDesc.header) {
header.versions = header.versions.replace("$", version);
}
for (MethodDescription method : clazzDesc.methods) {
method.versions = method.versions.replace("$", version);
}
for (FieldDescription field : clazzDesc.fields) {
field.versions = field.versions.replace("$", version);
}
}
if (versions.stream().noneMatch(inp -> version.equals(inp.version))) {
versions.add(new PlatformInput(null, version, baseline.apply(data), null));
}
Set<String> writeVersions = new HashSet<>();
writeVersions.add(version);
//re-write all platforms that have version as their basline:
versions.stream()
.filter(inp -> version.equals(inp.basePlatform))
.map(inp -> inp.version)
.forEach(writeVersions::add);
dumpDescriptions(classes, modules, versions, writeVersions, ctDescriptionPath, args);
}
public void createIncrementalBaseLineFromDataFile(String ctDescriptionFile,
String excludeFile,
String version,
String dataFile,
String baseline,
String[] args) throws IOException {
incrementalUpdate(ctDescriptionFile, excludeFile, version, loadClassData(dataFile), x -> baseline, args);
}
public void createIncrementalBaseLine(String ctDescriptionFile,
String excludeFile,
String[] args) throws IOException {
String specVersion = System.getProperty("java.specification.version");
Iterable<byte[]> classBytes = dumpCurrentClasses();
Function<LoadDescriptions, String> baseline = data -> {
if (data.versions.isEmpty()) {
return null;
} else {
return data.versions.stream()
.sorted((v1, v2) -> v2.version.compareTo(v1.version))
.findFirst()
.get()
.version;
}
};
incrementalUpdate(ctDescriptionFile, excludeFile, specVersion, classBytes, baseline, args);
}
private List<byte[]> dumpCurrentClasses() throws IOException {
@ -1757,7 +1851,7 @@ public class CreateSymbols {
classes.add(clazzDesc);
}
addClassHeader(clazzDesc, headerDesc, version);
addClassHeader(clazzDesc, headerDesc, version, null);
for (Method m : cf.methods) {
if (!include(m.access_flags.flags))
@ -1769,7 +1863,7 @@ public class CreateSymbols {
for (Attribute attr : m.attributes) {
readAttribute(cf, methDesc, attr);
}
addMethod(clazzDesc, methDesc, version);
addMethod(clazzDesc, methDesc, version, null);
}
for (Field f : cf.fields) {
if (!include(f.access_flags.flags))
@ -1781,7 +1875,7 @@ public class CreateSymbols {
for (Attribute attr : f.attributes) {
readAttribute(cf, fieldDesc, attr);
}
addField(clazzDesc, fieldDesc, version);
addField(clazzDesc, fieldDesc, version, null);
}
}
@ -1840,11 +1934,11 @@ public class CreateSymbols {
return (accessFlags & (AccessFlags.ACC_PUBLIC | AccessFlags.ACC_PROTECTED)) != 0;
}
private void addClassHeader(ClassDescription clazzDesc, ClassHeaderDescription headerDesc, String version) {
private void addClassHeader(ClassDescription clazzDesc, ClassHeaderDescription headerDesc, String version, String baseline) {
//normalize:
boolean existed = false;
for (ClassHeaderDescription existing : clazzDesc.header) {
if (existing.equals(headerDesc)) {
if (existing.equals(headerDesc) && (!existed || (baseline != null && existing.versions.contains(baseline)))) {
headerDesc = existing;
existed = true;
}
@ -1880,14 +1974,13 @@ public class CreateSymbols {
}
}
private void addMethod(ClassDescription clazzDesc, MethodDescription methDesc, String version) {
private void addMethod(ClassDescription clazzDesc, MethodDescription methDesc, String version, String baseline) {
//normalize:
boolean methodExisted = false;
for (MethodDescription existing : clazzDesc.methods) {
if (existing.equals(methDesc)) {
if (existing.equals(methDesc) && (!methodExisted || (baseline != null && existing.versions.contains(baseline)))) {
methodExisted = true;
methDesc = existing;
break;
}
}
methDesc.versions += version;
@ -1896,13 +1989,12 @@ public class CreateSymbols {
}
}
private void addField(ClassDescription clazzDesc, FieldDescription fieldDesc, String version) {
private void addField(ClassDescription clazzDesc, FieldDescription fieldDesc, String version, String baseline) {
boolean fieldExisted = false;
for (FieldDescription existing : clazzDesc.fields) {
if (existing.equals(fieldDesc)) {
if (existing.equals(fieldDesc) && (!fieldExisted || (baseline != null && existing.versions.contains(baseline)))) {
fieldExisted = true;
fieldDesc = existing;
break;
}
}
fieldDesc.versions += version;
@ -2311,6 +2403,7 @@ public class CreateSymbols {
}
static abstract class FeatureDescription {
int flagsNormalization = ~0;
int flags;
boolean deprecated;
String signature;
@ -2375,7 +2468,7 @@ public class CreateSymbols {
@Override
public int hashCode() {
int hash = 3;
hash = 89 * hash + this.flags;
hash = 89 * hash + (this.flags & flagsNormalization);
hash = 89 * hash + (this.deprecated ? 1 : 0);
hash = 89 * hash + Objects.hashCode(this.signature);
hash = 89 * hash + listHashCode(this.classAnnotations);
@ -2392,7 +2485,7 @@ public class CreateSymbols {
return false;
}
final FeatureDescription other = (FeatureDescription) obj;
if (this.flags != other.flags) {
if ((this.flags & flagsNormalization) != (other.flags & flagsNormalization)) {
return false;
}
if (this.deprecated != other.deprecated) {
@ -3044,6 +3137,7 @@ public class CreateSymbols {
}
static class MethodDescription extends FeatureDescription {
static int METHODS_FLAGS_NORMALIZATION = ~0;
String name;
String descriptor;
List<String> thrownTypes;
@ -3051,6 +3145,10 @@ public class CreateSymbols {
List<List<AnnotationDescription>> classParameterAnnotations;
List<List<AnnotationDescription>> runtimeParameterAnnotations;
public MethodDescription() {
flagsNormalization = METHODS_FLAGS_NORMALIZATION;
}
@Override
public int hashCode() {
int hash = super.hashCode();
@ -3775,6 +3873,24 @@ public class CreateSymbols {
args);
break;
}
case "build-description-incremental-file": {
if (args.length != 6 && args.length != 7) {
help();
return ;
}
if (args.length == 7) {
if ("--normalize-method-flags".equals(args[6])) {
MethodDescription.METHODS_FLAGS_NORMALIZATION = ~(0x100 | 0x20);
} else {
help();
return ;
}
}
new CreateSymbols().createIncrementalBaseLineFromDataFile(args[1], args[2], args[3], args[4], "<none>".equals(args[5]) ? null : args[5], args);
break;
}
case "build-description-incremental": {
if (args.length != 3) {
help();

View File

@ -90,12 +90,6 @@ bool Jfr::is_excluded(Thread* t) {
return t != NULL && t->jfr_thread_local()->is_excluded();
}
void Jfr::on_java_thread_dismantle(JavaThread* jt) {
if (JfrRecorder::is_recording()) {
JfrCheckpointManager::write_thread_checkpoint(jt);
}
}
void Jfr::on_vm_shutdown(bool exception_handler) {
if (JfrRecorder::is_recording()) {
JfrEmergencyDump::on_vm_shutdown(exception_handler);

View File

@ -49,7 +49,6 @@ class Jfr : AllStatic {
static void on_unloading_classes();
static void on_thread_start(Thread* thread);
static void on_thread_exit(Thread* thread);
static void on_java_thread_dismantle(JavaThread* jt);
static void on_vm_shutdown(bool exception_handler = false);
static bool on_flight_recorder_option(const JavaVMOption** option, char* delimiter);
static bool on_start_flight_recording_option(const JavaVMOption** option, char* delimiter);

View File

@ -108,7 +108,7 @@ void JfrCheckpointThreadClosure::do_thread(Thread* t) {
void JfrThreadConstantSet::serialize(JfrCheckpointWriter& writer) {
JfrCheckpointThreadClosure tc(writer);
JfrJavaThreadIterator javathreads;
JfrJavaThreadIterator javathreads(false); // include not yet live threads (_thread_new)
while (javathreads.has_next()) {
tc.do_thread(javathreads.next());
}

View File

@ -400,8 +400,8 @@ static RecorderState recorder_state = STOPPED;
static void set_recorder_state(RecorderState from, RecorderState to) {
assert(from == recorder_state, "invariant");
OrderAccess::storestore();
recorder_state = to;
OrderAccess::fence();
}
static void start_recorder() {
@ -417,18 +417,16 @@ static void stop_recorder() {
}
bool JfrRecorderService::is_recording() {
const bool is_running = recorder_state == RUNNING;
OrderAccess::loadload();
return is_running;
return recorder_state == RUNNING;
}
void JfrRecorderService::start() {
JfrRotationLock lock;
assert(!is_recording(), "invariant");
clear();
open_new_chunk();
start_recorder();
assert(is_recording(), "invariant");
open_new_chunk();
}
static void stop() {

View File

@ -92,8 +92,8 @@ void JfrThreadLocal::on_start(Thread* t) {
assert(Thread::current() == t, "invariant");
JfrJavaSupport::on_thread_start(t);
if (JfrRecorder::is_recording()) {
JfrCheckpointManager::write_thread_checkpoint(t);
if (!t->jfr_thread_local()->is_excluded()) {
JfrCheckpointManager::write_thread_checkpoint(t);
if (t->is_Java_thread()) {
send_java_thread_start_event((JavaThread*)t);
}

View File

@ -32,14 +32,17 @@ static bool thread_inclusion_predicate(Thread* t) {
return !t->jfr_thread_local()->is_dead();
}
static bool java_thread_inclusion_predicate(JavaThread* jt) {
static bool java_thread_inclusion_predicate(JavaThread* jt, bool live_only) {
assert(jt != NULL, "invariant");
return thread_inclusion_predicate(jt) && jt->thread_state() != _thread_new;
if (live_only && jt->thread_state() == _thread_new) {
return false;
}
return thread_inclusion_predicate(jt);
}
static JavaThread* next_java_thread(JavaThreadIteratorWithHandle& iter) {
static JavaThread* next_java_thread(JavaThreadIteratorWithHandle& iter, bool live_only) {
JavaThread* next = iter.next();
while (next != NULL && !java_thread_inclusion_predicate(next)) {
while (next != NULL && !java_thread_inclusion_predicate(next, live_only)) {
next = iter.next();
}
return next;
@ -57,17 +60,19 @@ static NonJavaThread* next_non_java_thread(NonJavaThread::Iterator& iter) {
return NULL;
}
JfrJavaThreadIteratorAdapter::JfrJavaThreadIteratorAdapter() : _iter(), _next(next_java_thread(_iter)) {}
JfrJavaThreadIteratorAdapter::JfrJavaThreadIteratorAdapter(bool live_only /* true */) : _iter(),
_next(next_java_thread(_iter, live_only)),
_live_only(live_only) {}
JavaThread* JfrJavaThreadIteratorAdapter::next() {
assert(has_next(), "invariant");
Type* const temp = _next;
_next = next_java_thread(_iter);
_next = next_java_thread(_iter, _live_only);
assert(temp != _next, "invariant");
return temp;
}
JfrNonJavaThreadIteratorAdapter::JfrNonJavaThreadIteratorAdapter() : _iter(), _next(next_non_java_thread(_iter)) {}
JfrNonJavaThreadIteratorAdapter::JfrNonJavaThreadIteratorAdapter(bool live_only /* true */) : _iter(), _next(next_non_java_thread(_iter)) {}
bool JfrNonJavaThreadIteratorAdapter::has_next() const {
return _next != NULL;

View File

@ -34,7 +34,7 @@ class JfrThreadIterator : public AP {
private:
Adapter _adapter;
public:
JfrThreadIterator() : _adapter() {}
JfrThreadIterator(bool live_only = true) : _adapter(live_only) {}
typename Adapter::Type* next() {
assert(has_next(), "invariant");
return _adapter.next();
@ -48,9 +48,10 @@ class JfrJavaThreadIteratorAdapter {
private:
JavaThreadIteratorWithHandle _iter;
JavaThread* _next;
bool _live_only;
public:
typedef JavaThread Type;
JfrJavaThreadIteratorAdapter();
JfrJavaThreadIteratorAdapter(bool live_only = true);
bool has_next() const {
return _next != NULL;
}
@ -63,7 +64,7 @@ class JfrNonJavaThreadIteratorAdapter {
NonJavaThread* _next;
public:
typedef NonJavaThread Type;
JfrNonJavaThreadIteratorAdapter();
JfrNonJavaThreadIteratorAdapter(bool live_only = true);
bool has_next() const;
Type* next();
};

View File

@ -95,9 +95,11 @@
#if INCLUDE_CDS
#include "classfile/systemDictionaryShared.hpp"
#endif
#if INCLUDE_JFR
#include "jfr/jfr.hpp"
#endif
#include <errno.h>
#include <jfr/recorder/jfrRecorder.hpp>
/*
NOTE about use of any ctor or function call that can trigger a safepoint/GC:
@ -3071,7 +3073,7 @@ JVM_ENTRY(void, JVM_StartThread(JNIEnv* env, jobject jthread))
}
#if INCLUDE_JFR
if (JfrRecorder::is_recording() && EventThreadStart::is_enabled() &&
if (Jfr::is_recording() && EventThreadStart::is_enabled() &&
EventThreadStart::is_stacktrace_enabled()) {
JfrThreadLocal* tl = native_thread->jfr_thread_local();
// skip Thread.start() and Thread.start0()

View File

@ -2045,7 +2045,6 @@ void JavaThread::exit(bool destroy_vm, ExitType exit_type) {
CLEAR_PENDING_EXCEPTION;
}
}
JFR_ONLY(Jfr::on_java_thread_dismantle(this);)
// Call Thread.exit(). We try 3 times in case we got another Thread.stop during
// the execution of the method. If that is not enough, then we don't really care. Thread.stop

View File

@ -41,8 +41,8 @@
* <p>
* StAX supports plugability with {@link XMLInputFactory} and
* {@link XMLOutputFactory} that define how an implementation is
* located through a process as described in the {@link newFactory}
* method.
* located through a process as described in the {@code newFactory}
* methods.
*
*
* @since 1.6

View File

@ -27,7 +27,6 @@
* Provides the interfaces for the Simple API for XML (SAX). Supports both
* the SAX1 and SAX2 APIs.
*
* <p>
* <h2> SAX2 Standard Feature Flags </h2>
*
* <p>

View File

@ -24,11 +24,10 @@
/*
* @test
* @key stress
* @key stress randomness
*
* @summary converted from VM testbase nsk/stress/jni/gclocker/gcl001.
* VM testbase keywords: [stress, quick, feature_283, nonconcurrent, exclude]
* VM testbase comments: 8208207
* VM testbase keywords: [stress, quick, feature_283, nonconcurrent]
* VM testbase readme:
* DESCRIPTION
* Check compatibility of GC Locker improvements with JNI CS
@ -37,9 +36,8 @@
* 1. Create primitive array and string with random data
* 2. Pass it to native method
* 3. Sort/Hash data in JNI CS mixing string and array critical sections
* 4. Check isCopy == false
* 5. Return from native
* 6. Check data to be processed correctly
* 4. Return from native
* 5. Check data to be processed correctly
* B) Create M ' Garbage producer/memory allocation' threads. Each of them will:
* 1. Allocate memory blocks and make them garbage.
* 2. Check for OOM errors.
@ -47,7 +45,6 @@
* @library /vmTestbase
* /test/lib
* @run driver jdk.test.lib.FileInstaller . .
* @ignore 8208207
* @run main/othervm/native/timeout=480
* -XX:-UseGCOverheadLimit
* nsk.stress.jni.gclocker.gcl001
@ -228,6 +225,7 @@ public class gcl001 extends ThreadedGCTest {
for (int i = 0; i < str.length(); ++i) {
javaHash += (int) str.charAt(i);
}
javaHash += javaHash;
check(array[0] == false && array[array.length - 1] == true
&& javaHash == nativeHash, "Data validation failure");
@ -261,7 +259,7 @@ public class gcl001 extends ThreadedGCTest {
for (int i = 0; i < str.length(); ++i) {
javaHash += (int) str.charAt(i);
}
javaHash += javaHash;
check(array[0] == min && array[array.length - 1] == max
&& javaHash == nativeHash, "Data validation failure");
@ -296,7 +294,7 @@ public class gcl001 extends ThreadedGCTest {
for (int i = 0; i < str.length(); ++i) {
javaHash += (int) str.charAt(i);
}
javaHash += javaHash;
check(array[0] == min && array[array.length - 1] == max
&& javaHash == nativeHash, "Data validation failure");
@ -331,7 +329,7 @@ public class gcl001 extends ThreadedGCTest {
for (int i = 0; i < str.length(); ++i) {
javaHash += (int) str.charAt(i);
}
javaHash += javaHash;
check(array[0] == min && array[array.length - 1] == max
&& javaHash == nativeHash, "Data validation failure");
}
@ -364,7 +362,7 @@ public class gcl001 extends ThreadedGCTest {
for (int i = 0; i < str.length(); ++i) {
javaHash += (int) str.charAt(i);
}
javaHash += javaHash;
check(array[0] == min && array[array.length - 1] == max
&& javaHash == nativeHash, "Data validation failure");
@ -399,7 +397,7 @@ public class gcl001 extends ThreadedGCTest {
for (int i = 0; i < str.length(); ++i) {
javaHash += (int) str.charAt(i);
}
javaHash += javaHash;
check(array[0] == min && array[array.length - 1] == max
&& javaHash == nativeHash, "Data validation failure");
@ -434,7 +432,7 @@ public class gcl001 extends ThreadedGCTest {
for (int i = 0; i < str.length(); ++i) {
javaHash += (int) str.charAt(i);
}
javaHash += javaHash;
check(array[0] == min && array[array.length - 1] == max
&& javaHash == nativeHash, "Data validation failure");
}
@ -468,7 +466,7 @@ public class gcl001 extends ThreadedGCTest {
for (int i = 0; i < str.length(); ++i) {
javaHash += (int) str.charAt(i);
}
javaHash += javaHash;
check(array[0] == min && array[array.length - 1] == max
&& javaHash == nativeHash, "Data validation failure");
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2020, 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
@ -20,87 +20,60 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#include <jni.h>
#include <stdlib.h>
#include "jnihelper.h"
extern "C" {
/*
basic routine: provide critical sections and calculations
enter array CS
enter first string CS
leave first string CS
enter second string CS
leave array CS
leave second string CS
*/
#define BODY(type) \
int hash = 0; \
jsize i, arraySize, stringSize; \
jchar *nativeStr = NULL; \
type *nativeArray = NULL; \
\
arraySize = env->GetArrayLength(array); CE \
stringSize = env->GetStringLength(str); CE \
\
nativeArray = (type *)env->GetPrimitiveArrayCritical(array, NULL); CE \
qsort(nativeArray, arraySize, sizeof(type), *type##comp); \
\
nativeStr = (jchar *)env->GetStringCritical(str, NULL); CE \
\
for (i = 0; i < stringSize; ++i) \
hash += (int)nativeStr[i]; \
env->ReleaseStringCritical(str, nativeStr); CE \
\
nativeStr = (jchar *)env->GetStringCritical(str, NULL); CE \
\
env->ReleasePrimitiveArrayCritical(array, nativeArray, 0); CE \
\
for (i = 0; i < stringSize; ++i) \
hash += (int)nativeStr[i]; \
env->ReleaseStringCritical(str, nativeStr); CE \
\
return hash;
// compare most java primitive value types
#define COMP(type) \
int type##comp(const void *s1, const void *s2)\
{\
type st1 = *((type *)s1);\
type st2 = *((type *)s2);\
if (st1 < st2)\
return -1;\
else if (st1 > st2)\
return 1;\
else\
return 0;\
}
// basic routine: provide critical sections and calculations
// enter array CS
// check isCopy for native referencing
// enter first string CS
// leave first string CS
// enter second string CS
// leave array CS
// enter second string CS
#define BODY(type) \
int hash = 0; int i; jboolean isCopy = JNI_FALSE; jchar *nativeStr; jsize size; type *nativeArray; \
size = env->GetArrayLength(array); CE \
nativeArray = (type *)env->GetPrimitiveArrayCritical(array, &isCopy); CE \
EnterCS(env); \
if (isCopy == JNI_TRUE) return 0;\
qsort(nativeArray, size, sizeof(type), *type##comp);\
\
size = env->GetStringLength(str); CE \
nativeStr = (jchar *)env->GetStringCritical(str, &isCopy); CE \
if (isCopy == JNI_TRUE) return 0;\
for (i = 0; i < size; ++i)\
hash += (int)nativeStr[i];\
\
env->ReleasePrimitiveArrayCritical(array, nativeArray, 0); CE \
LeaveCS(env); \
env->ReleaseStringCritical(str, nativeStr); CE \
\
hash = 0;\
size = env->GetStringLength(str); CE \
nativeStr = (jchar *)env->GetStringCritical(str, &isCopy); CE \
EnterCS(env); \
if (isCopy == JNI_TRUE) return 0;\
for (i = 0; i < size; ++i)\
hash += (int)nativeStr[i];\
LeaveCS(env); \
env->ReleaseStringCritical(str, nativeStr); CE \
return hash;
static int CSEntered = 0;
static int CSLeft = 0;
void EnterCS(JNIEnv *env)
{
// unsafe but where are no better ideas
//++CSEntered;
//printf("CS Entered -> Entered: %d\n", CSEntered);
// jclass trace = 0; jmethodID method = 0;
// trace = env->FindClass("nsk/stress/jni/gclocker/Trace"); CE
// method = env->GetStaticMethodID(trace, "EnterCS", "()V"); CE
// env->CallStaticVoidMethod(trace, method); CE
}
void LeaveCS(JNIEnv *env)
{
// unsafe but where are no better ideas
//++CSLeft;
//printf("CS Left -> Completed: %d\tActive: %d\n", CSLeft, CSEntered - CSLeft);
// jclass trace = 0; jmethodID method = 0;
// trace = env->FindClass("nsk/stress/jni/gclocker/Trace"); CE
// method = env->GetStaticMethodID(trace, "LeaveCS", "()V"); CE
// env->CallStaticVoidMethod(trace, method); CE
#define COMP(type) \
int type##comp(const void *s1, const void *s2) \
{ \
type st1 = *((type *)s1); \
type st2 = *((type *)s2); \
if (st1 < st2) \
return -1; \
else if (st1 > st2) \
return 1; \
else \
return 0; \
}
COMP(jint)
@ -112,6 +85,8 @@ COMP(jdouble)
COMP(jfloat)
COMP(jlong)
extern "C" {
/*
* Class: JNIWorker
* Method: NativeCall

View File

@ -134,10 +134,10 @@ public class ElementStructureTest {
(byte) 0x90, (byte) 0xFA, (byte) 0x98, (byte) 0xCD
};
static final byte[] hash8 = new byte[] {
(byte) 0x0B, (byte) 0xEB, (byte) 0x16, (byte) 0xF5,
(byte) 0x7F, (byte) 0xB0, (byte) 0x18, (byte) 0xF1,
(byte) 0x78, (byte) 0x11, (byte) 0xED, (byte) 0x30,
(byte) 0x19, (byte) 0x4D, (byte) 0xDE, (byte) 0x8A
(byte) 0x24, (byte) 0x38, (byte) 0x52, (byte) 0x1C,
(byte) 0x5E, (byte) 0x83, (byte) 0x82, (byte) 0xE6,
(byte) 0x41, (byte) 0xC2, (byte) 0xDD, (byte) 0x2A,
(byte) 0xFD, (byte) 0xFF, (byte) 0x5E, (byte) 0x2F
};
final static Map<String, byte[]> version2Hash = new HashMap<>();