Skip to content

Commit eb05971

Browse files
qavidjzheaux
authored andcommitted
Update JavaDoc according to implementation
Update ClaimAccessor#getClaimAsMap and ClaimAccessor#getClaimAsStringList JavaDoc according to the current implementation Closes gh-10117
1 parent 97dfabe commit eb05971

File tree

1 file changed

+13
-9
lines changed
  • oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core

1 file changed

+13
-9
lines changed

oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/ClaimAccessor.java

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -133,11 +133,13 @@ default URL getClaimAsURL(String claim) {
133133
}
134134

135135
/**
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.
138138
* @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}
141143
*/
142144
@SuppressWarnings("unchecked")
143145
default Map<String, Object> getClaimAsMap(String claim) {
@@ -156,11 +158,13 @@ default Map<String, Object> getClaimAsMap(String claim) {
156158
}
157159

158160
/**
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.
161163
* @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}
164168
*/
165169
@SuppressWarnings("unchecked")
166170
default List<String> getClaimAsStringList(String claim) {

0 commit comments

Comments
 (0)