Re: RFR: JDK-8264454 : Jaxp unit test from open jdk needs to be improved

2021-03-30 Thread Joe Wang
On Tue, 30 Mar 2021 16:56:57 GMT, Mahendra Chhipa wrote: > JDK-8264454 : Jaxp unit test from open jdk needs to be improved test/jaxp/javax/xml/jaxp/unittest/common/Bug6350682.java line 47: > 45: @Test > 46: public void testSAXParserFactory() { > 47: runWithAllPerm(() -> > Thre

Re: RFR: 8264109: Add vectorized implementation for VectorMask.andNot()

2021-03-30 Thread Xiaohong Gong
On Fri, 26 Mar 2021 01:50:33 GMT, Xiaohong Gong wrote: > Currently "VectorMask.andNot()" is not vectorized: > public VectorMask andNot(VectorMask m) { > // FIXME: Generate good code here. > return bOp(m, (i, a, b) -> a && !b); > } > This can be implemented with` "and(m.not

Re: Proposal for Decimal64 and Decimal128 value-based classes

2021-03-30 Thread Brian Goetz
They'll find a natural home in JDBC, since SQL has a native decimal type. On 3/30/2021 7:05 PM, Raffaello Giulietti wrote: As far as I can tell, scientific computation will make use of binary floating point numbers for a long time. Decimal floating point numbers are still limited to biz and f

Further review of java.util.HexFormat

2021-03-30 Thread Raffaello Giulietti
Hello Roger, these are the changes I'm proposing after reviewing the code of j.u.HexFormat. The modified code available here https://github.com/rgiulietti/jdk/commit/6759a25eb952ab19a045a83349d41b82cc1b07cb In addition to other smaller, hopefully self-explanatory enhancements, here are the r

Proposed: StringUTF16 bug fix with optimization - Part 2 of 2, Unit Tests

2021-03-30 Thread Chris Johnson
This is a patch for test class "CompareIC", providing 100% unit test coverage of the fixed "java.lang.StringUTF16" methods "compareToCI" and "regionMatchesCI" in part 1 of this proposed contribution. The tests also provide 100% coverage of the current implementations of those methods, and, if run

Proposed: StringUTF16 bug fix with optimization - Part 1 of 2, StringUTF16 Patch

2021-03-30 Thread Chris Johnson
Historically, the methods currently known as "compareToCI" and "regionMatchesCI", and located in "java.lang.StringUTF16", have lacked support for Supplementary Multilingual Plane code-points. (I've seen no associated bug.) On July 23, 2020 the first fix for the bug was committed. However, it inclu

Re: Proposal for Decimal64 and Decimal128 value-based classes

2021-03-30 Thread Paul Sandoz
> On Mar 30, 2021, at 4:05 PM, Raffaello Giulietti > wrote: > > Hi Paul, > > > On 2021-03-30 22:54, Paul Sandoz wrote: >>> On Mar 30, 2021, at 1:03 PM, Brian Goetz wrote: >>> >>> Overall, I'd be happy to see Decimal types that are aimed at "reasonable >>> precision" in addition to the inf

Re: Proposal for Decimal64 and Decimal128 value-based classes

2021-03-30 Thread Raffaello Giulietti
Ciao Maurizio, thanks for your interest. On 2021-03-30 23:01, Maurizio Cimadamore wrote: Add me to the list of interested folks. Will do. Such types are useful when interacting with System ABIs, and the Foreign Linker API needs "well-known" carrier which model these types in Java. There

Re: Proposal for Decimal64 and Decimal128 value-based classes

2021-03-30 Thread Raffaello Giulietti
Hi Paul, On 2021-03-30 22:54, Paul Sandoz wrote: On Mar 30, 2021, at 1:03 PM, Brian Goetz wrote: Overall, I'd be happy to see Decimal types that are aimed at "reasonable precision" in addition to the infinite precision that BD offers. (After Valhalla, of course.) Yes, me too. Raffae

Re: Proposal for Decimal64 and Decimal128 value-based classes

2021-03-30 Thread Raffaello Giulietti
There's no strict need for Valhalla, as they are more compact and faster than BigDecimal even today. On 2021-03-30 22:03, Brian Goetz wrote: Overall, I'd be happy to see Decimal types that are aimed at "reasonable precision" in addition to the infinite precision that BD offers.  (After Valhal

Re: Proposal for Decimal64 and Decimal128 value-based classes

2021-03-30 Thread Raffaello Giulietti
Hi Joe, On 2021-03-30 21:56, Joe Darcy wrote: Hi Raffaello, On 3/29/2021 1:14 PM, Raffaello Giulietti wrote: Hello, Assuming you have DecimalN <-> BigDecimal conversions, the BigDecimal type should be usable for testing at least. For in-range values not near the exponent range, the scale

Re: RFR: 8264397: Use the blessed modifier order in jdk.incubator.foreign

2021-03-30 Thread Alex Blewitt
On Tue, 30 Mar 2021 11:48:36 GMT, Maurizio Cimadamore wrote: >> Happy to submit a fix elsewhere if that's the right thing to do? > > Hi @alblue, thanks for the contribution. We will make sure to integrate this > at some point, but I don't think now is the right moment to do this kind of > styl

Re: Proposal for Decimal64 and Decimal128 value-based classes

2021-03-30 Thread Maurizio Cimadamore
Add me to the list of interested folks. Such types are useful when interacting with System ABIs, and the Foreign Linker API needs "well-known" carrier which model these types in Java. There are also other interesting types to be explored in that domain, such as Long128, LongDouble (extended pr

Re: Proposal for Decimal64 and Decimal128 value-based classes

2021-03-30 Thread Paul Sandoz
> On Mar 30, 2021, at 1:03 PM, Brian Goetz wrote: > > Overall, I'd be happy to see Decimal types that are aimed at "reasonable > precision" in addition to the infinite precision that BD offers. (After > Valhalla, of course.) > Yes, me too. Raffaello, as an experiment you could develop suc

Re: Proposal for Decimal64 and Decimal128 value-based classes

2021-03-30 Thread Brian Goetz
Overall, I'd be happy to see Decimal types that are aimed at "reasonable precision" in addition to the infinite precision that BD offers.  (After Valhalla, of course.) On 3/29/2021 4:14 PM, Raffaello Giulietti wrote: Hello, I'm experimenting with an implementation of Decimal64 and Decimal12

Integrated: 8264148: Update spec for exceptions retrofitted for exception chaining

2021-03-30 Thread Joe Darcy
On Wed, 24 Mar 2021 23:17:46 GMT, Joe Darcy wrote: > 8264148: Update spec for exceptions retrofitted for exception chaining This pull request has now been integrated. Changeset: 815248ab Author:Joe Darcy URL: https://git.openjdk.java.net/jdk/commit/815248ab Stats: 84 lines in 22

Re: Proposal for Decimal64 and Decimal128 value-based classes

2021-03-30 Thread Joe Darcy
On 3/29/2021 6:13 PM, Suminda Sirinath Salpitikorala Dharmasena wrote: This would be interesting to have. It would be better if the full set of numbers b16-256 and d32-128 are implemented so there is full coverage of all IEEE 754 numbers. FYI, if one is need of such code in C today, you can lo

Re: Proposal for Decimal64 and Decimal128 value-based classes

2021-03-30 Thread Joe Darcy
Hi Raffaello, On 3/29/2021 1:14 PM, Raffaello Giulietti wrote: Hello, I'm experimenting with an implementation of Decimal64 and Decimal128, two standard IEEE 754-2019 formats supporting, well, decimal floating point numbers of up to 16 resp 34 decimal digits. Fun project! While BigDecima

Integrated: 8264326: Modernize javax.script.ScriptEngineManager and related classes' implementation

2021-03-30 Thread Attila Szegedi
On Sat, 27 Mar 2021 15:19:37 GMT, Attila Szegedi wrote: > I noticed that `javax.script.ScriptEngineManager` `getEngineByXxx` methods > had a lot of code duplication among themselves, and even within each method. > I refactored them into a modern unified implementation. While there I also > too

Re: RFR: 8264326: Modernize javax.script.ScriptEngineManager and related classes' implementation [v2]

2021-03-30 Thread Attila Szegedi
On Tue, 30 Mar 2021 12:43:18 GMT, Athijegannathan Sundararajan wrote: >> Attila Szegedi has refreshed the contents of this pull request, and previous >> commits have been removed. The incremental views will show differences >> compared to the previous content of the PR. The pull request contai

Integrated: 8262503: Support records in Dynalink

2021-03-30 Thread Attila Szegedi
On Sun, 28 Feb 2021 16:46:31 GMT, Attila Szegedi wrote: > 8262503: Support records in Dynalink This pull request has now been integrated. Changeset: b08d6383 Author:Attila Szegedi URL: https://git.openjdk.java.net/jdk/commit/b08d6383 Stats: 165 lines in 8 files changed: 153 ins;

Re: RFR: 8262503: Support records in Dynalink

2021-03-30 Thread Attila Szegedi
On Tue, 30 Mar 2021 12:38:41 GMT, Athijegannathan Sundararajan wrote: >> 8262503: Support records in Dynalink > > Looks good Thank you for the review, @sundararajana! - PR: https://git.openjdk.java.net/jdk/pull/2767

Re: RFR: 8264148: Update spec for exceptions retrofitted for exception chaining

2021-03-30 Thread Stuart Marks
On Wed, 24 Mar 2021 23:17:46 GMT, Joe Darcy wrote: > 8264148: Update spec for exceptions retrofitted for exception chaining Marked as reviewed by smarks (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/3182

RFR: JDK-8264454 : Jaxp unit test from open jdk needs to be improved

2021-03-30 Thread Mahendra Chhipa
JDK-8264454 : Jaxp unit test from open jdk needs to be improved - Commit messages: - JDK-8264454 : Jaxp unit test from open jdk needs to be improved - JDK-8064681 : Jaxp unit test need to be improved Changes: https://git.openjdk.java.net/jdk/pull/3274/files Webrev: https://webrevs

Re: Insufficiencies in JEP: 400: UTF-8 by Default

2021-03-30 Thread Anthony Vanelverdinghe
Hi Alan As Marco mentioned, another use case is sub-process stdin/stdout/stderr. In my particular instance, I'm starting a Process which has its output redirected to a file. It uses the platform's default encoding for writing to stdout. So when I want to read its output from the file at some la

Re: RFR: 8264148: Update spec for exceptions retrofitted for exception chaining

2021-03-30 Thread Joe Darcy
On 3/30/2021 6:29 AM, Roger Riggs wrote: On Wed, 24 Mar 2021 23:17:46 GMT, Joe Darcy wrote: 8264148: Update spec for exceptions retrofitted for exception chaining I agree that the public field in WriteAbortedException could be remediated. But it is also mostly harmless. src/jdk.hotspot.age

Re: RFR: 8264148: Update spec for exceptions retrofitted for exception chaining

2021-03-30 Thread Joe Darcy
On 3/30/2021 6:43 AM, jmehrens wrote: On Wed, 24 Mar 2021 23:17:46 GMT, Joe Darcy wrote: 8264148: Update spec for exceptions retrofitted for exception chaining src/java.base/share/classes/java/io/WriteAbortedException.java line 86: 84: @Override 85: public Throwable getCause() { 8

Withdrawn: JDK-8064681 : Jaxp unit test need to be improved

2021-03-30 Thread Mahendra Chhipa
On Mon, 22 Mar 2021 10:35:03 GMT, Mahendra Chhipa wrote: > https://bugs.openjdk.java.net/browse/JDK-8064681 This pull request has been closed without being integrated. - PR: https://git.openjdk.java.net/jdk/pull/3115

Re: RFR: JDK-8064681 : Jaxp unit test need to be improved

2021-03-30 Thread Mahendra Chhipa
On Wed, 24 Mar 2021 14:47:56 GMT, Mark Sheppard wrote: >> https://bugs.openjdk.java.net/browse/JDK-8064681 > > the tests set a system property and then clear that system property at the > end of the test. Is it always the case that the property being set in the > test does not have a value pri

Re: RFR: 8264148: Update spec for exceptions retrofitted for exception chaining

2021-03-30 Thread jmehrens
On Wed, 24 Mar 2021 23:17:46 GMT, Joe Darcy wrote: > 8264148: Update spec for exceptions retrofitted for exception chaining src/java.base/share/classes/java/io/WriteAbortedException.java line 86: > 84: @Override > 85: public Throwable getCause() { > 86: return detail; Use Suppr

Re: RFR: 8264148: Update spec for exceptions retrofitted for exception chaining

2021-03-30 Thread Roger Riggs
On Wed, 24 Mar 2021 23:17:46 GMT, Joe Darcy wrote: > 8264148: Update spec for exceptions retrofitted for exception chaining I agree that the public field in WriteAbortedException could be remediated. But it is also mostly harmless. src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/VMO

RFR: 8264277: java.xml.crypto module should be granted FilePermission and SocketPermission

2021-03-30 Thread Weijun Wang
These permissions are needed so that the URIDereferencer is able to read data from a file system or a network. As the test shows, you still have to grant the same type of permission to your application. - Depends on: https://git.openjdk.java.net/jdk/pull/3181 Commit messages: - 82

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

2021-03-30 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: 8264326: Modernize javax.script.ScriptEngineManager and related classes' implementation [v2]

2021-03-30 Thread Athijegannathan Sundararajan
On Sun, 28 Mar 2021 13:38:51 GMT, Attila Szegedi wrote: >> I noticed that `javax.script.ScriptEngineManager` `getEngineByXxx` methods >> had a lot of code duplication among themselves, and even within each method. >> I refactored them into a modern unified implementation. While there I also >>

Re: RFR: 8262503: Support records in Dynalink

2021-03-30 Thread Athijegannathan Sundararajan
On Sun, 28 Feb 2021 16:46:31 GMT, Attila Szegedi wrote: > 8262503: Support records in Dynalink Looks good - Marked as reviewed by sundar (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/2767

Re: RFR: 8264397: Use the blessed modifier order in jdk.incubator.foreign

2021-03-30 Thread Maurizio Cimadamore
On Tue, 30 Mar 2021 08:14:58 GMT, Alex Blewitt wrote: >> This one should probably be fixed in the upstream repo over at >> https://github.com/openjdk/panama-foreign (I believe). /ping @JornVernee >> @mcimadamore > > Happy to submit a fix elsewhere if that's the right thing to do? Hi @alblue,

RFR: 8264048: Fix caching in Jar URL connections when an entry is missing

2021-03-30 Thread Aleksei Efimov
Current fix tries to tackle an issue with URL connection referencing non-existing Jar file entries: If an entry that doesn't exist is specified in an URL connection the underlying Jar file is still cached even if an exception is thrown after that. Such behavior prevents the caller, for instance,

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

2021-03-30 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: 8248862: Implement Enhanced Pseudo-Random Number Generators [v31]

2021-03-30 Thread Jim Laskey
On Thu, 18 Mar 2021 12:57:16 GMT, Jim Laskey wrote: >> src/java.base/share/classes/jdk/internal/util/random/RandomSupport.java line >> 62: >> >>> 60: @Retention(RetentionPolicy.RUNTIME) >>> 61: @Target(ElementType.TYPE) >>> 62: public @interface RandomGeneratorProperties { >> >> Sh

Proposal for Decimal64 and Decimal128 value-based classes

2021-03-30 Thread Raffaello Giulietti
Hi, the intent of this proposal is to have numerical classes for *business and financial applications*, not to implement the IEEE 754-2019 spec for the sake of full coverage. The goal is to have numerical classes that are lighter-weight and more efficient in terms of storage space and comput

Re: RFR: 8264397: Use the blessed modifier order in jdk.incubator.foreign

2021-03-30 Thread Alex Blewitt
On Mon, 29 Mar 2021 23:54:19 GMT, Claes Redestad wrote: >> 8264397: Use the blessed modifier order in jdk.incubator.foreign > > This one should probably be fixed in the upstream repo over at > https://github.com/openjdk/panama-foreign (I believe). /ping @JornVernee > @mcimadamore Happy to subm