Re: RFR: 8266459: Implement JEP 411: Deprecate the Security Manager for Removal

2021-05-17 Thread Alan Bateman
On Mon, 17 May 2021 18:23:41 GMT, Weijun Wang wrote: > Please review this implementation of [JEP > 411](https://openjdk.java.net/jeps/411). > > The code change is divided into 3 commits. Please review them one by one. > > 1. > https://github.com/openjdk/jdk/commit/576161d15423f58281e384174d28

Re: RFR: 8267184: JEP 411: Add -Djava.security.manager=allow to tests calling System.setSecurityManager

2021-05-17 Thread Alan Bateman
On Mon, 17 May 2021 17:51:36 GMT, Weijun Wang wrote: > Please review the test changes for [JEP > 411](https://openjdk.java.net/jeps/411). > > With JEP 411 and the default value of `-Djava.security.manager` becoming > `disallow`, tests calling `System.setSecurityManager()` need > `-Djava.secu

Re: RFR: 8267184: JEP 411: Add -Djava.security.manager=allow to tests calling System.setSecurityManager

2021-05-17 Thread David Holmes
On Mon, 17 May 2021 17:51:36 GMT, Weijun Wang wrote: > Please review the test changes for [JEP > 411](https://openjdk.java.net/jeps/411). > > With JEP 411 and the default value of `-Djava.security.manager` becoming > `disallow`, tests calling `System.setSecurityManager()` need > `-Djava.secu

Re: RFR: 8266459: Implement JEP 411: Deprecate the Security Manager for Removal

2021-05-17 Thread Erik Joelsson
On Mon, 17 May 2021 18:23:41 GMT, Weijun Wang wrote: > Please review this implementation of [JEP > 411](https://openjdk.java.net/jeps/411). > > The code change is divided into 3 commits. Please review them one by one. > > 1. > https://github.com/openjdk/jdk/commit/576161d15423f58281e384174d28

Re: RFR: 8265783: Create a separate library for x86 Intel SVML assembly intrinsics [v4]

2021-05-17 Thread Vladimir Kozlov
On Sat, 15 May 2021 02:06:29 GMT, Sandhya Viswanathan wrote: >> This PR contains Short Vector Math Library support related changes for >> [JEP-414 Vector API (Second Incubator)](https://openjdk.java.net/jeps/414), >> in preparation for when targeted. >> >> Intel Short Vector Math Library (SVM

Re: RFR: 8265029: Preserve SIZED characteristics on slice operations (skip, limit) [v3]

2021-05-17 Thread Paul Sandoz
On Sat, 17 Apr 2021 02:16:44 GMT, Tagir F. Valeev wrote: >> Tagir F. Valeev has updated the pull request incrementally with four >> additional commits since the last revision: >> >> - More benchmarks >> - adjustSize -> exactOutputSize >> >>Co-authored-by: Paul Sandoz >> - adjustedLi

RFR: 8267184: JEP 411: Add -Djava.security.manager=allow to tests calling System.setSecurityManager

2021-05-17 Thread Weijun Wang
Please review the test changes for [JEP 411](https://openjdk.java.net/jeps/411). With JEP 411 and the default value of `-Djava.security.manager` becoming `disallow`, tests calling `System.setSecurityManager()` need `-Djava.security.manager=allow` when launched. This PR covers such changes for

Re: RFR: 8266459: Implement JEP 411: Deprecate the Security Manager for Removal

2021-05-17 Thread Weijun Wang
On Mon, 17 May 2021 18:23:41 GMT, Weijun Wang wrote: > Please review this implementation of [JEP > 411](https://openjdk.java.net/jeps/411). > > The code change is divided into 3 commits. Please review them one by one. > > 1. > https://github.com/openjdk/jdk/commit/576161d15423f58281e384174d28

RFR: 8266459: Implement JEP 411: Deprecate the Security Manager for Removal

2021-05-17 Thread Weijun Wang
Please review this implementation of [JEP 411](https://openjdk.java.net/jeps/411). The code change is divided into 3 commits. Please review them one by one. 1. https://github.com/openjdk/jdk/commit/576161d15423f58281e384174d28c9f9be7941a1 The essential change for this JEP, including the `@Depr

Integrated: 8264777: Overload optimized FileInputStream::readAllBytes

2021-05-17 Thread Brian Burkhalter
On Mon, 3 May 2021 20:33:23 GMT, Brian Burkhalter wrote: > Please consider this request to override the `java.io.InputStream` methods > `readAllBytes()` and `readNBytes(int)` in `FileInputStream` with more > performant implementations. The method overrides attempt to read all > requested bytes

Re: [External] : Re: JEP draft: Scope Locals

2021-05-17 Thread Brian Goetz
Let's try again: why is that important?   What decisions would you make differently if you had this information?  What benefit would come from those decisions? Threading is hard. Gee, thanks MIke for pointing that out to me, obviously I'm new to the topic :) Scoped variables a

Re: RFR: 8262891: Compiler implementation for Pattern Matching for switch (Preview) [v2]

2021-05-17 Thread Rémi Forax
On Mon, 17 May 2021 19:04:11 GMT, Jan Lahoda wrote: >> This is a preview of a patch implementing JEP 406: Pattern Matching for >> switch (Preview): >> https://bugs.openjdk.java.net/browse/JDK-8213076 >> >> The current draft of the specification is here: >> http://cr.openjdk.java.net/~gbierman/j

Re: RFR: 8262891: Compiler implementation for Pattern Matching for switch (Preview) [v2]

2021-05-17 Thread Jan Lahoda
> This is a preview of a patch implementing JEP 406: Pattern Matching for > switch (Preview): > https://bugs.openjdk.java.net/browse/JDK-8213076 > > The current draft of the specification is here: > http://cr.openjdk.java.net/~gbierman/jep406/jep406-20210430/specs/patterns-switch-jls.html > > A

Re: RFR: 8262891: Compiler implementation for Pattern Matching for switch (Preview) [v2]

2021-05-17 Thread Jan Lahoda
On Tue, 4 May 2021 20:48:34 GMT, Maurizio Cimadamore wrote: >> Jan Lahoda has updated the pull request incrementally with three additional >> commits since the last revision: >> >> - Reflecting recent spec changes. >> - Reflecting review comments. >> - Reflecting review comments on SwitchBo

Re: RFR: 8264777: Overload optimized FileInputStream::readAllBytes [v9]

2021-05-17 Thread Alan Bateman
On Mon, 17 May 2021 17:53:05 GMT, Brian Burkhalter wrote: >> Please consider this request to override the `java.io.InputStream` methods >> `readAllBytes()` and `readNBytes(int)` in `FileInputStream` with more >> performant implementations. The method overrides attempt to read all >> requested

Re: [External] : Re: JEP draft: Scope Locals

2021-05-17 Thread Brian Goetz
Let's back up a lot of steps; you're deep in proposing a solution when you've not even explained what problem you think you're solving.  So control question, which I hope will start to expose the assumptions:    Why do you think its important to know that a snapshot of a

Re: RFR: 8264777: Overload optimized FileInputStream::readAllBytes [v9]

2021-05-17 Thread Brian Burkhalter
> Please consider this request to override the `java.io.InputStream` methods > `readAllBytes()` and `readNBytes(int)` in `FileInputStream` with more > performant implementations. The method overrides attempt to read all > requested bytes into a single array of the required size rather than > co

Re: RFR: 8264777: Overload optimized FileInputStream::readAllBytes [v8]

2021-05-17 Thread Alan Bateman
On Mon, 17 May 2021 17:00:15 GMT, Brian Burkhalter wrote: >> Please consider this request to override the `java.io.InputStream` methods >> `readAllBytes()` and `readNBytes(int)` in `FileInputStream` with more >> performant implementations. The method overrides attempt to read all >> requested

Re: RFR: 8266846: Add java.time.InstantSource [v2]

2021-05-17 Thread Roger Riggs
On Mon, 17 May 2021 17:13:58 GMT, Stephen Colebourne wrote: >> src/java.base/share/classes/java/time/Clock.java line 128: >> >>> 126: * Implementations should implement {@code Serializable} wherever >>> possible and must >>> 127: * document whether or not they do support serialization. >>> 1

Re: RFR: 8263087: Add a MethodHandle combinator that switches over a set of MethodHandles [v2]

2021-05-17 Thread Claes Redestad
On Mon, 17 May 2021 17:19:16 GMT, Jorn Vernee wrote: >> This patch adds a `tableSwitch` combinator that can be used to switch over a >> set of method handles given an index, with a fallback in case the index is >> out of bounds, much like the `tableswitch` bytecode. Here is a description >> of

Re: RFR: 8263202: Update Hebrew/Indonesian/Yiddish ISO 639 language codes to current

2021-05-17 Thread Naoto Sato
On Mon, 17 May 2021 17:14:53 GMT, Erik Joelsson wrote: > I see no relevant build changes to comment on as the build label was only > added because the buildtool java source was touched, so this looks ok from a > build perspective. Removed `build` label. - PR: https://git.openjdk.

Re: RFR: 8263087: Add a MethodHandle combinator that switches over a set of MethodHandles [v2]

2021-05-17 Thread Jorn Vernee
On Fri, 14 May 2021 07:27:08 GMT, Claes Redestad wrote: >> Jorn Vernee 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 >> commits

Re: RFR: 8266846: Add java.time.InstantSource

2021-05-17 Thread Stephen Colebourne
On Thu, 13 May 2021 20:52:33 GMT, Stephen Colebourne wrote: > 8266846: Add java.time.InstantSource FWIW, if there is a need to access `VM.getNanoTimeAdjustment(localOffset)` then that should be a separate issue. I don't personally think it would be approved given Valhalla is coming.

Re: RFR: 8266846: Add java.time.InstantSource [v2]

2021-05-17 Thread Stephen Colebourne
On Mon, 17 May 2021 14:30:20 GMT, Roger Riggs wrote: >> Stephen Colebourne has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8266846: Add java.time.InstantSource > > src/java.base/share/classes/java/time/Clock.java line 128: > >> 126: *

Re: RFR: 8263087: Add a MethodHandle combinator that switches over a set of MethodHandles [v2]

2021-05-17 Thread Jorn Vernee
> This patch adds a `tableSwitch` combinator that can be used to switch over a > set of method handles given an index, with a fallback in case the index is > out of bounds, much like the `tableswitch` bytecode. Here is a description of > how it works (copied from the javadoc): > > Creates

Re: RFR: 8266846: Add java.time.InstantSource [v2]

2021-05-17 Thread Stephen Colebourne
> 8266846: Add java.time.InstantSource Stephen Colebourne has updated the pull request incrementally with one additional commit since the last revision: 8266846: Add java.time.InstantSource - Changes: - all: https://git.openjdk.java.net/jdk/pull/4016/files - new: https://git.

Re: RFR: 8263202: Update Hebrew/Indonesian/Yiddish ISO 639 language codes to current

2021-05-17 Thread Erik Joelsson
On Mon, 17 May 2021 16:55:35 GMT, Naoto Sato wrote: > Please review the changes to the subject issue. java.util.Locale class has a > long-standing issue for those obsolete ISO 639 languages where its > normalization ends up in the obsolete codes. This change intends to flip the > normalization

RFR: 8263202: Update Hebrew/Indonesian/Yiddish ISO 639 language codes to current

2021-05-17 Thread Naoto Sato
Please review the changes to the subject issue. java.util.Locale class has a long-standing issue for those obsolete ISO 639 languages where its normalization ends up in the obsolete codes. This change intends to flip the normalization towards the current codes, providing a system property for c

RFR: 8224158: assertion related to NPE at DynamicCallSiteDesc::withArgs should be reworded

2021-05-17 Thread Vicente Romero
This is a very small patch that is just rewording the spec for DynamicCallSiteDesc::withArgs. Basically adding that NPE can also be thrown if the content of the argument is `null` TIA for the review - Commit messages: - 8224158: assertion related to NPE at DynamicCallSiteDesc::wit

Re: RFR: 8264777: Overload optimized FileInputStream::readAllBytes [v8]

2021-05-17 Thread Brian Burkhalter
> Please consider this request to override the `java.io.InputStream` methods > `readAllBytes()` and `readNBytes(int)` in `FileInputStream` with more > performant implementations. The method overrides attempt to read all > requested bytes into a single array of the required size rather than > co

Re: RFR: 8266846: Add java.time.InstantSource

2021-05-17 Thread Stephen Colebourne
On Mon, 17 May 2021 14:13:06 GMT, Roger Riggs wrote: >> 8266846: Add java.time.InstantSource > > src/java.base/share/classes/java/time/InstantSource.java line 165: > >> 163: */ >> 164: static InstantSource fixed(Instant fixedInstant) { >> 165: return Clock.fixed(fixedInstant, Zo

Re: RFR: 8266846: Add java.time.InstantSource

2021-05-17 Thread Stephen Colebourne
On Mon, 17 May 2021 14:04:24 GMT, Roger Riggs wrote: >> 8266846: Add java.time.InstantSource > > src/java.base/share/classes/java/time/InstantSource.java line 36: > >> 34: * Instances of this interface are used to find the current instant. >> 35: * As such, an {@code InstantSource} can be used

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v21]

2021-05-17 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-412 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.java.net/jeps/412 Maurizio Cimadamore has updated the pull request

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v20]

2021-05-17 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-412 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.java.net/jeps/412 Maurizio Cimadamore has updated the pull request

Integrated: 8264561: javap get NegativeArraySizeException on bad instruction

2021-05-17 Thread Adam Sotona
On Mon, 17 May 2021 13:11:56 GMT, Adam Sotona wrote: > Actual javap implementation reacts on corrupted TABLESWITCH or LOOKUPSWITCH > bytecode instructions resulting to negative array allocation with > NegativeArraySizeException, which is reported to user with stack trace and as > serious inter

Re: RFR: 8266846: Add java.time.InstantSource

2021-05-17 Thread Ralph Goers
On Mon, 17 May 2021 07:50:22 GMT, Stephen Colebourne wrote: >> 8266846: Add java.time.InstantSource > > It would good to get confirmation in the review from @dholmes-ora or Mark > Kralj-Taylor that my changes to the precise system clock are correct. > Specifically, I moved the code from instan

Re: RFR: 8264561: javap get NegativeArraySizeException on bad instruction

2021-05-17 Thread Vicente Romero
On Mon, 17 May 2021 13:11:56 GMT, Adam Sotona wrote: > Actual javap implementation reacts on corrupted TABLESWITCH or LOOKUPSWITCH > bytecode instructions resulting to negative array allocation with > NegativeArraySizeException, which is reported to user with stack trace and as > serious inter

Re: RFR: 8266846: Add java.time.InstantSource

2021-05-17 Thread Roger Riggs
On Thu, 13 May 2021 20:52:33 GMT, Stephen Colebourne wrote: > 8266846: Add java.time.InstantSource Changes requested by rriggs (Reviewer). src/java.base/share/classes/java/time/Clock.java line 128: > 126: * Implementations should implement {@code Serializable} wherever > possible and must >

Re: RFR: 8153490: Cannot setBytes() if incoming buffer's length is bigger than number of elements we want to insert. [v3]

2021-05-17 Thread Mitsuru Kariya
> Fix `SerialBlob.setBytes(long pos, byte[] bytes, int offset, int length)` in > the following cases: > > 1. `pos - 1 + bytes.length - offset > this.length() && pos - 1 + length <= > this.length()` >The original implementation throws `ArrayIndexOutOfBoundsException` but > this case should e

Re: [External] : Re: JEP draft: Scope Locals

2021-05-17 Thread Brian Goetz
How so? How do I know if a snapshot of my variable has occurred? Let's back up a lot of steps; you're deep in proposing a solution when you've not even explained what problem you think you're solving.  So control question, which I hope will start to expose the assumptions:    Why do you t

Re: RFR: 8266054: VectorAPI rotate operation optimization [v6]

2021-05-17 Thread Jatin Bhateja
On Mon, 17 May 2021 12:06:33 GMT, Jatin Bhateja wrote: >> Current VectorAPI Java side implementation expresses rotateLeft and >> rotateRight operation using following operations:- >> >> vec1 = lanewise(VectorOperators.LSHL, n) >> vec2 = lanewise(VectorOperators.LSHR, n) >> res = lan

RFR: 8264561: javap get NegativeArraySizeException on bad instruction

2021-05-17 Thread Adam Sotona
Actual javap implementation reacts on corrupted TABLESWITCH or LOOKUPSWITCH bytecode instructions resulting to negative array allocation with NegativeArraySizeException, which is reported to user with stack trace and as serious internal error. The fix in c.s.t.classfile.Instruction is checking

Re: RFR: 8265783: Create a separate library for x86 Intel SVML assembly intrinsics [v4]

2021-05-17 Thread Erik Joelsson
On Sat, 15 May 2021 02:06:29 GMT, Sandhya Viswanathan wrote: >> This PR contains Short Vector Math Library support related changes for >> [JEP-414 Vector API (Second Incubator)](https://openjdk.java.net/jeps/414), >> in preparation for when targeted. >> >> Intel Short Vector Math Library (SVM

New java.util.Strings class

2021-05-17 Thread Alberto Otero Rodríguez
Hi, members of the core-libs developers of OpenJDK. I think Java needs a Strings class similar to the java.util.Objects class of Java 16 to be used in method arguments, return types and Stream filters. I have coded it myself here based on the Objects implementation of Java 16 (please have a loo

Re: RFR: 8266054: VectorAPI rotate operation optimization [v6]

2021-05-17 Thread Jatin Bhateja
> Current VectorAPI Java side implementation expresses rotateLeft and > rotateRight operation using following operations:- > > vec1 = lanewise(VectorOperators.LSHL, n) > vec2 = lanewise(VectorOperators.LSHR, n) > res = lanewise(VectorOperations.OR, vec1 , vec2) > > This patch moves a

Re: RFR: 8266846: Add java.time.InstantSource

2021-05-17 Thread Stephen Colebourne
On Thu, 13 May 2021 20:52:33 GMT, Stephen Colebourne wrote: > 8266846: Add java.time.InstantSource It would good to get confirmation in the review from @dholmes-ora or Mark Kralj-Taylor that my changes to the precise system clock are correct. Specifically, I moved the code from instance to st

Re: RFR: 8266846: Add java.time.InstantSource

2021-05-17 Thread Rémi Forax
On Mon, 17 May 2021 07:31:45 GMT, Stephen Colebourne wrote: >> src/java.base/share/classes/java/time/InstantSource.java line 93: >> >>> 91: * @since 17 >>> 92: */ >>> 93: public interface InstantSource { >> >> Should not we add `@FunctionalInterface`? I can easily imagine this >> interface

Re: RFR: 8266846: Add java.time.InstantSource

2021-05-17 Thread Stephen Colebourne
On Sat, 15 May 2021 21:32:54 GMT, Ralph Goers wrote: >> 8266846: Add java.time.InstantSource > > Can you possibly find a way that this can be used in a garbage free manner? > Providing a MutableInstant interface that allows the Instant object to be > provided and have its values set by a curr

Re: RFR: 8266846: Add java.time.InstantSource

2021-05-17 Thread Stephen Colebourne
On Sat, 15 May 2021 20:53:28 GMT, Istvan Neuwirth wrote: >> 8266846: Add java.time.InstantSource > > src/java.base/share/classes/java/time/InstantSource.java line 93: > >> 91: * @since 17 >> 92: */ >> 93: public interface InstantSource { > > Should not we add `@FunctionalInterface`? I can ea