2026/9/24 -The ofNullable() method of the Optional class creates an Optional containing the specified value when it is non-null. If the value is null, it returns an empty ...
2026/10/10 -Java Optional guide with examples of of, ofNullable, map, flatMap, orElseThrow, isEmpty, stream and or, plus where not to use Optional.
2026/11/20 -Reports uses of Optional.ofNullable() where always null or always not-null argument is passed. There's no point in using Optional.ofNullable() in this case: ...
2026/10/6 -The obvious fix: Optional everywhere. The modern-looking answer is to replace the checks with Optional : Optional.ofNullable(req) .map(CallbackRequest ...
2026/10/1 -Using null to represent a missing value requires explicit null checks. If these checks are missed, accessing the value can result in a NullPointerException.
2026/11/4 -Of course, we can take complete control of the mapping process by implementing a setter method for an optional field for which we want to provide a value.
2026/9/22 -Optional<T> is a way of replacing a nullable T reference with a non-null value. An Optional may either contain a non-null T reference (in which case we say the ...
2026/11/7 -Modern Java provides Pattern Matching for switch expressions, allowing you to destructure types cleanly while handling exhaustiveness and null safety natively.
2026/10/20 -Java 8 features with examples, tested on a real JDK 8: lambdas, streams, Optional, default methods, java.time and functional interfaces, plus interview ...
2026/11/1 -NULL vs UNDEFINED: Why Should I Care? In most cases, the difference between null and undefined is not important when dealing with JSON serialization.