From cf658cf57d4970f9a1f80d85a46b185746fcf3ba Mon Sep 17 00:00:00 2001 From: Ihromant Date: Fri, 12 Jun 2020 14:01:53 +0300 Subject: [PATCH] Simplification --- .../src/main/java/org/teavm/classlib/java/util/TOptional.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classlib/src/main/java/org/teavm/classlib/java/util/TOptional.java b/classlib/src/main/java/org/teavm/classlib/java/util/TOptional.java index 901bfe817..a0f472e67 100644 --- a/classlib/src/main/java/org/teavm/classlib/java/util/TOptional.java +++ b/classlib/src/main/java/org/teavm/classlib/java/util/TOptional.java @@ -63,7 +63,7 @@ public final class TOptional { } public TStream stream() { - if (!isPresent()) { + if (value == null) { return TStream.empty(); } else { return TStream.of(value);