Merge pull request #7173 from amit2103/BAEL-14274-7
[BAEL-14274] - Fixed article code for https://www.baeldung.com/java-o…
This commit is contained in:
commit
9d9806306a
@ -259,4 +259,15 @@ public class OptionalUnitTest {
|
|||||||
LOG.debug("Getting default value...");
|
LOG.debug("Getting default value...");
|
||||||
return "Default Value";
|
return "Default Value";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Uncomment code when code base is compatiable with Java 11
|
||||||
|
// @Test
|
||||||
|
// public void givenAnEmptyOptional_thenIsEmptyBehavesAsExpected() {
|
||||||
|
// Optional<String> opt = Optional.of("Baeldung");
|
||||||
|
// assertFalse(opt.isEmpty());
|
||||||
|
//
|
||||||
|
// opt = Optional.ofNullable(null);
|
||||||
|
// assertTrue(opt.isEmpty());
|
||||||
|
// }
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user