Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-27 Thread Naoto Sato
On Fri, 27 Nov 2020 16:57:07 GMT, Roger Riggs wrote: >> src/java.base/share/classes/java/util/HexFormat.java line 853: >> >>> 851: */ >>> 852: public int fromHexDigit(int ch) { >>> 853: int value = Character.digit(ch, 16); >> >> Do we need to limit parsing the hex digit for onl

Re: RFR: 8256693: getAnnotatedReceiverType parameterizes types too eagerly

2020-11-27 Thread Rafael Winterhalter
On Tue, 24 Nov 2020 15:56:05 GMT, Joel Borggrén-Franck wrote: >> The fix for JDK-8256693 too often produces a ParameterizedType as the result >> of getAnnotatedReceiverType().getType() . A ParameterizedType is necessary >> when this type or any of its transitive owner types has type parameters

Re: RFR: 8254082: AbstractStringBuilder.insert(int dstOffset, CharSequence s, int start, int end) is missing fast-path for String [v2]

2020-11-27 Thread Сергей Цыпанов
On Fri, 27 Nov 2020 20:36:55 GMT, Claes Redestad wrote: >> Done > > Nice! > > Did this help the non-latin1 case in your microbenchmark? Yes, now it's significantly faster on longer strings (latin) (length)Score Error Units insert true 8 22.970 ± 0.291

RFR: JDK-8249836 java/io/IOException/LastErrorString.java should have bug-id as 1st word in @ignore

2020-11-27 Thread Mahendra Chhipa
…id as 1st word in @ignore https://bugs.openjdk.java.net/browse/JDK-8249836 - Commit messages: - JDK-8249836 ava/io/IOException/LastErrorString.java should have - JDK-8249836 java/io/IOException/LastErrorString.java should have bug-id as 1st word in @ignore - JDK-8249836 java/io/

Re: RFR: 8254082: AbstractStringBuilder.insert(int dstOffset, CharSequence s, int start, int end) is missing fast-path for String [v3]

2020-11-27 Thread Claes Redestad
On Fri, 27 Nov 2020 20:26:17 GMT, Сергей Цыпанов wrote: >> Original mail: >> https://mail.openjdk.java.net/pipermail/core-libs-dev/2020-September/069197.html >> >> Hello, >> >> while working with `StringBuilder.insert()` I've spotted that its delegate >> `AbstractStringBuilder.insert()` is m

Re: RFR: 8251989: Hex formatting and parsing utility [v11]

2020-11-27 Thread Roger Riggs
> java.util.HexFormat utility: > > - Format and parse hexadecimal strings, with parameters for delimiter, > prefix, suffix and upper/lowercase > - Static factories and builder methods to create HexFormat copies with > modified parameters. > - Consistent naming of methods for conversion of byt

Re: RFR: 8254082: AbstractStringBuilder.insert(int dstOffset, CharSequence s, int start, int end) is missing fast-path for String [v2]

2020-11-27 Thread Claes Redestad
On Fri, 27 Nov 2020 20:28:17 GMT, Сергей Цыпанов wrote: >> src/java.base/share/classes/java/lang/AbstractStringBuilder.java line 1721: >> >>> 1719: return; >>> 1720: } >>> 1721: inflate(); >> >> Like in `String.getBytes(byte[], int, byte)` I think we could do an >>

Re: RFR: 8254082: AbstractStringBuilder.insert(int dstOffset, CharSequence s, int start, int end) is missing fast-path for String [v2]

2020-11-27 Thread Сергей Цыпанов
On Wed, 25 Nov 2020 09:52:28 GMT, Claes Redestad wrote: >> Сергей Цыпанов has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains two additional >> comm

Re: RFR: 8254082: AbstractStringBuilder.insert(int dstOffset, CharSequence s, int start, int end) is missing fast-path for String [v3]

2020-11-27 Thread Сергей Цыпанов
> Original mail: > https://mail.openjdk.java.net/pipermail/core-libs-dev/2020-September/069197.html > > Hello, > > while working with `StringBuilder.insert()` I've spotted that its delegate > `AbstractStringBuilder.insert()` is missing > a fast-path for the most frequent case when its argument

Re: "loc: wrong sig" in ZipFileSystem on a valid ZIP file (extra data field of exactly 5 bytes)

2020-11-27 Thread Lance Andersen
Hi Dawid, If you believe you have a a fix, please submit a patch along with a JTREG test case. Ideally the test case would create zip file as part of the test. Best Lance > On Nov 27, 2020, at 7:37 AM, Dawid Weiss wrote: > > Just for the archives - I'm not sure if this ended up being filed t

Re: RFR: 8170432: Class java.util.UUID & @Override

2020-11-27 Thread Lance Andersen
On Thu, 26 Nov 2020 17:01:59 GMT, Richard Fussenegger wrote: > Adds `@Override` annotation to all methods in `java.util.UUID` that implement > methods from the implemented interfaces. Looks fine. It appears you need a sponsor so I can do that once you integrate - Marked as revie

RFR: 8166026: refactor shell tests to java

2020-11-27 Thread Ivan Šipka
@iignatev could you please review? Thank you. note to self: jtreg test/jdk/java/lang/ProcessBuilder/InheritIO/InheritIoTest.java test/jdk/java/lang/SecurityManager/modules/CustomSecurityManagerTest.java test/jdk/java/lang/Thread/uncaughtexceptions/UncaughtExceptionsTest.java test/jdk/java/lang

Integrated: 8170432: Class java.util.UUID & @Override

2020-11-27 Thread Richard Fussenegger
On Thu, 26 Nov 2020 17:01:59 GMT, Richard Fussenegger wrote: > Adds `@Override` annotation to all methods in `java.util.UUID` that implement > methods from the implemented interfaces. This pull request has now been integrated. Changeset: b4cba15a Author:Fleshgrinder Committer: Lance Ande

Re: RFR: 8257074 Update the ByteBuffers micro benchmark [v3]

2020-11-27 Thread Chris Hegarty
Maurizio, > On 27 Nov 2020, at 18:04, Maurizio Cimadamore > wrote: > > ... > Looks a great improvements. Two comments: > > * the names always mention the "Single" word, when in fact all benchmark > involve some kind of a loop. I'd suggest making that more explicit, both in > the benchmark m

Re: RFR: 8256999: Add C2 intrinsic for Reference.refersTo and PhantomReference::refersTo [v2]

2020-11-27 Thread Vladimir Kozlov
On Thu, 26 Nov 2020 13:51:05 GMT, Roman Kennke wrote: >> Vladimir Kozlov has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains three additional >> com

Re: RFR: 8257184: Upstream 8252504: Add a method to MemoryLayout which returns a offset-computing method handle [v3]

2020-11-27 Thread Jorn Vernee
> This upstreams the patch from: > https://github.com/openjdk/panama-foreign/pull/396 > > There were only some minor merge conflicts due to imports and some tests > being replaced by java/foreign/TestNulls. All tests still pass, no other > changes were needed. > > CSR: https://bugs.openjdk.jav

Re: RFR: 8207329: Add NIL Constant to UUID

2020-11-27 Thread Richard Fussenegger
On Fri, 27 Nov 2020 17:55:27 GMT, Roger Riggs wrote: >> Adds a constant for the special NIL UUID where all bits are zero to >> `java.util.UUID`. The >> [8207329](https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8207329) >> mentions the usage of it to avoid `null`, it for sure is also very

Re: RFR: 8257074 Update the ByteBuffers micro benchmark [v3]

2020-11-27 Thread Maurizio Cimadamore
On Thu, 26 Nov 2020 14:38:17 GMT, Chris Hegarty wrote: >> The ByteBuffers micro benchmark seems to be a little dated. >> >> It should be a useful resource to leverage when analysing the performance >> impact of any potential implementation changes in the byte buffer classes. >> More specifica

Re: RFR: 8207329: Add NIL Constant to UUID

2020-11-27 Thread Roger Riggs
On Thu, 26 Nov 2020 15:54:46 GMT, Richard Fussenegger wrote: > Adds a constant for the special NIL UUID where all bits are zero to > `java.util.UUID`. The > [8207329](https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8207329) > mentions the usage of it to avoid `null`, it for sure is also

Re: RFR: 8257184: Upstream 8252504: Add a method to MemoryLayout which returns a offset-computing method handle [v2]

2020-11-27 Thread Maurizio Cimadamore
On Fri, 27 Nov 2020 12:31:12 GMT, Jorn Vernee wrote: >> This upstreams the patch from: >> https://github.com/openjdk/panama-foreign/pull/396 >> >> There were only some minor merge conflicts due to imports and some tests >> being replaced by java/foreign/TestNulls. All tests still pass, no othe

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-27 Thread Roger Riggs
On Fri, 27 Nov 2020 16:56:37 GMT, Chris Hegarty wrote: >> It is the byte array that is formatted, the result is a hexadecimal string. >> It helps make a stronger distinction between the byte array functions and >> the primitive functions. > >> It is the byte array that is formatted, the result i

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-27 Thread Roger Riggs
On Wed, 25 Nov 2020 23:36:22 GMT, Naoto Sato wrote: >> Roger Riggs has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 19 additional >> commits sinc

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-27 Thread Roger Riggs
On Fri, 27 Nov 2020 10:46:09 GMT, Chris Hegarty wrote: >> Roger Riggs has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 19 additional >> commits s

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-27 Thread Roger Riggs
On Fri, 27 Nov 2020 09:54:07 GMT, Chris Hegarty wrote: >> Roger Riggs has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 19 additional >> commits s

RFR: 8246778: Compiler implementation for Sealed Classes (Second Preview)

2020-11-27 Thread Jan Lahoda
This pull request replaces https://github.com/openjdk/jdk/pull/1227. >From the original PR: > Please review the code for the second iteration of sealed classes. In this > iteration we are: > > * Enhancing narrowing reference conversion to allow for stricter checking > of cast conversions w

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-27 Thread Chris Hegarty
On Fri, 27 Nov 2020 16:51:02 GMT, Roger Riggs wrote: > It is the byte array that is formatted, the result is a hexadecimal string. I don't understand. How is the byte array formatter? Do we have "formatted byte arrays" and "unformatted byte arrays"? Are they formatted somehow with prefix, d

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-27 Thread Roger Riggs
On Fri, 27 Nov 2020 09:40:10 GMT, Chris Hegarty wrote: >> Roger Riggs has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 19 additional >> commits s

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-27 Thread Roger Riggs
On Thu, 26 Nov 2020 00:08:37 GMT, Naoto Sato wrote: >> Roger Riggs has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 19 additional >> commits sinc

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-27 Thread Roger Riggs
On Fri, 27 Nov 2020 09:33:26 GMT, Chris Hegarty wrote: >> Roger Riggs has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 19 additional >> commits s

Re: RFR: 8256818: SSLSocket that is never bound or connected leaks socket resources

2020-11-27 Thread Xue-Lei Andrew Fan
On Fri, 27 Nov 2020 15:46:08 GMT, Christoph Langer wrote: >> I changed the check for when to do duplexClose to only do it when socket >> isConnected(). >> >> I also added a testcase which should work on all platforms. For windows I >> borrowed some functionality introduced lately with test >>

Re: RFR: 8256818: SSLSocket that is never bound or connected leaks socket resources

2020-11-27 Thread Christoph Langer
On Sat, 21 Nov 2020 23:21:15 GMT, Christoph Langer wrote: >> There is a flaw in sun.security.ssl.SSLSocketImpl::close() which leads to >> leaking socket resources after JDK-8224829. >> >> The close method calls duplexCloseOutput() and duplexCloseInput(). In case >> of an exception in any of th

RFR: JDK-8256950: Add record attribute support to symbol generator CreateSymbols

2020-11-27 Thread Jan Lahoda
Adding support for record classes in the historical data for ct.sym. This includes a few changes not strictly needed for the change: -updating and moving tests into test/langtools, so that it is easier to run them. -fixing Record attribute reading in javac's ClassReader (used for tests, but seem

Re: RFR: 8248862: Implement Enhanced Pseudo-Random Number Generators [v8]

2020-11-27 Thread Jim Laskey
> This PR is to introduce a new random number API for the JDK. The primary API > is found in RandomGenerator and RandomGeneratorFactory. Further description > can be found in the JEP https://openjdk.java.net/jeps/356 . > > javadoc can be found at > http://cr.openjdk.java.net/~jlaskey/prng/doc/a

Re: RFR: 8257164: Share LambdaForms for VH linkers/invokers.

2020-11-27 Thread Claes Redestad
On Thu, 26 Nov 2020 13:13:43 GMT, Vladimir Ivanov wrote: > Introduce sharing of `LambdaForms` for `VarHandle` linkers and invokers. > It reduces the number of LambdaForms needed at runtime. > > Testing: tier1-4 LGTM! - Marked as reviewed by redestad (Reviewer). PR: https://git.op

Re: RFR: 8257189: Handle concurrent updates of MH.form better

2020-11-27 Thread Claes Redestad
On Thu, 26 Nov 2020 21:23:16 GMT, Vladimir Ivanov wrote: > Concurrent updates may lead to redundant LambdaForms created and unnecessary > class loading when those are compiled. > > Most notably, it severely affects MethodHandle customization: when a > MethodHandle is called from multiple thre

Re: "loc: wrong sig" in ZipFileSystem on a valid ZIP file (extra data field of exactly 5 bytes)

2020-11-27 Thread Dawid Weiss
Just for the archives - I'm not sure if this ended up being filed to the bug system - the repro below demonstrates the bug on all JDKs up to the newest one. # create a single random file of 250 megabytes head -c 250M < /dev/urandom > rnd.bin # create a bunch of hardlinks to the same file. for i in

@Contended and @IntrinsicCandidate for user code

2020-11-27 Thread Suminda Sirinath Salpitikorala Dharmasena
Hello, Can @Contended and @IntrinsicCandidate annotations be moved out of internal so user code can use it? This can start by perhaps ironing out any issues that might prevent it from being made accessible for user code. Suminda

Re: RFR: 8257184: Upstream 8252504: Add a method to MemoryLayout which returns a offset-computing method handle [v2]

2020-11-27 Thread Chris Hegarty
On Fri, 27 Nov 2020 12:28:01 GMT, Jorn Vernee wrote: >> This upstreams the patch from: >> https://github.com/openjdk/panama-foreign/pull/396 >> >> There were only some minor merge conflicts due to imports and some tests >> being replaced by java/foreign/TestNulls. All tests still pass, no othe

Re: RFR: 8257184: Upstream 8252504: Add a method to MemoryLayout which returns a offset-computing method handle [v2]

2020-11-27 Thread Jorn Vernee
> This upstreams the patch from: > https://github.com/openjdk/panama-foreign/pull/396 > > There were only some minor merge conflicts due to imports and some tests > being replaced by java/foreign/TestNulls. All tests still pass, no other > changes were needed. > > CSR: https://bugs.openjdk.jav

Re: RFR: 8257184: Upstream 8252504: Add a method to MemoryLayout which returns a offset-computing method handle [v2]

2020-11-27 Thread Jorn Vernee
On Fri, 27 Nov 2020 10:48:31 GMT, Maurizio Cimadamore wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Address review comments: >> - remove explicit @throws NPE tags >> - add example to class doc > > Looks good

Re: RFR: 8257184: Upstream 8252504: Add a method to MemoryLayout which returns a offset-computing method handle

2020-11-27 Thread Maurizio Cimadamore
On Thu, 26 Nov 2020 19:24:16 GMT, Jorn Vernee wrote: > This upstreams the patch from: > https://github.com/openjdk/panama-foreign/pull/396 > > There were only some minor merge conflicts due to imports and some tests > being replaced by java/foreign/TestNulls. All tests still pass, no other >

Re: RFR: 8257184: Upstream 8252504: Add a method to MemoryLayout which returns a offset-computing method handle

2020-11-27 Thread Maurizio Cimadamore
On Fri, 27 Nov 2020 09:11:30 GMT, Chris Hegarty wrote: >> This upstreams the patch from: >> https://github.com/openjdk/panama-foreign/pull/396 >> >> There were only some minor merge conflicts due to imports and some tests >> being replaced by java/foreign/TestNulls. All tests still pass, no ot

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-27 Thread Chris Hegarty
On Wed, 25 Nov 2020 22:51:44 GMT, Roger Riggs wrote: >> java.util.HexFormat utility: >> >> - Format and parse hexadecimal strings, with parameters for delimiter, >> prefix, suffix and upper/lowercase >> - Static factories and builder methods to create HexFormat copies with >> modified parame

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-27 Thread Chris Hegarty
On Wed, 25 Nov 2020 22:51:44 GMT, Roger Riggs wrote: >> java.util.HexFormat utility: >> >> - Format and parse hexadecimal strings, with parameters for delimiter, >> prefix, suffix and upper/lowercase >> - Static factories and builder methods to create HexFormat copies with >> modified parame

Re: RFR: 8257186: Size of heap segments is not computed correctlyFix overflow in size computation for heap segments

2020-11-27 Thread Chris Hegarty
On Thu, 26 Nov 2020 18:29:42 GMT, Maurizio Cimadamore wrote: > There is a subtle bug in the heap segment factories: the byte size is > computed using an int multiplication instead of a long multiplication. > Because of that, it is possible to observe overflow when creating segments > out of a

Re: RFR: 8257184: Upstream 8252504: Add a method to MemoryLayout which returns a offset-computing method handle

2020-11-27 Thread Chris Hegarty
On Thu, 26 Nov 2020 19:24:16 GMT, Jorn Vernee wrote: > This upstreams the patch from: > https://github.com/openjdk/panama-foreign/pull/396 > > There were only some minor merge conflicts due to imports and some tests > being replaced by java/foreign/TestNulls. All tests still pass, no other >

Re: RFR: 8257184: Upstream 8252504: Add a method to MemoryLayout which returns a offset-computing method handle

2020-11-27 Thread Chris Hegarty
On Thu, 26 Nov 2020 19:24:16 GMT, Jorn Vernee wrote: > This upstreams the patch from: > https://github.com/openjdk/panama-foreign/pull/396 > > There were only some minor merge conflicts due to imports and some tests > being replaced by java/foreign/TestNulls. All tests still pass, no other >