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

2022-06-02 Thread Daniel Fuchs
On Fri, 27 May 2022 18:40:32 GMT, XenoAmess wrote: >> as title. > > XenoAmess has updated the pull request incrementally with one additional > commit since the last revision: > > do it as naotoj said Changes to `net` and `http` look good. - Marked as reviewed by dfuchs (Reviewe

Re: RFR: 8284209: Replace remaining usages of 'a the' in source code

2022-05-18 Thread Daniel Fuchs
On Wed, 18 May 2022 14:46:42 GMT, Alexey Ivanov wrote: > Replaces usages of articles that follow each other in all combinations: > a/the, an?/an?, the/the… > > It's the last issue in the series, and it still touches different areas of > the code. Logging/JNDI OK - Marked as revi

Re: RFR: 8186958: Need method to create pre-sized HashMap [v16]

2022-04-14 Thread Daniel Fuchs
On Wed, 13 Apr 2022 19:28:08 GMT, Stuart Marks wrote: > Reviewers for i18n, net, nio, and security, please review call site changes > in your areas. Thanks. Changes to `java.net.http` look good to me. I haven't spotted anything obviously wrong in the rest, but should defer to reviewers of thes

Re: RFR: 8280400: JDK 19 L10n resource files update - msgdrop 10

2022-03-10 Thread Daniel Fuchs
On Thu, 10 Mar 2022 17:00:09 GMT, Naoto Sato wrote: > IIRC, localized resource files should have the same copyright year as the > base English one. That's what I was told by the l10n engineer when I had the > same comment. Thanks Naoto! I have no objection then. - PR: https://git

Re: RFR: 8280400: JDK 19 L10n resource files update - msgdrop 10

2022-03-10 Thread Daniel Fuchs
On Wed, 9 Mar 2022 21:09:30 GMT, Alisen Chung wrote: > msg drop for jdk19, Mar 9, 2022 For simple webserver resource files - should the copyright year be 2022? - PR: https://git.openjdk.java.net/jdk/pull/7765

Re: RFR: 8282190: Typo in javadoc of java.time.format.DateTimeFormatter#getDecimalStyle

2022-02-21 Thread Daniel Fuchs
On Mon, 21 Feb 2022 12:42:37 GMT, Jaikiran Pai wrote: > Can I please get a review of this trivial change to the javadoc of > `DateTimeFormatter.getDecimalStyle()` method which fixes the typo noted in > https://bugs.openjdk.java.net/browse/JDK-8282190? LGTM - Marked as reviewed by

Re: RFR: JDK-8280492: Address remaining doclint issues in JDK build

2022-01-24 Thread Daniel Fuchs
On Sat, 22 Jan 2022 21:09:03 GMT, Joe Darcy wrote: > Use presumed syntax that will be introduced by JDK-8280488. Marked as reviewed by dfuchs (Reviewer). LGTM. I hope in the future IDEs will pick that rule up and offer some help when writing `{@link }` `@see`... - PR: https://git

Re: RFR: 8280470: Confusing instanceof check in HijrahChronology.range

2022-01-21 Thread Daniel Fuchs
On Mon, 17 Jan 2022 21:02:35 GMT, Andrey Turbanov wrote: > Parameter `ChronoField field` is checked by `if (field instanceof > ChronoField)`. Such check is confusing, because only one case, when this > could be `false` is when `field == null`. > But if condition is not satisfied we will get imm

Re: RFR: 8277868: Use Comparable.compare() instead of surrogate code

2021-11-26 Thread Daniel Fuchs
On Fri, 26 Nov 2021 12:46:59 GMT, Сергей Цыпанов wrote: > Instead of something like > > long x; > long y; > return (x < y) ? -1 : ((x == y) ? 0 : 1); > > we can use `return Long.compare(x, y);` > > All replacements are done with IDE. Changes to java.net look good. Please obtain approval from

Re: RFR: 8276348: Use blessed modifier order in java.base

2021-11-02 Thread Daniel Fuchs
On Tue, 2 Nov 2021 16:30:56 GMT, Pavel Rappo wrote: > This PR follows up one of the recent PRs, where I used a non-canonical > modifier order. Since the problem was noticed [^1], why not to address it at > mass? > > As far as I remember, the first mass-canonicalization of modifiers took place

Re: RFR: 8276234: Trivially clean up locale-related code

2021-11-01 Thread Daniel Fuchs
On Mon, 1 Nov 2021 15:04:16 GMT, Pavel Rappo wrote: > Please review this PR. A comprehensive test job has been scheduled; I'll > notify this thread once that job has completed. src/java.base/share/classes/sun/util/resources/LocaleData.java line 336: > 334: public List getCandidateLocal

Re: RFR: 8274949: Use String.contains() instead of String.indexOf() in java.base

2021-10-08 Thread Daniel Fuchs
On Fri, 17 Sep 2021 08:56:47 GMT, Andrey Turbanov wrote: > String.contains was introduced in Java 5. > Some code in java.base still uses old approach with `String.indexOf` to check > if String contains specified substring. > I propose to migrate such usages. Makes code shorter and easier to rea

Re: RFR: 8273616: Fix trivial doc typos in the java.base module [v3]

2021-09-13 Thread Daniel Fuchs
On Mon, 13 Sep 2021 11:22:27 GMT, Pavel Rappo wrote: >> 8273616: Fix trivial doc typos in the java.base module > > Pavel Rappo has updated the pull request incrementally with one additional > commit since the last revision: > > Use "ensure" instead of "insure" LGTM - Marked as

Re: RFR: 8272863: Replace usages of Collections.sort with List.sort call in public java modules [v2]

2021-08-25 Thread Daniel Fuchs
On Tue, 24 Aug 2021 20:21:52 GMT, Andrey Turbanov wrote: >> Collections.sort is just a wrapper, so it is better to use an instance >> method directly. > > Andrey Turbanov has updated the pull request incrementally with one > additional commit since the last revision: > > 8272863: Replace us

Re: RFR: 8272863: Replace usages of Collections.sort with List.sort call in public java modules

2021-08-24 Thread Daniel Fuchs
On Mon, 23 Aug 2021 21:01:48 GMT, Andrey Turbanov wrote: > Collections.sort is just a wrapper, so it is better to use an instance method > directly. java/net and sun/net changes LGTM - Marked as reviewed by dfuchs (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5229

Re: RFR: 8272626: Avoid C-style array declarations in java.*

2021-08-18 Thread Daniel Fuchs
On Wed, 18 Aug 2021 10:07:35 GMT, Claes Redestad wrote: > C-style array declarations generate noisy warnings in IDEs, et.c. This patch > cleans up all java.* packages. > > (Copyrights intentionally not updated due the triviality of most changes) Marked as reviewed by dfuchs (Reviewer). --

Re: [jdk17] RFR: 8269409: Post JEP 411 refactoring: core-libs with maximum covering > 10K [v2]

2021-06-28 Thread Daniel Fuchs
On Sat, 26 Jun 2021 23:55:46 GMT, Weijun Wang wrote: >> src/jdk.attach/share/classes/sun/tools/attach/HotSpotVirtualMachine.java >> line 53: >> >>> 51: private static final long CURRENT_PID = >>> AccessController.doPrivileged( >>> 52: (PrivilegedAction) >>> ProcessHandle::curr

Re: RFR: 8269124: Update java.time to use switch expressions (part II) [v5]

2021-06-24 Thread Daniel Fuchs
On Thu, 24 Jun 2021 12:01:04 GMT, Patrick Concannon wrote: >> Hi, >> >> Could someone please review the second half of my update for the `java.time` >> package to make use of switch expressions? >> >> This PR was split into two parts due to the large number of files affected. >> >> Kind rega

Re: RFR: 8269124: Update java.time to use switch expressions (part II) [v2]

2021-06-23 Thread Daniel Fuchs
On Wed, 23 Jun 2021 16:35:30 GMT, Naoto Sato wrote: >> Hi Naoto, I decided to only introduce the`instanceof` pattern variable where >> I thought it would add additional value to the code. In situations like this >> one, I thought there wasn't much point as the cast variable is only used >> onc

Re: RFR: 8269124: Update java.time to use switch expressions (part II)

2021-06-22 Thread Daniel Fuchs
On Tue, 22 Jun 2021 10:50:17 GMT, Patrick Concannon wrote: > Hi, > > Could someone please review the second half of my update for the `java.time` > package to make use of switch expressions? > > This PR was split into two parts due to the large number of files affected. > > Kind regards, >

Re: RFR: 8268469: Update java.time to use switch expressions [v4]

2021-06-22 Thread Daniel Fuchs
On Tue, 22 Jun 2021 09:58:55 GMT, Patrick Concannon wrote: >> Hi, >> >> Could someone please review my code for updating the code in the `java.time` >> packages to make use of the switch expressions? >> >> Kind regards, >> Patrick > > Patrick Concannon has updated the pull request with a new

Re: RFR: 8268469: Update java.time to use switch expressions [v3]

2021-06-17 Thread Daniel Fuchs
On Wed, 16 Jun 2021 10:57:07 GMT, Patrick Concannon wrote: >> Hi, >> >> Could someone please review my code for updating the code in the `java.time` >> packages to make use of the switch expressions? >> >> Kind regards, >> Patrick > > Patrick Concannon has updated the pull request with a new

Re: RFR: 8268469: Update java.time to use switch expressions [v3]

2021-06-17 Thread Daniel Fuchs
On Wed, 16 Jun 2021 16:43:20 GMT, Stephen Colebourne wrote: >> The vertical alignment improves readability in these short-line cases. >> Removing the spaces before the arrows will make it a little harder to >> discern the difference between the cases. > > It is your codebase, not mine, so it i

Re: RFR: 8268469: Update java.time to use switch expressions

2021-06-09 Thread Daniel Fuchs
On Wed, 9 Jun 2021 15:41:59 GMT, Patrick Concannon wrote: > Hi, > > Could someone please review my code for updating the code in the `java.time` > packages to make use of the switch expressions? > > Kind regards, > Patrick src/java.base/share/classes/java/time/Month.java line 491: > 489:

Re: RFR: 8268124: Update java.lang to use switch expressions [v5]

2021-06-09 Thread Daniel Fuchs
On Wed, 9 Jun 2021 10:25:35 GMT, Patrick Concannon wrote: >> Hi, >> >> Could someone please review my code for updating the code in the `java.lang` >> packages to make use of the switch expressions? >> >> Kind regards, >> Patrick > > Patrick Concannon has updated the pull request incrementall

Re: RFR: 8267587: Update java.util to use enhanced switch [v6]

2021-05-27 Thread Daniel Fuchs
On Wed, 26 May 2021 02:22:42 GMT, Tagir F. Valeev wrote: >> Inspired by PR#4088. Most of the changes are done automatically using >> IntelliJ IDEA refactoring. Some manual adjustments are also performed, >> including indentations, moving comments, extracting common cast out of >> switch expres

Re: RFR: 8267670: Update java.io, java.math, and java.text to use switch expressions [v5]

2021-05-26 Thread Daniel Fuchs
On Wed, 26 May 2021 09:39:44 GMT, Patrick Concannon wrote: >> Hi, >> >> Could someone please review my code for updating the code in the `java.io`, >> `java.math`, and `java.text` packages to make use of the switch expressions? >> >> Kind regards, >> Patrick > > Patrick Concannon has updated

Re: RFR: 8267670: Update java.io, java.math, and java.text to use switch expressions

2021-05-25 Thread Daniel Fuchs
On Tue, 25 May 2021 09:37:58 GMT, Patrick Concannon wrote: > Hi, > > Could someone please review my code for updating the code in the `java.io`, > `java.math`, and `java.text` packages to make use of the switch expressions? > > Kind regards, > Patrick src/java.base/share/classes/java/io/Obje

Re: RFR: 8267587: Update java.util to use enhanced switch

2021-05-24 Thread Daniel Fuchs
On Mon, 24 May 2021 04:20:23 GMT, Tagir F. Valeev wrote: > Inspired by PR#4088. Most of the changes are done automatically using > IntelliJ IDEA refactoring. Some manual adjustments are also performed, > including indentations, moving comments, extracting common cast out of switch > expression

Re: RFR: 8267521: Post JEP 411 refactoring: maximum covering > 50K [v3]

2021-05-24 Thread Daniel Fuchs
On Fri, 21 May 2021 20:37:30 GMT, Weijun Wang wrote: >> The code change refactors classes that have a `SuppressWarnings("removal")` >> annotation that covers more than 50KB of code. The big annotation is often >> quite faraway from the actual deprecated API usage it is suppressing, and >> with

Re: RFR: 8267521: Post JEP 411 refactoring: maximum covering > 50K [v2]

2021-05-21 Thread Daniel Fuchs
On Fri, 21 May 2021 14:00:39 GMT, Weijun Wang wrote: >> The code change refactors classes that have a `SuppressWarnings("removal")` >> annotation that covers more than 50KB of code. The big annotation is often >> quite faraway from the actual deprecated API usage it is suppressing, and >> with

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

2021-05-21 Thread Daniel Fuchs
On Wed, 19 May 2021 13:47:53 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/576161d15423f58281e38

Re: RFR: 8263561: Re-examine uses of LinkedList

2021-05-21 Thread Daniel Fuchs
On Fri, 26 Feb 2021 10:48:33 GMT, Сергей Цыпанов wrote: > The usage of `LinkedList` is senseless and can be replaced with either > `ArrayList` or `ArrayDeque` which are both more compact and effective. > > jdk:tier1 and jdk:tier2 are both ok I don't remember all the comments you have received

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

2021-05-18 Thread Daniel Fuchs
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: 8265746: Update java.time to use instanceof pattern variable (part II)

2021-04-23 Thread Daniel Fuchs
On Fri, 23 Apr 2021 10:44:30 GMT, Patrick Concannon wrote: > Hi, > > Could someone please review the second half of my update for the `java.time` > package to make use of the `instanceof` pattern variable? > > This PR was split into two parts due to the large number of files affected. > > Ki

Re: RFR: 8263668: Update java.time to use instanceof pattern variable [v7]

2021-04-21 Thread Daniel Fuchs
On Wed, 21 Apr 2021 11:06:16 GMT, Patrick Concannon wrote: >> Hi, >> >> Could someone please review my code for updating the code in the `java.time` >> package to make use of the `instanceof` pattern variable? >> >> Kind regards, >> Patrick > > Patrick Concannon has updated the pull request w

Re: RFR: 8263668: Update java.time to use instanceof pattern variable [v6]

2021-04-21 Thread Daniel Fuchs
On Tue, 20 Apr 2021 17:46:38 GMT, Patrick Concannon wrote: >> Hi, >> >> Could someone please review my code for updating the code in the `java.time` >> package to make use of the `instanceof` pattern variable? >> >> Kind regards, >> Patrick > > Patrick Concannon has updated the pull request i

Re: RFR: 8264896: Remove redundant '& 0xFF' from int-to-byte cast

2021-04-08 Thread Daniel Fuchs
On Thu, 8 Apr 2021 08:54:35 GMT, Sebastian Stenzel wrote: >> When we do >> byte b1 = (byte) (value & 0xFF); >> we keep from int only 1 lower byte and exactly the same can be achieved with >> plain cast. See the test below: >> public class Main { >> public static void main(String[] args) throw

Re: RFR: 8263190: Update java.io, java.math, and java.text to use instanceof pattern variable

2021-03-08 Thread Daniel Fuchs
On Mon, 8 Mar 2021 18:48:30 GMT, Patrick Concannon wrote: > Hi, > > Could someone please review my code for updating the code in the `java.io`, > `java.math`, and `java.text` packages to make use of the `instanceof` pattern > variable? > > Kind regards, > Patrick Marked as reviewed by dfuch

Re: RFR: 8261919: java/util/Locale/LocaleProvidersRun.java failed with "RuntimeException: Expected log was not emitted. LogRecord: null" [v2]

2021-02-23 Thread Daniel Fuchs
On Tue, 23 Feb 2021 19:35:55 GMT, Naoto Sato wrote: >> Please review the fix to this test case failure that occurs with the usage >> tracker enabled JRE. > > Naoto Sato has updated the pull request incrementally with one additional > commit since the last revision: > > Reflecting review comm

Re: RFR: 8261919: java/util/Locale/LocaleProvidersRun.java failed with "RuntimeException: Expected log was not emitted. LogRecord: null"

2021-02-23 Thread Daniel Fuchs
On Tue, 23 Feb 2021 02:09:01 GMT, Naoto Sato wrote: > Please review the fix to this test case failure that occurs with the usage > tracker enabled JRE. test/jdk/java/util/Locale/LocaleProviders.java line 416: > 414: // Set the root logger on loading the logging class > 415: public stat

Re: RFR: 8246788: ZoneRules invariants can be broken

2021-01-22 Thread Daniel Fuchs
On Fri, 22 Jan 2021 15:00:17 GMT, Florent Guillaume wrote: >> src/java.base/share/classes/java/time/zone/ZoneRules.java line 263: >> >>> 261: // last rules >>> 262: Object[] temp = lastRules.toArray(); >>> 263: ZoneOffsetTransitionRule[] rulesArray = Arrays.copyOf(temp,

Re: RFR: 8246788: ZoneRules invariants can be broken

2021-01-22 Thread Daniel Fuchs
On Fri, 22 Jan 2021 05:39:55 GMT, Stuart Marks wrote: > Tighten up argument checking in constructor. src/java.base/share/classes/java/time/zone/ZoneRules.java line 263: > 261: // last rules > 262: Object[] temp = lastRules.toArray(); > 263: ZoneOffsetTransitionRule[] rul

Re: [15] RFR: 8245241: Incorrect locale provider preference is not logged

2020-05-21 Thread Daniel Fuchs
Hi Naoto, On 21/05/2020 20:00, naoto.s...@oracle.com wrote: In fact, this piece of code should not happen as those adapter classes are all JDK provided classes. I replaced the above code with ServiceConfigurationError, like other similar locations (e.g, HostLocaleProviderAdapter - line 64-65).

Re: [15] RFR: 8245241: Incorrect locale provider preference is not logged

2020-05-21 Thread Daniel Fuchs
Hi Naoto, Logging uses: ZonedDateTime zdt = ZonedDateTime.ofInstant( record.getInstant(), ZoneId.systemDefault()); and then String.format("%1$tb %1$td, %1$tY %1$tl:%1$tM:%1$tS %1$Tp %2$s%n%4$s: %5$s%6$s%n", ...) to format the date. If the locale provider can't be loaded, is

Re: Review Request JDK-8170772: ResourceBundle improper caching causes tools/javadoc tests intermittently

2016-12-09 Thread Daniel Fuchs
Hi Mandy, It will be good to have Naoto's opinion on this. But what you propose makes sense to me. best regards, -- daniel On 09/12/16 16:49, Mandy Chung wrote: Naoto, Can you review this ResourceBundle caching fix? The caller module may be different than the specified module to ResourceBun