Skip to content

Commit 9986928

Browse files
thjaeckleclaude
andcommitted
Fix Java 8 compatibility: replace Optional.isEmpty()
Optional.isEmpty() was introduced in Java 11. Replaced with the Java 8 equivalent !Optional.isPresent() in PolicyImporter. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 2a25fed commit 9986928

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

policies/model/src/main/java/org/eclipse/ditto/policies/model/PolicyImporter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ private static PolicyEntry resolveOneReference(final Policy importingPolicy,
341341
referencedEntryOpt = importingPolicy.getEntryFor(ref.getEntryLabel());
342342
}
343343

344-
if (referencedEntryOpt.isEmpty()) {
344+
if (!referencedEntryOpt.isPresent()) {
345345
return ownEntry; // referenced entry not found, skip
346346
}
347347
final PolicyEntry referencedEntry = referencedEntryOpt.get();

0 commit comments

Comments
 (0)