From 12a2f2310113a076819035d700b2cc2e6d7fbb63 Mon Sep 17 00:00:00 2001 From: Hynek Mlnarik Date: Mon, 19 Feb 2018 13:08:12 +0100 Subject: [PATCH] KEYCLOAK-6651 Fix JDK7 compilation issue --- .../main/java/org/keycloak/rotation/CompositeKeyLocator.java | 5 +++++ .../main/java/org/keycloak/rotation/HardcodedKeyLocator.java | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/saml-core/src/main/java/org/keycloak/rotation/CompositeKeyLocator.java b/saml-core/src/main/java/org/keycloak/rotation/CompositeKeyLocator.java index 4b3cb57a7d..c58973b1a9 100644 --- a/saml-core/src/main/java/org/keycloak/rotation/CompositeKeyLocator.java +++ b/saml-core/src/main/java/org/keycloak/rotation/CompositeKeyLocator.java @@ -153,6 +153,11 @@ public class CompositeKeyLocator implements KeyLocator, Iterable { } return this; } + + @Override + public void remove() { + throw new UnsupportedOperationException("remove"); // Same as default implementation in JDK 8 - to support JDK 7 compilation + } }.findNext(); } } diff --git a/saml-core/src/main/java/org/keycloak/rotation/HardcodedKeyLocator.java b/saml-core/src/main/java/org/keycloak/rotation/HardcodedKeyLocator.java index ae2615a07b..f9a9870ccb 100644 --- a/saml-core/src/main/java/org/keycloak/rotation/HardcodedKeyLocator.java +++ b/saml-core/src/main/java/org/keycloak/rotation/HardcodedKeyLocator.java @@ -64,6 +64,6 @@ public class HardcodedKeyLocator implements KeyLocator, Iterable { @Override public Iterator iterator() { - return Collections.unmodifiableCollection(keys).iterator(); + return (Iterator) Collections.unmodifiableCollection(keys).iterator(); } }