-
Type:
Bug
-
Resolution: Not an Issue
-
Priority:
P5
-
None
-
Affects Version/s: None
-
Component/s: core-libs
SonarCloud reports an oddity in `java.util.stream.FindOps.FindSink.OfRef.get()`
```
@Override
public Optional<T> get() {
return hasValue ? Optional.of(value) : null;
}
```
The method return type is Optional, but it returns `null`.
Looks like a minor overlook, as similar code in ReduceOps returns Optional.empty(). There might be other implications to this.
```
@Override
public Optional<T> get() {
return hasValue ? Optional.of(value) : null;
}
```
The method return type is Optional, but it returns `null`.
Looks like a minor overlook, as similar code in ReduceOps returns Optional.empty(). There might be other implications to this.