From a36e4c69ba980ed1adaffffbebb29e92046a2419 Mon Sep 17 00:00:00 2001
From: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Date: Wed, 26 May 2021 09:08:00 +0000
Subject: [PATCH] Update to Keycloak 13.0.1

---
 src/main/java/org/keycloak/protocol/cas/utils/AttributesMapAdapter.java |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/main/java/org/keycloak/protocol/cas/utils/AttributesMapAdapter.java b/src/main/java/org/keycloak/protocol/cas/utils/AttributesMapAdapter.java
index bf9b148..8afc07b 100644
--- a/src/main/java/org/keycloak/protocol/cas/utils/AttributesMapAdapter.java
+++ b/src/main/java/org/keycloak/protocol/cas/utils/AttributesMapAdapter.java
@@ -1,6 +1,6 @@
 package org.keycloak.protocol.cas.utils;
 
-import org.keycloak.protocol.cas.representations.CasServiceResponse;
+import org.keycloak.protocol.cas.representations.CASServiceResponse;
 
 import javax.xml.bind.JAXBElement;
 import javax.xml.bind.annotation.XmlAccessType;
@@ -10,6 +10,7 @@
 import javax.xml.bind.annotation.adapters.XmlAdapter;
 import javax.xml.namespace.QName;
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.List;
 import java.util.Map;
 
@@ -37,8 +38,8 @@
         AttributeWrapperType(Map<String, Object> attributes) {
             this.elements = new ArrayList<>();
             for (Map.Entry<String, Object> entry : attributes.entrySet()) {
-                if (entry.getValue() instanceof List) {
-                    for (Object item : ((List) entry.getValue())) {
+                if (entry.getValue() instanceof Collection) {
+                    for (Object item : ((Collection) entry.getValue())) {
                         addElement(entry.getKey(), item);
                     }
                 } else {
@@ -49,7 +50,7 @@
 
         private void addElement(String name, Object value) {
             if (value != null) {
-                String namespace = CasServiceResponse.class.getPackage().getAnnotation(XmlSchema.class).namespace();
+                String namespace = CASServiceResponse.class.getPackage().getAnnotation(XmlSchema.class).namespace();
                 elements.add(new JAXBElement<>(new QName(namespace, name), String.class, value.toString()));
             }
         }

--
Gitblit v1.9.1