Re: RFR: 8291954: Use Optional.isEmpty instead of !Optional.isPresent in java.base

2022-08-05 Thread Brian Burkhalter
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. Marked as reviewed by bpb (Reviewer). --

Re: RFR: 8291954: Use Optional.isEmpty instead of !Optional.isPresent in java.base

2022-08-05 Thread Roger Riggs
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. Marked as reviewed by rriggs (Reviewer). ---

Re: RFR: 8291954: Use Optional.isEmpty instead of !Optional.isPresent in java.base

2022-08-05 Thread Lance Andersen
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. Marked as reviewed by lancea (Reviewer). ---

Re: RFR: 8291954: Use Optional.isEmpty instead of !Optional.isPresent in java.base

2022-08-05 Thread Alan Bateman
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. Looks good. The isEmpty was added in Java 11 so I

Re: RFR: 8291954: Use Optional.isEmpty instead of !Optional.isPresent in java.base

2022-08-05 Thread Jaikiran Pai
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. The changes look fine to me. - Mark

RFR: 8291954: Use Optional.isEmpty instead of !Optional.isPresent in java.base

2022-08-05 Thread Andrey Turbanov
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 Change