On Tue, 4 Apr 2023 20:50:00 GMT, Andrey Turbanov wrote:
>> `Map.containsKey` call is sometimes unnecessary, when it's known that `Map`
>> doesn't contain `null` values.
>> Instead of pair containsKey+put we can use putIfAbsent and compare result
>> with null.
>> Result code is shorter and a bit
On Tue, 4 Apr 2023 20:43:13 GMT, Andrey Turbanov wrote:
> But now `requireServiceTypeName` is called unconditionally.
requireServiceTypeName(service) should only be called when using the API. The
non-strict route is when parsing a module-info on the module path, the checks
that the names are l
On Tue, 4 Apr 2023 13:57:26 GMT, Alan Bateman wrote:
> If you are changing uses(String) then it should obey `strict`, meaning put
> this at the beginning of the method
>
> ```
> if (strict) {
> requireServiceTypeName(service);
> }
> ```
But now `requireServiceTypeName` is called unconditio
> `Map.containsKey` call is sometimes unnecessary, when it's known that `Map`
> doesn't contain `null` values.
> Instead of pair containsKey+put we can use putIfAbsent and compare result
> with null.
> Result code is shorter and a bit faster.
Andrey Turbanov has updated the pull request incremen
On Tue, 4 Apr 2023 12:37:15 GMT, Andrey Turbanov wrote:
> Seems we can update `java.lang.module.ModuleDescriptor.Builder#uses` too to
> directly call `add` instead of `contains`+`add`
If you are changing uses(String) then it should obey `strict`, meaning put this
at the beginning of the method
On Mon, 3 Apr 2023 08:08:45 GMT, Andrey Turbanov wrote:
> `Map.containsKey` call is sometimes unnecessary, when it's known that `Map`
> doesn't contain `null` values.
> Instead of pair containsKey+put we can use putIfAbsent and compare result
> with null.
> Result code is shorter and a bit fast
`Map.containsKey` call is sometimes unnecessary, when it's known that `Map`
doesn't contain `null` values.
Instead of pair containsKey+put we can use putIfAbsent and compare result with
null.
Result code is shorter and a bit faster.
-
Commit messages:
- [PATCH] Avoid redundant Hash