ntLen == nlen' wasn't met.");
}
And all tests from "jdk/java/math" passed.
Can we clean up the code to remove this condition? Code is already
complex enough and each condition makes its reading harder.
It was added as part of performance improvements in
https://bugs.openjdk.org/browse/
On Thu, 24 Nov 2022 15:01:12 GMT, Claes Redestad wrote:
>> When concatenating Strings, OutOfMemoryError should be thrown on all
>> overflow conditions. This fixes a case that erroneously thro IAE on
>> concatenations of long (`length > Integer.MAX_VALUE/2`) UTF16 strings due
>> failing to
On Thu, 27 Oct 2022 19:07:36 GMT, Andrey Turbanov wrote:
> There is no usages for this field. As it has the same value as
> `DAY_OF_MONTH_MASK` we can drop it.
This pull request has now been integrated.
Changeset: 82cbfb5f
Author:Andrey Turbanov
URL:
https://git.openjdk.o
There is no usages for this field. As it has the same value as
`DAY_OF_MONTH_MASK` we can drop it.
-
Commit messages:
- [PATCH] Drop unused field java.util.Calendar.DATE_MASK
Changes: https://git.openjdk.org/jdk/pull/10888/files
Webrev:
On Fri, 28 Oct 2022 15:18:06 GMT, Brian Burkhalter wrote:
>> Add `@throws IndexOutOfBoundsException {@inheritDoc}` to some
>> `write(byte[],int,int)` and `read(byte[],int,int)` methods of some classes
>> in the `java.io` package to make things a bit clearer.
>
> Brian Burkhalter has updated
On Thu, 27 Oct 2022 20:35:26 GMT, Brian Burkhalter wrote:
> Add `@throws IndexOutOfBoundsException {@inheritDoc}` to some
> `write(byte[],int,int)` and `read(byte[],int,int)` methods of some classes in
> the `java.io` package to make things a bit clearer.
On Wed, 26 Oct 2022 16:00:56 GMT, Daniel Fuchs wrote:
> Deprecate URL constructors. Developers are encouraged to use `java.net.URI`
> to parse or construct any URL.
>
> The `java.net.URL` class does not itself encode or decode any URL components
> according to the escaping mechanism defined
Hello.
As I can see, the class 'java.net.InetAddressContainer' is
unused in JDK java code.
Is it somehow used by VM, or is it just leftovers from some refactorings?
I wonder if we can drop it.
Andrey Turbanov
On Thu, 20 Oct 2022 20:28:37 GMT, Andrey Turbanov wrote:
> `java.util.Enumeration` is a legacy interface from java 1.0.
> There are couple of cycles which use it to iterate over collections. We can
> replace this manual cycle with enchanced-for, which is shorter and easier t
`java.util.Enumeration` is a legacy interface from java 1.0.
There are couple of cycles which use it to iterate over collections. We can
replace this manual cycle with enchanced-for, which is shorter and easier to
read.
-
Commit messages:
- [PATCH] Use enhanced-for cycle instead
On Mon, 17 Oct 2022 21:48:42 GMT, Ioi Lam wrote:
>> Please review this small optimization. As shown in the JBS issue, most of
>> the generated LambdaForm classes have a single ClassData, so we can get a
>> small footprint/speed improvement.
>
> Ioi Lam has updated the pull request with a new
On Mon, 10 Oct 2022 19:23:51 GMT, Sean Coffey wrote:
>> New JFR event to record state of initial security properties.
>>
>> Debug output is also now added for these properties via
>> -Djava.security.debug=properties
>
> Sean Coffey has updated the pull request incrementally with one
On Fri, 7 Oct 2022 15:36:16 GMT, Mahendra Chhipa wrote:
>> Added test cases for xpath Axis:
>> 1. descendant
>> 2. descendant-or-self
>> 3. following
>> 4. following-sibling
>
> Mahendra Chhipa has updated the pull request incrementally with one
> additional commit since the last revision:
>
>
On Wed, 18 May 2022 18:14:52 GMT, Severin Gehwolf wrote:
>> Please review this change to the cgroup v1 subsystem which makes it more
>> resilient on some of the stranger systems. Unfortunately, I wasn't able to
>> re-create a similar system as the reporter. The idea of using the longest
>>
On Mon, 3 Oct 2022 10:30:54 GMT, Sean Coffey wrote:
>> New JFR event to record state of initial security properties.
>>
>> Debug output is also now added for these properties via
>> -Djava.security.debug=properties
>
> Sean Coffey has updated the pull request incrementally with one additional
On Sat, 1 Oct 2022 16:17:58 GMT, Andrey Turbanov wrote:
> This suppression were added with Loom integration, but method
> `Thread.getThreadGroup()` is not deprecated.
> Let's cleanup code a bit.
> https://mail.openjdk.org/pipermail/core-libs-dev/2022-September/094907.html
This pull
This suppression were added with Loom integration, but method
`Thread.getThreadGroup()` is not deprecated.
Let's cleanup code a bit.
https://mail.openjdk.org/pipermail/core-libs-dev/2022-September/094907.html
-
Commit messages:
- [PATCH] Remove redundant deprecation suppression in
On Wed, 28 Sep 2022 20:39:03 GMT, Andrey Turbanov wrote:
> Found this redundant suppressions by IntelliJ IDEA inspection.
> It seems [JDK-8189330](https://bugs.openjdk.org/browse/JDK-8189330) made them
> redundant.
This pull request has now been integrated.
Changeset: 375f02
On Fri, 22 Jul 2022 20:51:59 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
On Wed, 10 Aug 2022 02:10:25 GMT, xpbob wrote:
>> Container configuration information is useful for troubleshooting
>> problems,Exposing information in MBeans is ideal for monitoring, jConsole,
>> and other scenarios.
>> Results the following
>>
On Fri, 5 Aug 2022 16:12:08 GMT, Jan Lahoda wrote:
> The pattern matching switches are using a bootstrap method
> `SwitchBootstrap.typeSwitch` to implement the jumps in the switch. Basically,
> for a switch like:
>
> switch (obj) {
> case String s when s.isEmpty() -> {}
> case String
Found this redundant suppressions by IntelliJ IDEA inspection.
It seems [JDK-8189330](https://bugs.openjdk.org/browse/JDK-8189330) made them
redundant.
-
Commit messages:
- [PATCH] Remove redundant unchecked suppression in FileDescriptor
Changes:
On Mon, 26 Sep 2022 19:12:16 GMT, Andrey Turbanov wrote:
> Found this redundant suppressions by IntelliJ IDEA inspection.
> Seems initially `Chronology` was generic class?
This pull request has now been integrated.
Changeset: 9309786d
Author:Andrey Turbanov
URL:
planned to deprecate this method? Or can I remove
redundant suppressions?
Andrey Turbanov
Found this redundant suppressions by IntelliJ IDEA inspection.
Seems initially `Chronology` was generic class?
-
Commit messages:
- [PATCH] Remove redundant rawtypes suppression in AbstractChronology
Changes: https://git.openjdk.org/jdk/pull/10433/files
Webrev:
On Sat, 17 Sep 2022 21:43:04 GMT, Andrey Turbanov wrote:
> There a few unnecessary usages of StringBuffer in SQLOutputImpl class.
> All of them create StringBuffer from single character and then concatenate
> with String. Instead of this, we can concatenate character directly.
On Mon, 26 Sep 2022 14:53:24 GMT, Roger Riggs wrote:
>> There a few unnecessary usages of StringBuffer in SQLOutputImpl class.
>> All of them create StringBuffer from single character and then concatenate
>> with String. Instead of this, we can concatenate character directly.
>
>
There a few unnecessary usages of StringBuffer in SQLOutputImpl class.
All of them create StringBuffer from single character and then concatenate with
String. Instead of this, we can concatenate character directly.
-
Commit messages:
- [PATCH] Cleanup usages of StringBuffer in
On Tue, 30 Aug 2022 07:10:36 GMT, Andrey Turbanov wrote:
> After integration of
> [JDK-8259021](https://bugs.openjdk.org/browse/JDK-8259021) a few more fields
> were added to `SharedSecrets` class. It make sense to update their reading
> code to use the same idiom.
This pull req
After integration of [JDK-8259021](https://bugs.openjdk.org/browse/JDK-8259021)
a few more fields were added to `SharedSecrets` class. It make sense to update
their reading code to use the same idiom.
-
Commit messages:
- [PATCH] SharedSecrets should avoid double racy reads from
On Tue, 30 Aug 2022 08:58:30 GMT, Jaikiran Pai wrote:
>> Andrey Turbanov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8293008: Replace uses of StringBuffer with StringBuilder in MergeCollation
>>
>
> Couple of package-private classes in `java.text` package still use
> `StringBuffer`: `MergeCollation` and `PatternEntry`.
> StringBuffer is a legacy synchronized class. StringBuilder is a direct
> replacement to StringBuffer which generally have better performance.
Andrey Turbanov
On Wed, 24 Aug 2022 19:22:51 GMT, Andrey Turbanov wrote:
> Field `java.text.DateFormatSymbols#millisPerHour` is unused. It was unused in
> initial OpenJDK sources.
This pull request has now been integrated.
Changeset: d3d2e669
Author:Andrey Turbanov
URL:
https://git.openj
Field `java.text.DateFormatSymbols#millisPerHour` is unused. It was unused in
initial OpenJDK sources.
-
Commit messages:
- [PATCH] Unused field DateFormatSymbols.millisPerHour
Changes: https://git.openjdk.org/jdk/pull/10005/files
Webrev:
Couple of package-private classes in `java.text` package still use
`StringBuffer`: `MergeCollation` and `PatternEntry`.
StringBuffer is a legacy synchronized class. StringBuilder is a direct
replacement to StringBuffer which generally have better performance.
-
Commit messages:
-
On Wed, 10 Aug 2022 08:01:41 GMT, Andrey Turbanov wrote:
> It's a bit shorter and clearer.
This pull request has now been integrated.
Changeset: 37c0a136
Author: Andrey Turbanov
URL:
https://git.openjdk.org/jdk/commit/37c0a13647e74fd02823a3f621e986f96904b933
Stats: 8 lines i
It's a bit shorter and clearer.
-
Commit messages:
- [PATCH] Use static methods for hashCode/toString primitives
Changes: https://git.openjdk.org/jdk/pull/9816/files
Webrev: https://webrevs.openjdk.org/?repo=jdk=9816=00
Issue: https://bugs.openjdk.org/browse/JDK-8292350
Stats:
On Mon, 1 Aug 2022 06:51:44 GMT, Andrey Turbanov wrote:
> I propose to replace usages of !Optional.isPresent() with Optional.isEmpty
> method.
> It's makes code a bit easier to read.
> Noticing negation before long chain of method calls is hard.
This pull request has now bee
I propose to replace usages of !Optional.isPresent() with Optional.isEmpty
method.
It's makes code a bit easier to read.
Noticing negation before long chain of method calls is hard.
-
Commit messages:
- [PATCH] Use Optional.isEmpty instead of !Optional.isPresent in java.base
there is no NPE thrown.
Can we remove the catch (NullPointerException) then?
Andrey Turbanov
://bugs.openjdk.org/browse/JDK-4313887
Does VM use this field somehow? Or used to use?
Andrey Turbanov
On Sat, 18 Jun 2022 10:43:08 GMT, Andrey Turbanov wrote:
> Instead of separate ConcurrentHashMap.get call, we can use result of previous
> putIfAbsent call.
This pull request has now been integrated.
Changeset: 52cc6cd0
Author:Andrey Turbanov
URL:
https://git.openjdk.o
On Wed, 20 Jul 2022 11:19:07 GMT, Andrey Turbanov wrote:
>> Instead of separate ConcurrentHashMap.get call, we can use result of
>> previous putIfAbsent call.
>
> Andrey Turbanov has updated the pull request incrementally with one
> additional commit since the last rev
On Wed, 6 Jul 2022 14:11:39 GMT, Roger Riggs wrote:
>> @RogerRiggs in my view, it's not about performance per se… I'll sometimes
>> help along these kinds of small fix PRs (that are more likely than not
>> driven by IntelliJ code refactoring suggestions) if I think they lead to
>> more
> Instead of separate ConcurrentHashMap.get call, we can use result of previous
> putIfAbsent call.
Andrey Turbanov has updated the pull request incrementally with one additional
commit since the last revision:
8288723: Avoid redundant ConcurrentHashMap.get call in java.time
On Wed, 13 Jul 2022 17:42:18 GMT, Сергей Цыпанов wrote:
>> We can skip bounds check and null check for Charset in case we use the array
>> entirely and the Charset is either default one or proven to be non-null.
>>
>> Benchmark results:
>>
>> before
>>
>> Benchmark
On Tue, 5 Jul 2022 15:26:06 GMT, Roger Riggs wrote:
>> Well, if you _really_ want to noodle this for performance, you can also
>> store a `this`-bound lambda in a `private final` instance field, so then
>> it's only created once too. I wouldn't put it past `javac` to do this, but
>> I'd have
On Sun, 3 Jul 2022 19:47:16 GMT, Attila Szegedi wrote:
>> Andrey Turbanov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8288723: Avoid redundant ConcurrentHashMap.get call in java.time
>> use comp
On Wed, 29 Jun 2022 21:11:09 GMT, Andrey Turbanov wrote:
> Update code checks both non-null and instance of a class in jdk.hotspot.agent
> module classes.
> The checks and explicit casts could also be replaced with pattern matching
> for the instanceof operator.
>
> For exam
On Sun, 3 Jul 2022 19:44:55 GMT, Attila Szegedi wrote:
>> But it will generate garbage: non-static lambda.
>
> It already generates some garbage as it does string concatenation for the
> key. Here's an idea: declare a record class for the key, `record
> CacheKey(DayOfWeek firstDayOfWeek, int
On Tue, 21 Jun 2022 17:08:17 GMT, liach wrote:
>> @liach advance apologies for nitpicking: `ConcurrentHashMap` doesn't in
>> general block while the mapping function runs. It can block _some_
>> concurrent updates, namely those that [hash to the same
>>
> Instead of separate ConcurrentHashMap.get call, we can use result of previous
> putIfAbsent call.
Andrey Turbanov has updated the pull request incrementally with one additional
commit since the last revision:
8288723: Avoid redundant ConcurrentHashMap.get call in jav
On Tue, 28 Jun 2022 21:07:41 GMT, Andrey Turbanov wrote:
> There is overload method HashMap.remove(key,value) which also checks value
> equality.
> It's shorter and faster than pair get+remove.
This pull request has now been integrated.
Changeset: 8e7a3cb5
Author: Andrey Turb
On Wed, 29 Jun 2022 08:20:31 GMT, Andrey Turbanov wrote:
>> There is overload method HashMap.remove(key,value) which also checks value
>> equality.
>> It's shorter and faster than pair get+remove.
>
> Andrey Turbanov has updated the pull request incrementally with one
&
Update code checks both non-null and instance of a class in jdk.hotspot.agent
module classes.
The checks and explicit casts could also be replaced with pattern matching for
the instanceof operator.
For example, the following code:
if ((obj != null) && (obj instanceof TCPEndpoint)) {
> There is overload method HashMap.remove(key,value) which also checks value
> equality.
> It's shorter and faster than pair get+remove.
Andrey Turbanov has updated the pull request incrementally with one additional
commit since the last revision:
8289431: (zipfs) Avoid redundant Ha
There is overload method HashMap.remove(key,value) which also checks value
equality.
It's shorter and faster than pair get+remove.
-
Commit messages:
- [PATCH] Remove redundant HashMap.get call before HashMap.remove
Changes: https://git.openjdk.org/jdk/pull/9314/files
Webrev:
On Fri, 24 Jun 2022 07:22:05 GMT, Jaikiran Pai wrote:
>> Andrey Turbanov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8288723: Avoid redundant ConcurrentHashMap.get call in java.time
>> use comp
On Fri, 17 Jun 2022 08:43:00 GMT, Andrey Turbanov wrote:
> Fields `STARTTIME_ANY` and `STARTTIME_PROCESS_UNKNOWN` are actually unused,
> but they are useful as documentation on the interface to native.
> Make them `static` to reduce memory usage.
This pull request has now been i
Fields `STARTTIME_ANY` and `STARTTIME_PROCESS_UNKNOWN` are actually unused, but
they are useful as documentation on the interface to native.
Make them `static` to reduce memory usage.
-
Commit messages:
- [PATCH] Make STARTTIME_ANY and STARTTIME_PROCESS_UNKNOWN fields static in
> Instead of separate ConcurrentHashMap.get call, we can use result of previous
> putIfAbsent call.
Andrey Turbanov has updated the pull request incrementally with one additional
commit since the last revision:
8288723: Avoid redundant ConcurrentHashMap.get call in java.time
On Tue, 21 Jun 2022 18:12:23 GMT, Naoto Sato wrote:
>> This is a regression caused by the fix to
>> [JDK-8286287](https://bugs.openjdk.org/browse/JDK-8286287), which assumed
>> the method `String.decodeWithDecoder()` was only invoked with cs.REPLACE
>> mode based on the comment "should not
On Wed, 15 Jun 2022 19:49:52 GMT, Andrey Turbanov wrote:
> If a thread-safe implementation is not needed, it is recommended to use
> HashMap in place of Hashtable.
> `ConditionalSpecialCasing.entryTable` is read-only Map which is modified only
> in `static` block. It means w
Instead of separate ConcurrentHashMap.get call, we can use result of previous
putIfAbsent call.
-
Commit messages:
- [PATCH] Avoid redundant ConcurrentHashMap.get call in java.time
Changes: https://git.openjdk.org/jdk/pull/9208/files
Webrev:
If a thread-safe implementation is not needed, it is recommended to use HashMap
in place of Hashtable.
`ConditionalSpecialCasing.entryTable` is read-only Map which is modified only
in `static` block. It means we can safely replace it with HashMap.
-
Commit messages:
- [PATCH]
On Sat, 23 Apr 2022 21:02:50 GMT, Andrey Turbanov wrote:
> TimeUnit.toMillis/toNanos/toMicros/toSeconds is shorter and a bit faster.
> Compared via JMH benchmark: 150ns -> 125ns/op
>
> Benchamark adapted from
> http://cr.openjdk.java.net/~shade/8152083/TimeUnitBench.ja
the OS can not supply it.
* The process is known to exist but not the exact start time.
*/
private final long STARTTIME_ANY = 0L;
/* The start time of a Process that does not exist. */
private final long STARTTIME_PROCESS_UNKNOWN = -1;
Andrey Turbanov
201 - 267 of 267 matches
Mail list logo