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:
Loredana Crusoveanu 2019-07-17 15:24:02 +03:00 committed by GitHub
commit 9d9806306a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -259,4 +259,15 @@ public class OptionalUnitTest {
LOG.debug("Getting 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());
// }
}