1
1
/*
2
- * Copyright 2002-2019 the original author or authors.
2
+ * Copyright 2002-2021 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -133,11 +133,13 @@ default URL getClaimAsURL(String claim) {
133
133
}
134
134
135
135
/**
136
- * Returns the claim value as a {@code Map<String, Object>} or {@code null} if it does
137
- * not exist or cannot be assigned to a {@code Map} .
136
+ * Returns the claim value as a {@code Map<String, Object>} or {@code null} if the
137
+ * claim does not exist .
138
138
* @param claim the name of the claim
139
- * @return the claim value or {@code null} if it does not exist or cannot be assigned
140
- * to a {@code Map}
139
+ * @return the claim value or {@code null} if the claim does not exist
140
+ * @throws IllegalArgumentException if the claim value cannot be converted to a
141
+ * {@code List}
142
+ * @throws NullPointerException if the claim value is {@code null}
141
143
*/
142
144
@ SuppressWarnings ("unchecked" )
143
145
default Map <String , Object > getClaimAsMap (String claim ) {
@@ -156,11 +158,13 @@ default Map<String, Object> getClaimAsMap(String claim) {
156
158
}
157
159
158
160
/**
159
- * Returns the claim value as a {@code List<String>} or {@code null} if it does not
160
- * exist or cannot be assigned to a {@code List} .
161
+ * Returns the claim value as a {@code List<String>} or {@code null} if the claim does
162
+ * not exist .
161
163
* @param claim the name of the claim
162
- * @return the claim value or {@code null} if it does not exist or cannot be assigned
163
- * to a {@code List}
164
+ * @return the claim value or {@code null} if the claim does not exist
165
+ * @throws IllegalArgumentException if the claim value cannot be converted to a
166
+ * {@code List}
167
+ * @throws NullPointerException if the claim value is {@code null}
164
168
*/
165
169
@ SuppressWarnings ("unchecked" )
166
170
default List <String > getClaimAsStringList (String claim ) {
0 commit comments