Found various typos of expected: `exepected`, `exept`, `epectedly`, `expeced`,
`Unexpeted`, etc.
-
Commit messages:
- [PATCH] Fix 'expected' typo
- [PATCH] Fix 'expected' typo
- [PATCH] Fix 'expected' typo
Changes: https://git.openjdk.java.net/jdk/pull/8231/files
Webrev: https:/
> Found various typos of expected: `exepected`, `exept`, `epectedly`,
> `expeced`, `Unexpeted`, etc.
Andrey Turbanov has updated the pull request incrementally with one additional
commit since the last revision:
8284853: Fix various 'expected' typo
improve test log
--
On Wed, 13 Apr 2022 20:36:48 GMT, Andrey Turbanov wrote:
> Found various typos of expected: `exepected`, `exept`, `epectedly`,
> `expeced`, `Unexpeted`, etc.
This pull request has now been integrated.
Changeset: 48c75498
Author:Andrey Turbanov
URL:
https://git.openjdk.java.n
On Thu, 14 Apr 2022 10:38:33 GMT, Yi Yang wrote:
>I found [yet another
>typo](https://github.com/kelthuzadx/jdk/commit/acb9e15bc0bf5395d1c0875f36992f692734f948),
> I wonder if you can merge this into your patch so that I do not need to
>submit a new PR for it? Thanks.
I think it deserves a sep
On Thu, 14 Apr 2022 19:07:09 GMT, Magnus Ihse Bursie wrote:
> I ran `codespell` on the `src/java.base` directory, and accepted those
> changes where it indeed discovered real typos.
>
> (Due to false positives this can unfortunately not be run automatically)
>
> The majority of fixes are in c
Instead of pair `HashMap.containsKey`/`HashMap.get` method calls, we can use
single call `HashMap.getOrDefault`.
It's faster and clearer.
-
Commit messages:
- [PATCH] Avoid redundant HashMap.containsKey calls in ZoneInfoFile
Changes: https://git.openjdk.java.net/jdk/pull/8487/files
On Sat, 30 Apr 2022 17:00:03 GMT, Andrey Turbanov wrote:
> Instead of pair `HashMap.containsKey`/`HashMap.get` method calls, we can use
> single call `HashMap.getOrDefault`.
> It's faster and clearer.
This pull request has now been integrated.
Changeset: 01916e19
Author:A
No need to separately perform `HashMap.containsKey` before `HashMap.remove`
call. If key is present - it will be removed anyway. If it's not present,
nothing will be deleted.
-
Commit messages:
- [PATCH] Avoid redundant HashMap.containsKey calls in InternalLocaleBuilder
Changes: h
On Sat, 30 Apr 2022 17:10:55 GMT, Andrey Turbanov wrote:
> No need to separately perform `HashMap.containsKey` before `HashMap.remove`
> call. If key is present - it will be removed anyway. If it's not present,
> nothing will be deleted.
This pull request has now been integrat
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
Usage of thread-safe collection `Vector` is unnecessary. It's recommended to
use `ArrayList` if a thread-safe implementation is not needed. In
post-BiasedLocking times, this is gets worse, as every access is synchronized.
I checked only places where `Vector` was used as local variable.
-
On Mon, 5 Jul 2021 14:03:18 GMT, Сергей Цыпанов
wrote:
>> Usage of thread-safe collection `Vector` is unnecessary. It's recommended to
>> use `ArrayList` if a thread-safe implementation is not needed. In
>> post-BiasedLocking times, this is gets worse, as every access is
>> synchronized.
>> I
remove redundant if
-
Commit messages:
- 8272616: Strange code in java.text.DecimalFormat#applyPattern
Changes: https://git.openjdk.java.net/jdk/pull/5171/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5171&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-827
On Wed, 18 Aug 2021 20:59:20 GMT, Andrey Turbanov
wrote:
> remove redundant if
This pull request has now been integrated.
Changeset: 51c1b9a6
Author: Andrey Turbanov
Committer: Brian Burkhalter
URL:
https://git.openjdk.java.net/jdk/commit/51c1b9a6870bd9644e92227e47082a53e2d1c
Collections.sort is just a wrapper, so it is better to use an instance method
directly.
-
Commit messages:
- [PATCH] Replace usages of Collections.sort with List.sort call in public
java modules
Changes: https://git.openjdk.java.net/jdk/pull/5229/files
Webrev: https://webrevs.ope
> 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 usages of Collections.sort with List.sort call in public
java m
On Tue, 24 Aug 2021 11:48:46 GMT, Alexander Zvegintsev
wrote:
> Is there any reason to not touch them along with this fix?
Update them too.
-
PR: https://git.openjdk.java.net/jdk/pull/5229
On Mon, 9 Aug 2021 23:46:09 GMT, Phil Race wrote:
>> Even non-public method can be called via reflection, so I'd be cautios about
>> changing return type
>
> Apps should not be doing that and the desktop module along with most of the
> rest of the JDK is strongly encapsulated and illegal access
as local variable.
Andrey Turbanov has updated the pull request incrementally with one additional
commit since the last revision:
8271603: Unnecessary Vector usage in java.desktop
revert back to Enumeration
bring back default values
-
Changes:
- all: https://git.openjdk.java.
On Mon, 2 Aug 2021 05:19:32 GMT, Sergey Bylokhov wrote:
>> Andrey Turbanov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8271603: Unnecessary Vector usage in java.desktop
>> revert back to Enumeration
as local variable.
Andrey Turbanov has updated the pull request incrementally with two additional
commits since the last revision:
- 8271603: Unnecessary Vector usage in java.desktop
migrate more usages. Not sure how I missed them
- 8271603: Unnecessary Vector usage in java.desktop
revert
On Tue, 24 Aug 2021 21:13:57 GMT, Andrey Turbanov
wrote:
>> Usage of thread-safe collection `Vector` is unnecessary. It's recommended to
>> use `ArrayList` if a thread-safe implementation is not needed. In
>> post-BiasedLocking times, this is gets worse, as every acc
On Tue, 24 Aug 2021 23:09:52 GMT, Sergey Bylokhov wrote:
>> Andrey Turbanov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8271603: Unnecessary Vector usage in java.desktop
>> revert back to Enumeration
On Wed, 25 Aug 2021 08:29:57 GMT, Daniel Fuchs wrote:
>> Andrey Turbanov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8272863: Replace usages of Collections.sort with List.sort call in public
>
> Collections.sort is just a wrapper, so it is better to use an instance method
> directly.
Andrey Turbanov 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
as local variable.
Andrey Turbanov has updated the pull request incrementally with one additional
commit since the last revision:
8271603: Unnecessary Vector usage in java.desktop
migrate even more usages
-
Changes:
- all: https://git.openjdk.java.net/jdk/pull/4680/fil
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.
This pull request has now been integrated.
Changeset: d732c309
Author:Andrey Turbanov
Committer: Sergey Bylokhov
URL:
On Fri, 27 Aug 2021 17:04:33 GMT, Sergey Bylokhov wrote:
>> Andrey Turbanov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8271603: Unnecessary Vector usage in java.desktop
>> migrate even more usa
On Fri, 27 Aug 2021 18:28:58 GMT, Sergey Bylokhov wrote:
>> Can you please elaborate?
>> As I can see if size of array is exactly the same as size of
>> vector/arraylist, implementations are similar - they just call
>> System.arraycopy
>>  java.naming
2. [JD
Flipping arguments of 'equals' method, allows simplifying boolean expressions:
now we can remove redundant null check before.
-
Commit messages:
- [PATCH] Simplify equals() call on nullable variable and a constant in
java.desktop
- [PATCH] Simplify equals() call on nullable variab
Redundant castings make code harder to read.
Found them by IntelliJ IDEA.
I tried to select only casts which are definitely safe to remove. Also didn't
touch primitive types casts.
-
Commit messages:
- [PATCH] Remove unnecessary castings in java.base
- [PATCH] Remove unnecessary ca
StringBuffer is a legacy synchronized class. There are more modern alternatives
which perform better:
1. Plain String concatenation should be preferred
2. StringBuilder is a direct replacement to StringBuffer which generally have
better performance
In [JDK-8264029](https://bugs.openjdk.java.net/
8274893: Update java.desktop classes to use try-with-resources
-
Commit messages:
- [PATCH] Use try-with-resources to close resources in java.desktop
- [PATCH] Use try-with-resources to close resources in java.desktop
- [PATCH] Use try-with-resources to close InputStream in java.de
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 read.
-
Commit messages:
- [PATCH] Use String.contains()
On Fri, 8 Oct 2021 09:35:25 GMT, Daniel Fuchs wrote:
>Did you run tier1, tier2?
I did run tier2. (tier1 is automatically checked by GithubActions).
No new tests failed. Only _usual_ tests, which always fail on my machine, were
failed.
-
PR: https://git.openjdk.java.net/jdk/pull/55
On Sat, 2 Oct 2021 09:14:49 GMT, Andrey Turbanov
wrote:
> Flipping arguments of 'equals' method, allows simplifying boolean
> expressions: now we can remove redundant null check before.
This pull request has now been integrated.
Changeset: f640c7aa
Author: Andrey Tur
On Thu, 7 Oct 2021 16:48:06 GMT, Naoto Sato wrote:
>> StringBuffer is a legacy synchronized class. There are more modern
>> alternatives which perform better:
>> 1. Plain String concatenation should be preferred
>> 2. StringBuilder is a direct replacement to StringBuffer which generally
>> have
Cycles with 'Iterator' are error-prone. It's better to use more high-level
code, which easier to read.
We can use enhanced-for or Collection.removeIf
-
Commit messages:
- [PATCH] Cleanup Iterator usages in java.desktop
- [PATCH] Cleanup Iterator usages in java.desktop
Changes: htt
On Tue, 12 Oct 2021 05:49:17 GMT, Sergey Bylokhov wrote:
>> Cycles with 'Iterator' are error-prone. It's better to use more high-level
>> code, which easier to read.
>> We can use enhanced-for or Collection.removeIf
>
> src/java.desktop/unix/classes/sun/awt/X11/ListHelper.java line 569:
>
>> 56
n [JDK-8264029](https://bugs.openjdk.java.net/browse/JDK-8264029) I
> migrated only usages which were automatically detected by IDEA. It turns out
> there are more usages which can be migrated.
Andrey Turbanov has updated the pull request incrementally with one additional
commit since the last re
On Tue, 12 Oct 2021 20:33:20 GMT, Naoto Sato wrote:
>> reverted changes in this spec.
>
> Did you modify the PR? I am unable to locate the revert.
Oops. Forgot to push
-
PR: https://git.openjdk.java.net/jdk/pull/5432
Remove 3 unused HashMap's.
Reported here
https://mail.openjdk.java.net/pipermail/core-libs-dev/2021-September/081866.html
I did the similar PR to treetenbp and it was merged
https://github.com/ThreeTen/threetenbp/pull/155
-
Commit messages:
- [PATCH] Remove unused fields in ThaiBud
> 8274893: Update java.desktop classes to use try-with-resources
Andrey Turbanov has updated the pull request incrementally with two additional
commits since the last revision:
- 8274893: Update java.desktop classes to use try-with-resources
close nested resources too
- [PATCH] Use
On Tue, 12 Oct 2021 06:16:00 GMT, Sergey Bylokhov wrote:
>> Andrey Turbanov has updated the pull request incrementally with two
>> additional commits since the last revision:
>>
>> - 8274893: Update java.desktop classes to use try-with-resources
>>close nes
On Fri, 8 Oct 2021 19:37:35 GMT, Andrey Turbanov wrote:
> Cycles with 'Iterator' are error-prone. It's better to use more high-level
> code, which easier to read.
> We can use enhanced-for or Collection.removeIf
This pull request has now been integrated.
Changeset: 32
On Thu, 9 Sep 2021 06:50:21 GMT, Andrey Turbanov wrote:
> StringBuffer is a legacy synchronized class. There are more modern
> alternatives which perform better:
> 1. Plain String concatenation should be preferred
> 2. StringBuilder is a direct replacement to StringBuffer which ge
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
Non-static classes hold a link to their parent classes, which in many cases can
be avoided.
I updated only private and package-private classes. Didn't touch
public/protected to not break external code.
Similar cleanup in java.base -
[JDK-8261880](https://bugs.openjdk.java.net/browse/JDK-8261880)
On Tue, 12 Oct 2021 21:10:12 GMT, Andrey Turbanov wrote:
> Remove 3 unused HashMap's.
> Reported here
> https://mail.openjdk.java.net/pipermail/core-libs-dev/2021-September/081866.html
> I did the similar PR to treetenbp and it was merged
> https://github.com/ThreeTen/three
On Thu, 9 Sep 2021 20:12:47 GMT, Andrey Turbanov wrote:
> Redundant castings make code harder to read.
> Found them by IntelliJ IDEA.
> I tried to select only casts which are definitely safe to remove. Also didn't
> touch primitive types casts.
This pull request has no
openjdk.java.net/browse/JDK-8261880)
Andrey Turbanov has updated the pull request incrementally with one additional
commit since the last revision:
[PATCH] Change nested classes in java.desktop to static nested classes
fix review comments
-
Changes:
- all: https://git.openjdk
On Wed, 17 Nov 2021 14:32:16 GMT, Alexey Ivanov wrote:
>> Andrey Turbanov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> [PATCH] Change nested classes in java.desktop to static nested classes
>>
openjdk.java.net/browse/JDK-8261880)
Andrey Turbanov has updated the pull request incrementally with one additional
commit since the last revision:
[PATCH] Change nested classes in java.desktop to static nested classes
move opening brace to the same line where class is declared
On Wed, 17 Nov 2021 19:25:15 GMT, Andrey Turbanov wrote:
>> Non-static classes hold a link to their parent classes, which in many cases
>> can be avoided.
>> I updated only private and package-private classes. Didn't touch
>> public/protected to not break externa
On Thu, 14 Oct 2021 07:47:33 GMT, Andrey Turbanov wrote:
> Non-static classes hold a link to their parent classes, which in many cases
> can be avoided.
> I updated only private and package-private classes. Didn't touch
> public/protected to not break external code.
>
On Thu, 18 Nov 2021 05:30:59 GMT, Sergey Bylokhov wrote:
>> Andrey Turbanov has updated the pull request incrementally with two
>> additional commits since the last revision:
>>
>> - 8274893: Update java.desktop classes to use try-with-resources
>>close nes
> 8274893: Update java.desktop classes to use try-with-resources
Andrey Turbanov has updated the pull request incrementally with one additional
commit since the last revision:
8274893: Update java.desktop classes to use try-with-resources
fix review comments
-
Changes:
-
On Thu, 18 Nov 2021 05:36:29 GMT, Sergey Bylokhov wrote:
>> Andrey Turbanov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8274893: Update java.desktop classes to use try-with-resources
>> fix review
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 a
> 8274893: Update java.desktop classes to use try-with-resources
Andrey Turbanov has updated the pull request incrementally with one additional
commit since the last revision:
8274893: Update java.desktop classes to use try-with-resources
close nested streams too to unify c
On Fri, 19 Nov 2021 19:24:50 GMT, Sergey Bylokhov wrote:
>> updated
>
> What about "new InputStreamReader()" here and below?
added it to `try` too
-
PR: https://git.openjdk.java.net/jdk/pull/5817
On Sat, 11 Sep 2021 14:59:21 GMT, Andrey Turbanov wrote:
> Updated code checks both non-null and instance of a class in java.desktop
> module classes.
> The checks and explicit casts could also be replaced with pattern matching
> for the instanceof operator.
> Similar cle
On Sat, 27 Nov 2021 16:37:03 GMT, Alexey Ivanov wrote:
>> Updated code checks both non-null and instance of a class in java.desktop
>> module classes.
>> The checks and explicit casts could also be replaced with pattern matching
>> for the instanceof operator.
>> Similar cleanups
>> 1. [JDK-82
On Sat, 27 Nov 2021 16:27:36 GMT, Alexey Ivanov wrote:
>> Andrey Turbanov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8274640: Cleanup unnecessary null comparison before instanceof check in
>>
browse/JDK-8273484) java.naming
> 2. [JDK-8258422](https://bugs.openjdk.java.net/browse/JDK-8258422) java.base
Andrey Turbanov has updated the pull request incrementally with one additional
commit since the last revision:
8274640: Cleanup unnecessary null comparison before instanceof check in
On Sat, 11 Sep 2021 14:59:21 GMT, Andrey Turbanov wrote:
> Updated code checks both non-null and instance of a class in java.desktop
> module classes.
> The checks and explicit casts could also be replaced with pattern matching
> for the instanceof operator.
> Similar cle
On Tue, 5 Oct 2021 08:13:53 GMT, Andrey Turbanov wrote:
> 8274893: Update java.desktop classes to use try-with-resources
This pull request has now been integrated.
Changeset: 70c6df6b
Author: Andrey Turbanov
Committer: Sergey Bylokhov
URL:
https://git.openjdk.java.net/jdk/com
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 immediate NullPointerException
anyway in `return field.range();`.
--
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
77 matches
Mail list logo