Re: RFR: 8286194: ExecutorShutdown test fails intermittently [v3]

2022-05-13 Thread Michael McMahon
On Sat, 7 May 2022 11:46:37 GMT, Daniel Fuchs wrote: >> Hi, please find here a patch that solves a rare intermittent test failure >> observed in the test `java/net/httpclient/ExecutorShutdown.java` >> >> A race condition coupled with some too eager synchronization was causing a >> deadlock bet

Re: RFR: 8282662: Use List.of() factory method to reduce memory consumption [v3]

2022-05-13 Thread ExE Boss
On Thu, 10 Mar 2022 08:52:17 GMT, Сергей Цыпанов wrote: >> `List.of()` along with `Set.of()` create unmodifiable `List/Set` but with >> smaller footprint comparing to `Arrays.asList()` / `new HashSet()` when >> called with vararg of size 0, 1, 2. >> >> In general replacement of `Arrays.asList(

Re: RFR: 8286194: ExecutorShutdown test fails intermittently [v3]

2022-05-13 Thread Daniel Fuchs
On Fri, 13 May 2022 11:09:31 GMT, Michael McMahon wrote: > Question about the code copied in from ThreadInfo. Is there any way we could > request a change to that class to adjust the number of stack frames printed? Thanks Michael. I have logged https://bugs.openjdk.java.net/browse/JDK-8286720

Re: RFR: 8286194: ExecutorShutdown test fails intermittently [v3]

2022-05-13 Thread Michael McMahon
On Sat, 7 May 2022 11:46:37 GMT, Daniel Fuchs wrote: >> Hi, please find here a patch that solves a rare intermittent test failure >> observed in the test `java/net/httpclient/ExecutorShutdown.java` >> >> A race condition coupled with some too eager synchronization was causing a >> deadlock bet

Integrated: 8286194: ExecutorShutdown test fails intermittently

2022-05-13 Thread Daniel Fuchs
On Thu, 5 May 2022 19:03:13 GMT, Daniel Fuchs wrote: > Hi, please find here a patch that solves a rare intermittent test failure > observed in the test `java/net/httpclient/ExecutorShutdown.java` > > A race condition coupled with some too eager synchronization was causing a > deadlock between

Re: RFR: 8282662: Use List.of() factory method to reduce memory consumption [v3]

2022-05-13 Thread Сергей Цыпанов
On Fri, 13 May 2022 12:19:08 GMT, Сергей Цыпанов wrote: >> src/java.base/share/classes/java/lang/reflect/ProxyGenerator.java line 727: >> >>> 725: MethodVisitor mv = cw.visitMethod(accessFlags, >>> 726: method.getName(), desc, null, >>> 727: ty

Re: RFR: 8282662: Use List.of() factory method to reduce memory consumption [v3]

2022-05-13 Thread Сергей Цыпанов
On Fri, 13 May 2022 11:14:29 GMT, ExE Boss wrote: >> Сергей Цыпанов has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8282662: Revert dubious changes in MethodType > > src/java.base/share/classes/java/lang/reflect/ProxyGenerator.java line

Re: RFR: 8286715: Generalize MemorySegment::ofBuffer

2022-05-13 Thread Maurizio Cimadamore
On Fri, 13 May 2022 12:33:10 GMT, Maurizio Cimadamore wrote: > This patch makes MemorySegment::ofBuffer more general, by allowing clients to > pass *any* `Buffer` instance, not just `ByteBuffer`. > This allows us to match expressiveness of JNI API, where JNI clients can > obtain the address of

RFR: 8286715: Generalize MemorySegment::ofBuffer

2022-05-13 Thread Maurizio Cimadamore
This patch makes MemorySegment::ofBuffer more general, by allowing clients to pass *any* `Buffer` instance, not just `ByteBuffer`. This allows us to match expressiveness of JNI API, where JNI clients can obtain the address of any direct buffer instance, using the `GetDirectBufferAddress` functio

Re: RFR: 8282662: Use List.of() factory method to reduce memory consumption [v3]

2022-05-13 Thread ExE Boss
On Fri, 13 May 2022 12:19:25 GMT, Сергей Цыпанов wrote: >> Usually a method declares either no exception, or a couple of them. In the >> first case `List.of()` doesn't allocate, in the second it allocates an >> object with 1-2 fields but without an array, so `List.of()` is likely to be >> more

Re: RFR: 8286378: Address possibly lossy conversions in java.base [v3]

2022-05-13 Thread Roger Riggs
On Fri, 13 May 2022 05:54:15 GMT, Alan Bateman wrote: >> src/java.base/linux/classes/sun/nio/ch/EPollSelectorImpl.java line 128: >> >>> 126: // timed poll interrupted so need to adjust timeout >>> 127: long adjust = System.nanoTime() - startTime; >>> 128:

Re: RFR: 8286378: Address possibly lossy conversions in java.base [v3]

2022-05-13 Thread ExE Boss
On Fri, 13 May 2022 14:18:04 GMT, Roger Riggs wrote: >> Well spotted, I don't think that change was intentionally. > > Ouch; Will fix: > > I took Alan's earlier comment literally: > > "This one can also be changed to: > > to =- (int) TimeUnit.NANOSECONDS.toMillis(adjust);" @RogerRiggs This al

Re: [Internet]Re: Reproducer for JDK-8221218

2022-05-13 Thread xueleifan(XueleiFan)
Ping … Is there a link to the "How to reproduce” information? Thanks, Xuelei On Apr 26, 2022, at 7:16 AM, xueleifan(XueleiFan) mailto:xuelei...@tencent.com>> wrote: I will have a look at it. I may need help for more information. On Apr 25, 2022, at 7:45 AM, Flavia Rainone mailto:frain...@r

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v4]

2022-05-13 Thread Sean Mullan
On Thu, 12 May 2022 19:45:37 GMT, Valerie Peng wrote: >> That sentence is specifically if the caller did not specify parameters >> though. The previous wording is if the caller did specify parameters (as say >> an `AlgorithmParameterSpec`) and the implementation cannot return them as >> `Algor

Integrated: 8286393: Address possibly lossy conversions in java.rmi

2022-05-13 Thread Roger Riggs
On Thu, 12 May 2022 16:47:43 GMT, Roger Riggs wrote: > Updates to modules java.rmi and java.smartcardio to remove warnings about > lossy-conversions introduced by PR#8599. > > Explicit casts are inserted where implicit casts occur. > > 8286393: Address possibly lossy conversions in java.rmi >

Integrated: 8285380: Fix typos in security

2022-05-13 Thread Magnus Ihse Bursie
On Thu, 21 Apr 2022 13:51:27 GMT, Magnus Ihse Bursie wrote: > I ran `codespell` on modules owned by the security team (`java.security.jgss > java.security.sasl java.smartcardio java.xml.crypto jdk.crypto.cryptoki > jdk.crypto.ec jdk.crypto.mscapi jdk.security.auth jdk.security.jgss`), and > ac

Re: [Internet]Re: JDK-8221218 - Insufficient buffer remaining for AEAD cipher fragment (2). Needs to be more than tag size (16)

2022-05-13 Thread xueleifan(XueleiFan)
Hm, I get a hint about the issue now. Did SunJSSE provider used in both client and server? Xuelei > On Apr 26, 2022, at 7:36 AM, Thomas Lußnig wrote: > > Hi, > > i changed the logging and now better get the Location of the error > > javax.crypto.BadPaddingException: Insufficient buffer rema

Re: [Internet]Re: Re: JDK-8221218 - Insufficient buffer remaining for AEAD cipher fragment (2). Needs to be more than tag size (16)

2022-05-13 Thread xueleifan(XueleiFan)
Would you mind send the debug log information, with System property javax.net.debug=all? Thanks, Xuelei > On May 13, 2022, at 8:27 AM, xueleifan(XueleiFan) > wrote: > > Hm, I get a hint about the issue now. Did SunJSSE provider used in both > client and server? > > Xuelei > >> On Apr 26,

Re: RFR: 8002277: Refactor two PBE classes to simplify maintenance [v7]

2022-05-13 Thread Valerie Peng
On Thu, 12 May 2022 15:03:40 GMT, Weijun Wang wrote: >> Valerie Peng has updated the pull request incrementally with one additional >> commit since the last revision: >> >> trivial syntax fix. > > src/java.base/share/classes/com/sun/crypto/provider/PKCS12PBECipherCore.java > line 363: > >>

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v4]

2022-05-13 Thread Valerie Peng
On Fri, 13 May 2022 14:35:56 GMT, Sean Mullan wrote: >> Hmm, would it fall under the "Otherwise, null is returned"? If not, perhaps >> we can add back the part about returning AlgorithmParameters as below: >> >> **If the underlying signature implementation supports returning the >> parameters

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v6]

2022-05-13 Thread Valerie Peng
> This is to update the method javadoc of > java.security.Signature.getParameters() with the missing `@throws > UnsupportedOperationException`. In addition, the wording on the returned > parameters are updated to match those in Cipher and CipherSpi classes. > > CSR will be filed later. > > Th

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v7]

2022-05-13 Thread Valerie Peng
> This is to update the method javadoc of > java.security.Signature.getParameters() with the missing `@throws > UnsupportedOperationException`. In addition, the wording on the returned > parameters are updated to match those in Cipher and CipherSpi classes. > > CSR will be filed later. > > Th

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v7]

2022-05-13 Thread Sean Mullan
On Fri, 13 May 2022 19:35:35 GMT, Valerie Peng wrote: >> This is to update the method javadoc of >> java.security.Signature.getParameters() with the missing `@throws >> UnsupportedOperationException`. In addition, the wording on the returned >> parameters are updated to match those in Cipher a

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v7]

2022-05-13 Thread Valerie Peng
On Fri, 13 May 2022 20:29:11 GMT, Sean Mullan wrote: >> Valerie Peng has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fix newline. > > src/java.base/share/classes/java/security/Signature.java line 1012: > >> 1010: * values used by t

RFR: 8286090: Add RC2/RC4 to jdk.security.legacyAlgorithms

2022-05-13 Thread Hai-May Chao
Please review the small change to add RC2 and ARCFOUR to jdk.security.legacyAlgorithms. So it enables keytool -genseckey, -list, and -importkeystore commands to warn users when RC2 or ARCFOUR algorithm is used. - Commit messages: - 8286090: Add RC2/RC4 to jdk.security.legacyAlgorit

Re: RFR: 8286090: Add RC2/RC4 to jdk.security.legacyAlgorithms

2022-05-13 Thread Hai-May Chao
On Sat, 14 May 2022 01:51:34 GMT, Hai-May Chao wrote: > Please review the small change to add RC2 and ARCFOUR to > jdk.security.legacyAlgorithms. So it enables keytool -genseckey, -list, and > -importkeystore commands to warn users when RC2 or ARCFOUR algorithm is used. CSR is at: https://bugs

Re: RFR: 8283577: SSLEngine.unwrap on read-only input ByteBuffer [v2]

2022-05-13 Thread Anthony Scarpino
> Hi, > > I need a review of this fix to allow a read-only 'src' buffer to be used with > SSLEngine.unwrap(). A temporary read-write buffer is created in the SSLCipher > operation when a read-only buffer is passed. If the 'src' is read-write, > there is no effect on the current operation > > T