Re: RFR: 8258186: Replace use of JNI_COMMIT mode with mode 0

2020-12-22 Thread Xue-Lei Andrew Fan
On Wed, 23 Dec 2020 02:13:38 GMT, Valerie Peng wrote: > Could someone please help review this trivial change - just replace > JNI_COMMIT with 0 for all ReleasePrimitiveArrayCritical calls. > > Thanks, > Valerie It looks a safe update to me. - Marked as reviewed by xuelei (Reviewe

RFR: 8258186: Replace use of JNI_COMMIT mode with mode 0

2020-12-22 Thread Valerie Peng
Could someone please help review this trivial change - just replace JNI_COMMIT with 0 for all ReleasePrimitiveArrayCritical calls. Thanks, Valerie - Commit messages: - 8258186: Replace use of JNI_COMMIT mode with mode 0 Changes: https://git.openjdk.java.net/jdk/pull/1875/files We

RFR: 8258852: Arrays.asList() for single item could be replaced with Collections.singletonList()

2020-12-22 Thread Xue-Lei Andrew Fan
If there is only one item, the call to Arrays.asList() could be replaced with Collections.singletonList() for less memory occupation. This update also includes some other code cleanup, like redundant variables in the related files. Code cleanup only, no new regression test. Bug: https://bugs.o

Integrated: 8258828: The method local variable is not really used

2020-12-22 Thread Xue-Lei Andrew Fan
On Tue, 22 Dec 2020 17:16:15 GMT, Xue-Lei Andrew Fan wrote: > The local variable "knownSignatureSchemes" in the > CRSignatureSchemesConsumer.consume() method is assigned, but it is not really > queried. It is safe to remove the local variable and the related code. > > Code cleanup, no new regr

Re: RFR: 8258828: The method local variable is not really used

2020-12-22 Thread Xue-Lei Andrew Fan
On Tue, 22 Dec 2020 18:11:23 GMT, Bradford Wetmore wrote: > Looks ok as long as you don't need this in chc.peerRequestedSignatureSchemes. No, the chc.peerRequestedSignatureSchemes will be set in the update consumer later on. - PR: https://git.openjdk.java.net/jdk/pull/1867

Integrated: 8258804: Collection.toArray() should use empty array

2020-12-22 Thread Xue-Lei Andrew Fan
On Mon, 21 Dec 2020 23:58:03 GMT, Xue-Lei Andrew Fan wrote: > Comparing to Collection.toArray(new T[size)), the Collection.toArray(new > T[0]) seems faster, safer and contractually cleaner. In the update, the use > of Collection.toArray(new T[size)) in the SunJSSE provider implementation is >

Re: RFR: 8258804: Collection.toArray() should use empty array

2020-12-22 Thread Xue-Lei Andrew Fan
On Tue, 22 Dec 2020 12:39:23 GMT, David M. Lloyd wrote: >> Comparing to Collection.toArray(new T[size)), the Collection.toArray(new >> T[0]) seems faster, safer and contractually cleaner. In the update, the use >> of Collection.toArray(new T[size)) in the SunJSSE provider implementation is >

Re: RFR: 8258828: The method local variable is not really used

2020-12-22 Thread Bradford Wetmore
On Tue, 22 Dec 2020 17:16:15 GMT, Xue-Lei Andrew Fan wrote: > The local variable "knownSignatureSchemes" in the > CRSignatureSchemesConsumer.consume() method is assigned, but it is not really > queried. It is safe to remove the local variable and the related code. > > Code cleanup, no new regr

Re: RFR: 8258804: Collection.toArray() should use empty array

2020-12-22 Thread David M . Lloyd
On Mon, 21 Dec 2020 23:58:03 GMT, Xue-Lei Andrew Fan wrote: > Comparing to Collection.toArray(new T[size)), he Collection.toArray(new T[0]) > seems faster, safer and contractually cleaner. In the update, the use of > Collection.toArray(new T[size)) in the SunJSSE provider implementation is >

Re: RFR: 8258804: Collection.toArray() should use empty array

2020-12-22 Thread Sean Mullan
On Mon, 21 Dec 2020 23:58:03 GMT, Xue-Lei Andrew Fan wrote: > Comparing to Collection.toArray(new T[size)), he Collection.toArray(new T[0]) > seems faster, safer and contractually cleaner. In the update, the use of > Collection.toArray(new T[size)) in the SunJSSE provider implementation is >

Re: RFR: 8258828: The method local variable is not really used

2020-12-22 Thread Jamil Nimeh
On Tue, 22 Dec 2020 17:16:15 GMT, Xue-Lei Andrew Fan wrote: > The local variable "knownSignatureSchemes" in the > CRSignatureSchemesConsumer.consume() method is assigned, but it is not really > queried. It is safe to remove the local variable and the related code. > > Code cleanup, no new regr

RFR: 8258828: The method local variable is not really used

2020-12-22 Thread Xue-Lei Andrew Fan
The local variable "knownSignatureSchemes" in the CRSignatureSchemesConsumer.consume() method is assigned, but it is not really queried. It is safe to remove the local variable and the related code. Code cleanup, no new regression test. Bug: https://bugs.openjdk.java.net/browse/JDK-8258828 ---

Integrated: 8258631: Remove sun.security.jgss.krb5.Krb5Util.getSubject()

2020-12-22 Thread Weijun Wang
On Tue, 22 Dec 2020 15:47:05 GMT, Weijun Wang wrote: > The method is useless now since the related TLS cipher suite was removed long > ago. This pull request has now been integrated. Changeset: 9e463d1a Author:Weijun Wang URL: https://git.openjdk.java.net/jdk/commit/9e463d1a Stats:

Re: RFR: 8258631: Remove sun.security.jgss.krb5.Krb5Util.getSubject()

2020-12-22 Thread Xue-Lei Andrew Fan
On Tue, 22 Dec 2020 16:36:14 GMT, Xue-Lei Andrew Fan wrote: >> The method is useless now since the related TLS cipher suite was removed >> long ago. > > Marked as reviewed by xuelei (Reviewer). Looks good to me. - PR: https://git.openjdk.java.net/jdk/pull/1865

Re: RFR: 8258631: Remove sun.security.jgss.krb5.Krb5Util.getSubject()

2020-12-22 Thread Xue-Lei Andrew Fan
On Tue, 22 Dec 2020 15:47:05 GMT, Weijun Wang wrote: > The method is useless now since the related TLS cipher suite was removed long > ago. Marked as reviewed by xuelei (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/1865

Re: RFR: 8253368: TLS connection always receives close_notify exception

2020-12-22 Thread Xue-Lei Andrew Fan
On Tue, 22 Dec 2020 15:40:12 GMT, Sean Coffey wrote: > @XueleiFan I went ahead with your advice and chose to keep the check in the > code. Since JDK 11, this code path would have thrown an SSLException. I've > chosen to keep that instead of introduce another > Exception(UnsupportedOperationExc

Re: RFR: 8253368: TLS connection always receives close_notify exception [v2]

2020-12-22 Thread Xue-Lei Andrew Fan
On Tue, 22 Dec 2020 15:40:22 GMT, Sean Coffey wrote: >> removing the "closing inbound before receiving peer's close_notify" >> exception that can be seen with TLS stack if calling close on inbound. After >> reading the relevant parts of the TLS v1.2/v1.3 RFCs, I believe the local >> end point

Re: RFR: 8258631: Remove sun.security.jgss.krb5.Krb5Util.getSubject()

2020-12-22 Thread Weijun Wang
On Tue, 22 Dec 2020 15:47:05 GMT, Weijun Wang wrote: > The method is useless now since the related TLS cipher suite was removed long > ago. > /label remove core-libs Oops, https://github.com/openjdk/skara/pull/980 filed. - PR: https://git.openjdk.java.net/jdk/pull/1865

RFR: 8258631: Remove sun.security.jgss.krb5.Krb5Util.getSubject()

2020-12-22 Thread Weijun Wang
The method is useless now since the related TLS cipher suite was removed long ago. - Commit messages: - 8258631: Remove sun.security.jgss.krb5.Krb5Util.getSubject() Changes: https://git.openjdk.java.net/jdk/pull/1865/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1865

Re: RFR: 8253368: TLS connection always receives close_notify exception [v2]

2020-12-22 Thread Sean Coffey
> removing the "closing inbound before receiving peer's close_notify" exception > that can be seen with TLS stack if calling close on inbound. After reading > the relevant parts of the TLS v1.2/v1.3 RFCs, I believe the local end point > doesn't have to wait for close_notify alert from remote end

Re: RFR: 8253368: TLS connection always receives close_notify exception

2020-12-22 Thread Sean Coffey
On Fri, 13 Nov 2020 14:16:35 GMT, Sean Coffey wrote: > removing the "closing inbound before receiving peer's close_notify" exception > that can be seen with TLS stack if calling close on inbound. After reading > the relevant parts of the TLS v1.2/v1.3 RFCs, I believe the local end point > does