Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,7 @@ public static boolean isEmpty(@Nullable Object obj) {
@Nullable
public static Object unwrapOptional(@Nullable Object obj) {
if (obj instanceof Optional<?> optional) {
if (optional.isEmpty()) {
return null;
}
Object result = optional.get();
Object result = optional.orElse(null);
Assert.isTrue(!(result instanceof Optional), "Multi-level Optional usage not supported");
return result;
}
Expand Down