Re: RFR: JDK-8277520: Implement JDK-8 default methods for IdentityHashMap [v4]

2022-04-20 Thread ExE Boss
On Mon, 21 Feb 2022 23:36:19 GMT, liach wrote: >> Might need a CSR as now `computeIfAbsent` `computeIfPresent` `compute` >> `merge` would throw CME if the functions modified the map itself, and there >> are corresponding specification changes. > > liach has updated the pull request

Re: RFR: 8284992: Fix misleading Vector API doc for LSHR operator

2022-04-20 Thread Jie Fu
On Wed, 20 Apr 2022 17:24:56 GMT, Paul Sandoz wrote: > We can raise attention to that: > > ``` > /** Produce {@code a>>>(n&(ESIZE*8-1))} > * (The operand and result are converted if the operand type is {@code byte} > or {@code short}, see below). Integral only. > * ... > */ > ``` It

Re: RFR: 8178355: IdentityHashMap uses identity-based comparison for values everywhere except remove(K,V) and replace(K,V,V) [v2]

2022-04-20 Thread liach
> Explicitly implement `remove` and `replace` in `IdentityHashMap` to compare > values by identity. Updated API documentation of these two methods > ([Preview](https://cr.openjdk.java.net/~liach/8178355/IdentityHashMap.html#remove(java.lang.Object,java.lang.Object))) > to mention such behavior.

Re: RFR: 8284992: Fix misleading Vector API doc for LSHR operator [v2]

2022-04-20 Thread Jie Fu
> Hi all, > > The Current Vector API doc for `LSHR` is > > Produce a>>>(n&(ESIZE*8-1)). Integral only. > > > This is misleading which may lead to bugs for Java developers. > This is because for negative byte/short elements, the results computed by > `LSHR` will be different from that of

Re: RFR: 8279598: Provide adapter from RandomGenerator to Random [v20]

2022-04-20 Thread Yasser Bazzi
> Hi, could i get a review on this implementation proposed by Stuart Marks, i > decided to use the > https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/random/RandomGenerator.html > interface to create the default method `asRandom()` that wraps around the > newer algorithms

Re: RFR: 8279598: Provide adapter from RandomGenerator to Random [v19]

2022-04-20 Thread Yasser Bazzi
On Wed, 16 Mar 2022 14:54:41 GMT, Yasser Bazzi wrote: >> Hi, could i get a review on this implementation proposed by Stuart Marks, i >> decided to use the >> https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/random/RandomGenerator.html >> interface to create the default

Re: RFR: 8284942: Proxy building can just iterate superinterfaces once [v2]

2022-04-20 Thread liach
> Currently, in ProxyBuilder::mapToModule and ProxyBuilder::defineProxyClass, > the interfaces are iterated twice. The two passes can be merged into one, > yielding the whole proxy definition context (module, package, whether there's > package-private interface) when determining the module. >

Re: RFR: 8284992: Fix misleading Vector API doc for LSHR operator

2022-04-20 Thread Jie Fu
On Tue, 19 Apr 2022 08:41:50 GMT, Jie Fu wrote: > Hi all, > > The Current Vector API doc for `LSHR` is > > Produce a>>>(n&(ESIZE*8-1)). Integral only. > > > This is misleading which may lead to bugs for Java developers. > This is because for negative byte/short elements, the results computed

Re: RFR: 8178355: IdentityHashMap uses identity-based comparison for values everywhere except remove(K,V) and replace(K,V,V)

2022-04-20 Thread liach
On Thu, 21 Apr 2022 01:01:25 GMT, Stuart Marks wrote: >> Explicitly implement `remove` and `replace` in `IdentityHashMap` to compare >> values by identity. Updated API documentation of these two methods >>

Re: RFR: 8178355: IdentityHashMap uses identity-based comparison for values everywhere except remove(K,V) and replace(K,V,V)

2022-04-20 Thread Stuart Marks
On Fri, 15 Apr 2022 05:58:32 GMT, liach wrote: > Explicitly implement `remove` and `replace` in `IdentityHashMap` to compare > values by identity. Updated API documentation of these two methods >

Re: RFR: 8178355: IdentityHashMap uses identity-based comparison for values everywhere except remove(K,V) and replace(K,V,V)

2022-04-20 Thread Stuart Marks
On Fri, 15 Apr 2022 05:58:32 GMT, liach wrote: > Explicitly implement `remove` and `replace` in `IdentityHashMap` to compare > values by identity. Updated API documentation of these two methods >

Re: RFR: 8178355: IdentityHashMap uses identity-based comparison for values everywhere except remove(K,V) and replace(K,V,V)

2022-04-20 Thread Stuart Marks
On Fri, 15 Apr 2022 05:58:32 GMT, liach wrote: > Explicitly implement `remove` and `replace` in `IdentityHashMap` to compare > values by identity. Updated API documentation of these two methods >

Re: RFR: 8178355: IdentityHashMap uses identity-based comparison for values everywhere except remove(K,V) and replace(K,V,V)

2022-04-20 Thread Stuart Marks
On Fri, 15 Apr 2022 05:58:32 GMT, liach wrote: > Explicitly implement `remove` and `replace` in `IdentityHashMap` to compare > values by identity. Updated API documentation of these two methods >

Re: RFR: 8284930: Re-examine FilterInputStream mark/reset [v2]

2022-04-20 Thread Stuart Marks
On Wed, 20 Apr 2022 15:33:26 GMT, Brian Burkhalter wrote: >> Remove the `synchronized` keyword from the `mark(int)` and `reset()` methods >> of `java.io.FilterInputStream`. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: >

Re: RFR: 8284930: Re-examine FilterInputStream mark/reset [v2]

2022-04-20 Thread Brian Burkhalter
On Thu, 21 Apr 2022 00:00:47 GMT, Stuart Marks wrote: > > I think it's a vanishingly small possibility that anything is relying on the > synchronization in these methods. Synchronization here would provide proper > memory visibility effects across threads. To use input streams from multiple

Re: RFR: 8284930: Re-examine FilterInputStream mark/reset [v2]

2022-04-20 Thread Stuart Marks
On Wed, 20 Apr 2022 15:33:26 GMT, Brian Burkhalter wrote: >> Remove the `synchronized` keyword from the `mark(int)` and `reset()` methods >> of `java.io.FilterInputStream`. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: >

RFR: 8283324: CLDRConverter run time increased by 3x

2022-04-20 Thread Naoto Sato
Fixing performance regression caused by the fix to https://bugs.openjdk.java.net/browse/JDK-8176706. The fix introduced extra looping through the resource map multiple times which was not necessary. The execution time of the tool now got back on par with close to JDK18. - Commit

Integrated: 8284548: Invalid XPath expression causes StringIndexOutOfBoundsException

2022-04-20 Thread Joe Wang
On Wed, 20 Apr 2022 20:08:01 GMT, Joe Wang wrote: > Patch note: > > A previous patch had a bug that missed the boundary check, that will cause > StringIndexOutOfBoundsException to be thrown instead of > XPathExpressionException as expected. > > Fix: the fix is to check the boundaries of

Re: RFR: 8284548: Invalid XPath expression causes StringIndexOutOfBoundsException [v2]

2022-04-20 Thread Lance Andersen
On Wed, 20 Apr 2022 21:53:46 GMT, Joe Wang wrote: >> Patch note: >> >> A previous patch had a bug that missed the boundary check, that will cause >> StringIndexOutOfBoundsException to be thrown instead of >> XPathExpressionException as expected. >> >> Fix: the fix is to check the

Re: RFR: 8284548: Invalid XPath expression causes StringIndexOutOfBoundsException [v2]

2022-04-20 Thread Joe Wang
> Patch note: > > A previous patch had a bug that missed the boundary check, that will cause > StringIndexOutOfBoundsException to be thrown instead of > XPathExpressionException as expected. > > Fix: the fix is to check the boundaries of the parameter "index". > Objects.checkIndex is

Re: RFR: 8285255: refine StringLatin1.regionMatchesCI_UTF16 [v3]

2022-04-20 Thread XenoAmess
On Wed, 20 Apr 2022 21:19:14 GMT, Roger Riggs wrote: >> XenoAmess has updated the pull request incrementally with one additional >> commit since the last revision: >> >> remove = check > > Can you run the JMH against the code before either change (or an existing > JDK). > It would be

Re: Improve `finally` block exception handling

2022-04-20 Thread some-java-user-99206970363698485155
Thanks a lot for your feedback! My original message was a bit vague in parts, sorry for that. The proposal consists of the following: 1. Forbidding usage of `break`, `continue`, `yield` and `return` in `finally` blocks 2. Adding exceptions as suppressed exceptions: If exception E1 led to

Re: RFR: 8285255: refine StringLatin1.regionMatchesCI_UTF16 [v3]

2022-04-20 Thread Roger Riggs
On Wed, 20 Apr 2022 21:08:19 GMT, XenoAmess wrote: >> some thoughts after watching 8285001: Simplify StringLatin1.regionMatches >> https://github.com/openjdk/jdk/pull/8292/ >> >> if (Character.toLowerCase(u1) == Character.toLowerCase(u2)) { >> continue; >>

Re: RFR: 8285255: refine StringLatin1.regionMatchesCI_UTF16 [v2]

2022-04-20 Thread XenoAmess
On Wed, 20 Apr 2022 20:56:50 GMT, Roger Riggs wrote: >> XenoAmess has updated the pull request incrementally with one additional >> commit since the last revision: >> >> add jmh test > > Thanks for the JMH tests and data. > > The only part needed from the JMH run is the last 9 lines. The

Re: RFR: 8285255: refine StringLatin1.regionMatchesCI_UTF16 [v3]

2022-04-20 Thread XenoAmess
> some thoughts after watching 8285001: Simplify StringLatin1.regionMatches > https://github.com/openjdk/jdk/pull/8292/ > > if (Character.toLowerCase(u1) == Character.toLowerCase(u2)) { > continue; > } > > should be changed to > > if (((u1

Re: RFR: 8285255: refine StringLatin1.regionMatchesCI_UTF16 [v2]

2022-04-20 Thread Roger Riggs
On Wed, 20 Apr 2022 20:09:06 GMT, XenoAmess wrote: >> some thoughts after watching 8285001: Simplify StringLatin1.regionMatches >> https://github.com/openjdk/jdk/pull/8292/ >> >> if (Character.toLowerCase(u1) == Character.toLowerCase(u2)) { >> continue; >>

Re: RFR: 8282274: Compiler implementation for Pattern Matching for switch (Third Preview) [v5]

2022-04-20 Thread Jan Lahoda
On Wed, 20 Apr 2022 14:50:42 GMT, Vicente Romero wrote: > nit: just ran langtools tests as part of my routine and these seem to be > failing, `CheckExamples.java` due to: > > ``` > test/langtools/tools/javac/diags/examples/FeatureTotalPatternsInInstanceof.java > and >

Re: RFR: 8284548: Invalid XPath expression causes StringIndexOutOfBoundsException

2022-04-20 Thread Naoto Sato
On Wed, 20 Apr 2022 20:08:01 GMT, Joe Wang wrote: > Patch note: > > A previous patch had a bug that missed the boundary check, that will > cause StringIndexOutOfBoundsException to be thrown instead of > XPathExpressionException as expected. > > Fix: the fix is to check the boundaries

Re: RFR: 8285255: refine StringLatin1.regionMatchesCI_UTF16 [v2]

2022-04-20 Thread XenoAmess
On Wed, 20 Apr 2022 20:09:06 GMT, XenoAmess wrote: >> some thoughts after watching 8285001: Simplify StringLatin1.regionMatches >> https://github.com/openjdk/jdk/pull/8292/ >> >> if (Character.toLowerCase(u1) == Character.toLowerCase(u2)) { >> continue; >>

RFR: 8284548: Invalid XPath expression causes StringIndexOutOfBoundsException

2022-04-20 Thread Joe Wang
Patch note: A previous patch had a bug that missed the boundary check, that will cause StringIndexOutOfBoundsException to be thrown instead of XPathExpressionException as expected. Fix: the fix is to check the boundaries of the parameter "index". Objects.checkIndex is removed as it's

Re: RFR: 8285255: refine StringLatin1.regionMatchesCI_UTF16

2022-04-20 Thread XenoAmess
On Tue, 19 Apr 2022 21:15:29 GMT, XenoAmess wrote: > some thoughts after watching 8285001: Simplify StringLatin1.regionMatches > https://github.com/openjdk/jdk/pull/8292/ > > if (Character.toLowerCase(u1) == Character.toLowerCase(u2)) { > continue; > }

Re: RFR: 8285255: refine StringLatin1.regionMatchesCI_UTF16 [v2]

2022-04-20 Thread XenoAmess
> some thoughts after watching 8285001: Simplify StringLatin1.regionMatches > https://github.com/openjdk/jdk/pull/8292/ > > if (Character.toLowerCase(u1) == Character.toLowerCase(u2)) { > continue; > } > > should be changed to > > if (((u1

Re: RFR: 8284930: Re-examine FilterInputStream mark/reset [v2]

2022-04-20 Thread Joe Darcy
On Wed, 20 Apr 2022 18:40:13 GMT, Alan Bateman wrote: > Thanks for the update. I can't think how anything could depend on this but > unfortunately it's been like that since early JDK releases. We will need a > release note, I'm sure Joe will give his opinion on whether a CSR should be >

Re: [External] : Re: jpackage usage problems

2022-04-20 Thread Hiran Chaudhuri
On Wed, 2022-04-20 at 12:38 -0400, Alexey Semenyuk wrote: > > On 4/18/2022 7:06 PM, Hiran Chaudhuri wrote: > > On Mon, 2022-04-18 at 18:41 -0400, Alexey Semenyuk wrote: > > > I've filed [1] and [2] CRs to track the issues. > > > > > > [1] https://bugs.openjdk.java.net/browse/JDK-8284973 > > > [2]

RFR: 8285285: Avoid redundant allocations in WindowsPreferences

2022-04-20 Thread Andrey Turbanov
1. No need to call `String.substring` if you need need to compare start of string with some constant. `String.startWith` suites better. 2. Unused String array is allocated in `childrenNamesSpi` method - Commit messages: - [PATCH] Avoid redundant allocations in WindowsPreferences -

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v8]

2022-04-20 Thread XenoAmess
> as title. XenoAmess has updated the pull request incrementally with one additional commit since the last revision: add more replaces - Changes: - all: https://git.openjdk.java.net/jdk/pull/8302/files - new:

Integrated: 8284920: Incorrect Token type causes XPath expression to return incorrect results

2022-04-20 Thread Joe Wang
On Wed, 20 Apr 2022 17:40:24 GMT, Joe Wang wrote: > Patch note: > > The previous patch changed all literal tokens to use constants. However, > replacing "." with Token.DOT introduced this bug. > While tokens with a single char are inherently of type char, due to the > different

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v7]

2022-04-20 Thread XenoAmess
> as title. XenoAmess has updated the pull request incrementally with one additional commit since the last revision: add more replaces - Changes: - all: https://git.openjdk.java.net/jdk/pull/8302/files - new:

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v6]

2022-04-20 Thread XenoAmess
> as title. XenoAmess has updated the pull request incrementally with two additional commits since the last revision: - add more replaces - add more replaces - Changes: - all: https://git.openjdk.java.net/jdk/pull/8302/files - new:

Re: RFR: 8283660: Convert com/sun/jndi/ldap/AbstractLdapNamingEnumeration.java finalizer to Cleaner

2022-04-20 Thread Roger Riggs
On Wed, 20 Apr 2022 00:32:25 GMT, Brent Christian wrote: > Please review this change to replace the finalizer in > `AbstractLdapNamingEnumeration` with a Cleaner. > > The pieces of state required for cleanup (`LdapCtx homeCtx`, `LdapResult > res`, and `LdapClient enumClnt`) are moved to a

Re: RFR: 8283660: Convert com/sun/jndi/ldap/AbstractLdapNamingEnumeration.java finalizer to Cleaner

2022-04-20 Thread Roger Riggs
On Wed, 20 Apr 2022 00:32:25 GMT, Brent Christian wrote: > Please review this change to replace the finalizer in > `AbstractLdapNamingEnumeration` with a Cleaner. > > The pieces of state required for cleanup (`LdapCtx homeCtx`, `LdapResult > res`, and `LdapClient enumClnt`) are moved to a

Integrated: 8282120: optimal capacity tests and test library need to be cleaned up

2022-04-20 Thread Stuart Marks
On Tue, 19 Apr 2022 18:12:04 GMT, Stuart Marks wrote: > The test `java/lang/Enum/ConstantDirectoryOptimalCapacity.java` was > problem-listed by > [JDK-8281631](https://bugs.openjdk.java.net/browse/JDK-8281631) and > essentially superseded by >

Re: RFR: 8284920: Incorrect Token type causes XPath expression to return incorrect results [v2]

2022-04-20 Thread Lance Andersen
On Wed, 20 Apr 2022 18:28:19 GMT, Joe Wang wrote: >> Patch note: >> >> The previous patch changed all literal tokens to use constants. However, >> replacing "." with Token.DOT introduced this bug. >> While tokens with a single char are inherently of type char, due to the >> different

Re: RFR: 8284950: CgroupV1 detection code should consider memory.swappiness [v2]

2022-04-20 Thread Severin Gehwolf
On Wed, 20 Apr 2022 18:18:25 GMT, xpbob wrote: >> set memory.swappiness to 0,swap space will not be used >> determine the value of memory.swappiness >> https://www.kernel.org/doc/Documentation/cgroup-v1/memory.txt >> >> >> Memory Limit: 50.00M >> Memory Soft Limit: Unlimited >>

Re: RFR: 8284930: Re-examine FilterInputStream mark/reset [v2]

2022-04-20 Thread Alan Bateman
On Wed, 20 Apr 2022 15:33:26 GMT, Brian Burkhalter wrote: >> Remove the `synchronized` keyword from the `mark(int)` and `reset()` methods >> of `java.io.FilterInputStream`. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: >

Re: RFR: 8284920: Incorrect Token type causes XPath expression to return incorrect results [v2]

2022-04-20 Thread Naoto Sato
On Wed, 20 Apr 2022 18:28:19 GMT, Joe Wang wrote: >> Patch note: >> >> The previous patch changed all literal tokens to use constants. However, >> replacing "." with Token.DOT introduced this bug. >> While tokens with a single char are inherently of type char, due to the >> different

Re: RFR: 8284920: Incorrect Token type causes XPath expression to return incorrect results [v2]

2022-04-20 Thread Joe Wang
> Patch note: > > The previous patch changed all literal tokens to use constants. However, > replacing "." with Token.DOT introduced this bug. > While tokens with a single char are inherently of type char, due to the > different implementation of the overloaded method "tokenIs" that takes

Re: RFR: 8284950: Swappiness disables swap space usage [v2]

2022-04-20 Thread xpbob
> set memory.swappiness to 0,swap space will not be used > determine the value of memory.swappiness > https://www.kernel.org/doc/Documentation/cgroup-v1/memory.txt > > > Memory Limit: 50.00M > Memory Soft Limit: Unlimited > Memory & Swap Limit: 100.00M > Maximum Processes Limit:

RFR: 8284920: Incorrect Token type causes XPath expression to return incorrect results

2022-04-20 Thread Joe Wang
Patch note: The previous patch changed all literal tokens to use constants. However, replacing "." with Token.DOT introduced this bug. While tokens with a single char are inherently of type char, due to the different implementation of the overloaded method "tokenIs" that takes String or char,

Re: RFR: 8285255: refine StringLatin1.regionMatchesCI_UTF16

2022-04-20 Thread Roger Riggs
On Tue, 19 Apr 2022 21:15:29 GMT, XenoAmess wrote: > some thoughts after watching 8285001: Simplify StringLatin1.regionMatches > https://github.com/openjdk/jdk/pull/8292/ > > if (Character.toLowerCase(u1) == Character.toLowerCase(u2)) { > continue; > }

Re: RFR: 8285255: refine StringLatin1.regionMatchesCI_UTF16

2022-04-20 Thread XenoAmess
On Wed, 20 Apr 2022 16:50:06 GMT, Roger Riggs wrote: > Point 1 make sense. Point 2 adds a branch and branches aren't free. Can you > show some jmh data for these cases? @RogerRiggs Bad news is I don't know how to make a jmh benchmark for a not-public class... - PR:

Re: RFR: 8284992: Fix misleading Vector API doc for LSHR operator

2022-04-20 Thread Paul Sandoz
On Tue, 19 Apr 2022 08:41:50 GMT, Jie Fu wrote: > Hi all, > > The Current Vector API doc for `LSHR` is > > Produce a>>>(n&(ESIZE*8-1)). Integral only. > > > This is misleading which may lead to bugs for Java developers. > This is because for negative byte/short elements, the results computed

Re: RFR: 8282274: Compiler implementation for Pattern Matching for switch (Third Preview) [v5]

2022-04-20 Thread Vicente Romero
On Tue, 19 Apr 2022 18:47:16 GMT, Jan Lahoda wrote: >> This is a (preliminary) patch for javac implementation for the third preview >> of pattern matching for switch (type patterns in switches). >> >> Draft JLS: >>

Integrated: JDK-8281006 Module::getResourceAsStream should check if the resource is open unconditionally when caller is null

2022-04-20 Thread Tim Prinzing
On Thu, 7 Apr 2022 00:38:07 GMT, Tim Prinzing wrote: > Created a test called NullCallerGetResource to test > Module::getResourceAsStream and Class::getResourceAsStream from the native > level. > > At the java level the test builds a test module called 'n' which opens the > package 'open' to

Re: RFR: JDK-8281006 Module::getResourceAsStream should check if the resource is open unconditionally when caller is null [v5]

2022-04-20 Thread Mandy Chung
On Wed, 20 Apr 2022 01:03:23 GMT, Tim Prinzing wrote: >> Created a test called NullCallerGetResource to test >> Module::getResourceAsStream and Class::getResourceAsStream from the native >> level. >> >> At the java level the test builds a test module called 'n' which opens the >> package

Re: RFR: 8285255: refine StringLatin1.regionMatchesCI_UTF16

2022-04-20 Thread Roger Riggs
On Tue, 19 Apr 2022 21:15:29 GMT, XenoAmess wrote: > some thoughts after watching 8285001: Simplify StringLatin1.regionMatches > https://github.com/openjdk/jdk/pull/8292/ > > if (Character.toLowerCase(u1) == Character.toLowerCase(u2)) { > continue; > }

Re: RFR: 8284638: store skip buffers in InputStream Object [v12]

2022-04-20 Thread XenoAmess
> @jmehrens what about this then? > I think it safe now(actually this mechanism is learned from Reader) XenoAmess has updated the pull request incrementally with one additional commit since the last revision: add documents - Changes: - all:

Re: RFR: 8284638: store skip buffers in InputStream Object [v9]

2022-04-20 Thread XenoAmess
On Wed, 20 Apr 2022 16:35:25 GMT, liach wrote: >> XenoAmess has updated the pull request incrementally with one additional >> commit since the last revision: >> >> remove uselsee MIN_SKIP_BUFFER_SIZE > > src/java.base/share/classes/java/io/InputStream.java line 62: > >> 60: >> 61:

Re: RFR: 8284638: store skip buffers in InputStream Object [v11]

2022-04-20 Thread XenoAmess
> @jmehrens what about this then? > I think it safe now(actually this mechanism is learned from Reader) XenoAmess has updated the pull request incrementally with one additional commit since the last revision: skipBufferReference(long) -> skipBufferReference(int) - Changes: -

Re: RFR: 8284638: store skip buffers in InputStream Object [v9]

2022-04-20 Thread liach
On Wed, 20 Apr 2022 16:30:19 GMT, XenoAmess wrote: >> @jmehrens what about this then? >> I think it safe now(actually this mechanism is learned from Reader) > > XenoAmess has updated the pull request incrementally with one additional > commit since the last revision: > > remove uselsee

Re: RFR: 8284638: store skip buffers in InputStream Object [v7]

2022-04-20 Thread XenoAmess
On Tue, 19 Apr 2022 22:37:21 GMT, jmehrens wrote: >>> > @jmehrens what about this then? I think it safe now(actually this >>> > mechanism is learned from Reader) >>> >>> Reader uses a lock object and it appears that InputStream locks on this >>> (per make/reset) I would assume now that you

Re: RFR: 8284638: store skip buffers in InputStream Object [v10]

2022-04-20 Thread XenoAmess
> @jmehrens what about this then? > I think it safe now(actually this mechanism is learned from Reader) XenoAmess has updated the pull request incrementally with one additional commit since the last revision: comment added. - Changes: - all:

Re: [External] : Re: jpackage usage problems

2022-04-20 Thread Alexey Semenyuk
On 4/18/2022 7:06 PM, Hiran Chaudhuri wrote: On Mon, 2022-04-18 at 18:41 -0400, Alexey Semenyuk wrote: I've filed [1] and [2] CRs to track the issues. [1] https://bugs.openjdk.java.net/browse/JDK-8284973 [2] https://bugs.openjdk.java.net/browse/JDK-8284974 - Alexey Sounds great. Thank

Re: RFR: 8284638: store skip buffers in InputStream Object [v8]

2022-04-20 Thread XenoAmess
On Wed, 20 Apr 2022 16:16:05 GMT, liach wrote: >> XenoAmess has updated the pull request incrementally with one additional >> commit since the last revision: >> >> remove useless skipBuffer > > src/java.base/share/classes/java/io/InputStream.java line 57: > >> 55: private static final

Re: RFR: 8284638: store skip buffers in InputStream Object [v9]

2022-04-20 Thread XenoAmess
> @jmehrens what about this then? > I think it safe now(actually this mechanism is learned from Reader) XenoAmess has updated the pull request incrementally with one additional commit since the last revision: remove uselsee MIN_SKIP_BUFFER_SIZE - Changes: - all:

Integrated: JDK-8280594: Refactor annotation invocation handler handling to use Objects.toIdentityString

2022-04-20 Thread Joe Darcy
On Tue, 19 Apr 2022 23:34:01 GMT, Joe Darcy wrote: > Simple refactoring to use new-in19 library code. This pull request has now been integrated. Changeset: e6c5f288 Author:Joe Darcy URL: https://git.openjdk.java.net/jdk/commit/e6c5f2886c39a95e660dd3d83d894fd3761b7468 Stats: 10

Re: RFR: 8284638: store skip buffers in InputStream Object [v8]

2022-04-20 Thread liach
On Wed, 20 Apr 2022 16:07:17 GMT, XenoAmess wrote: >> @jmehrens what about this then? >> I think it safe now(actually this mechanism is learned from Reader) > > XenoAmess has updated the pull request incrementally with one additional > commit since the last revision: > > remove useless

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v4]

2022-04-20 Thread XenoAmess
On Tue, 19 Apr 2022 22:17:54 GMT, liach wrote: > Need to add apiNote documentation section to capacity-based constructors like > for maps. @liach done. - PR: https://git.openjdk.java.net/jdk/pull/8302

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v5]

2022-04-20 Thread XenoAmess
> as title. XenoAmess has updated the pull request incrementally with one additional commit since the last revision: add apiNote s - Changes: - all: https://git.openjdk.java.net/jdk/pull/8302/files - new: https://git.openjdk.java.net/jdk/pull/8302/files/f051c1fa..26bb5792

Re: RFR: JDK-8280594: Refactor annotation invocation handler handling to use Objects.toIdentityString

2022-04-20 Thread Brian Burkhalter
On Tue, 19 Apr 2022 23:34:01 GMT, Joe Darcy wrote: > Simple refactoring to use new-in19 library code. Marked as reviewed by bpb (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/8310

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v4]

2022-04-20 Thread XenoAmess
On Tue, 19 Apr 2022 20:15:08 GMT, XenoAmess wrote: >> as title. > > XenoAmess 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 contains two new

Re: RFR: 8284638: store skip buffers in InputStream Object [v8]

2022-04-20 Thread XenoAmess
> @jmehrens what about this then? > I think it safe now(actually this mechanism is learned from Reader) XenoAmess has updated the pull request incrementally with one additional commit since the last revision: remove useless skipBuffer - Changes: - all:

Re: RFR: 8284638: store skip buffers in InputStream Object [v7]

2022-04-20 Thread XenoAmess
On Tue, 19 Apr 2022 22:47:42 GMT, liach wrote: >> XenoAmess has updated the pull request incrementally with one additional >> commit since the last revision: >> >> change to liach operation. > > src/java.base/share/classes/java/io/InputStream.java line 62: > >> 60: >> 61: /** Skip

RFR: 8285255: refine StringLatin1.regionMatchesCI_UTF16

2022-04-20 Thread XenoAmess
some thoughts after watching 8285001: Simplify StringLatin1.regionMatches https://github.com/openjdk/jdk/pull/8292/ if (Character.toLowerCase(u1) == Character.toLowerCase(u2)) { continue; } should be changed to if (((u1 == c1) ?

Re: RFR: 8282274: Compiler implementation for Pattern Matching for switch (Third Preview) [v5]

2022-04-20 Thread Vicente Romero
On Tue, 19 Apr 2022 18:47:16 GMT, Jan Lahoda wrote: >> This is a (preliminary) patch for javac implementation for the third preview >> of pattern matching for switch (type patterns in switches). >> >> Draft JLS: >>

Re: RFR: 8284930: Re-examine FilterInputStream mark/reset [v2]

2022-04-20 Thread Brian Burkhalter
> Remove the `synchronized` keyword from the `mark(int)` and `reset()` methods > of `java.io.FilterInputStream`. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8284930: Also remove synchronized keyword from mark() and reset()

Re: RFR: 8282274: Compiler implementation for Pattern Matching for switch (Third Preview) [v5]

2022-04-20 Thread Vicente Romero
On Tue, 19 Apr 2022 18:47:16 GMT, Jan Lahoda wrote: >> This is a (preliminary) patch for javac implementation for the third preview >> of pattern matching for switch (type patterns in switches). >> >> Draft JLS: >>

Re: RFR: 8284853: Fix various 'expected' typo [v2]

2022-04-20 Thread Kevin Walls
On Thu, 14 Apr 2022 18:04:16 GMT, Andrey Turbanov wrote: > I found [yet another > typo](https://github.com/kelthuzadx/jdk/commit/acb9e15bc0bf5395d1c0875f36992f692734f948) > ... I didn't think "JVMInvokeMethodSlack" was a typo. I think it's the idea of "slack space" meaning leftover space.

Re: RFR: 8284930: Re-examine FilterInputStream mark/reset

2022-04-20 Thread Roger Riggs
On Wed, 20 Apr 2022 11:56:20 GMT, Jaikiran Pai wrote: > I wonder if it should be removed from InputStream at the same time. I took the presence of synchronized on those empty methods as a hint to subclasses that they too should be synchronized. - PR:

Re: RFR: 8284930: Re-examine FilterInputStream mark/reset

2022-04-20 Thread Daniel Fuchs
On Wed, 20 Apr 2022 11:56:20 GMT, Jaikiran Pai wrote: > As for the changes to `FilterInputStream`, would this change require a CSR? There might be a case where a subclass of `FilterInputStream` has overridden all other methods to add `synchronized` but has not overridden `mark` and `reset`,

Re: RFR: 8284930: Re-examine FilterInputStream mark/reset

2022-04-20 Thread Jaikiran Pai
On Wed, 20 Apr 2022 07:33:14 GMT, Alan Bateman wrote: > I wonder if it should be removed from InputStream at the same time. Interesting. I hadn't noticed `InputStream` had those two methods synchronized. I suspect removing synchronization from those two methods on `InputStream` is probably a

Re: core-libs-dev Digest Vol 180 Issue 174 Topic 1

2022-04-20 Thread Michael Kuhlmann
On 4/20/22 10:15, sminervini.prism wrote: > To the Java Community Process, and OpenJDK community, > > A number of us have been waiting on serious consideration for apprehension of > > core-libs-dev Digest Vol 180 Issue 174 Topic 1 > > since we have posted, but not received an addressal and

Re: RFR: JDK-8281006 Module::getResourceAsStream should check if the resource is open unconditionally when caller is null [v5]

2022-04-20 Thread Alan Bateman
On Wed, 20 Apr 2022 01:03:23 GMT, Tim Prinzing wrote: >> Created a test called NullCallerGetResource to test >> Module::getResourceAsStream and Class::getResourceAsStream from the native >> level. >> >> At the java level the test builds a test module called 'n' which opens the >> package

Re: RFR: 8284930: Re-examine FilterInputStream mark/reset

2022-04-20 Thread Alan Bateman
On Tue, 19 Apr 2022 23:26:44 GMT, Brian Burkhalter wrote: > Remove the `synchronized` keyword from the `mark(int)` and `reset()` methods > of `java.io.FilterInputStream`. I wonder if it should be removed from InputStream at the same time. - PR:

Re: RFR: 8284950: Swappiness disables swap space usage

2022-04-20 Thread Ioi Lam
On Mon, 18 Apr 2022 09:07:31 GMT, xpbob wrote: > set memory.swappiness to 0,swap space will not be used > determine the value of memory.swappiness > https://www.kernel.org/doc/Documentation/cgroup-v1/memory.txt > > > Memory Limit: 50.00M > Memory Soft Limit: Unlimited > Memory &

Re: RFR: 8284950: Swappiness disables swap space usage

2022-04-20 Thread Ioi Lam
On Mon, 18 Apr 2022 09:07:31 GMT, xpbob wrote: > set memory.swappiness to 0,swap space will not be used > determine the value of memory.swappiness > https://www.kernel.org/doc/Documentation/cgroup-v1/memory.txt > > > Memory Limit: 50.00M > Memory Soft Limit: Unlimited > Memory &