Update JavaDoc according to implementation

Update ClaimAccessor#getClaimAsMap and ClaimAccessor#getClaimAsStringList
JavaDoc according to the current implementation

Closes gh-10117
This commit is contained in:
Dávid Kováč 2021-10-13 20:04:12 +02:00 committed by Josh Cummings
parent 97dfabe92e
commit eb0597154d
1 changed files with 13 additions and 9 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2019 the original author or authors. * Copyright 2002-2021 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -133,11 +133,13 @@ public interface ClaimAccessor {
} }
/** /**
* Returns the claim value as a {@code Map<String, Object>} or {@code null} if it does * Returns the claim value as a {@code Map<String, Object>} or {@code null} if the
* not exist or cannot be assigned to a {@code Map}. * claim does not exist.
* @param claim the name of the claim * @param claim the name of the claim
* @return the claim value or {@code null} if it does not exist or cannot be assigned * @return the claim value or {@code null} if the claim does not exist
* to a {@code Map} * @throws IllegalArgumentException if the claim value cannot be converted to a
* {@code List}
* @throws NullPointerException if the claim value is {@code null}
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
default Map<String, Object> getClaimAsMap(String claim) { default Map<String, Object> getClaimAsMap(String claim) {
@ -156,11 +158,13 @@ public interface ClaimAccessor {
} }
/** /**
* Returns the claim value as a {@code List<String>} or {@code null} if it does not * Returns the claim value as a {@code List<String>} or {@code null} if the claim does
* exist or cannot be assigned to a {@code List}. * not exist.
* @param claim the name of the claim * @param claim the name of the claim
* @return the claim value or {@code null} if it does not exist or cannot be assigned * @return the claim value or {@code null} if the claim does not exist
* to a {@code List} * @throws IllegalArgumentException if the claim value cannot be converted to a
* {@code List}
* @throws NullPointerException if the claim value is {@code null}
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
default List<String> getClaimAsStringList(String claim) { default List<String> getClaimAsStringList(String claim) {