Skip to content

Commit 9d98063

Browse files
authored
Merge pull request eugenp#7173 from amit2103/BAEL-14274-7
[BAEL-14274] - Fixed article code for https://www.baeldung.com/java-o…
2 parents 5db5c4b + 74f46ef commit 9d98063

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

core-java-modules/core-java-8/src/test/java/com/baeldung/java8/optional/OptionalUnitTest.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,4 +259,15 @@ public String getMyDefault() {
259259
LOG.debug("Getting default value...");
260260
return "Default Value";
261261
}
262+
263+
// Uncomment code when code base is compatiable with Java 11
264+
// @Test
265+
// public void givenAnEmptyOptional_thenIsEmptyBehavesAsExpected() {
266+
// Optional<String> opt = Optional.of("Baeldung");
267+
// assertFalse(opt.isEmpty());
268+
//
269+
// opt = Optional.ofNullable(null);
270+
// assertTrue(opt.isEmpty());
271+
// }
272+
262273
}

0 commit comments

Comments
 (0)