Index: oak-jackrabbit-api/src/main/java/org/apache/jackrabbit/api/security/authentication/token/package-info.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- oak-jackrabbit-api/src/main/java/org/apache/jackrabbit/api/security/authentication/token/package-info.java (revision 1865090)
+++ oak-jackrabbit-api/src/main/java/org/apache/jackrabbit/api/security/authentication/token/package-info.java (date 1565941340000)
@@ -18,5 +18,5 @@
/**
* Token credentials.
*/
-@org.osgi.annotation.versioning.Version("2.3")
+@org.osgi.annotation.versioning.Version("2.3.1")
package org.apache.jackrabbit.api.security.authentication.token;
Index: oak-jackrabbit-api/src/main/java/org/apache/jackrabbit/api/security/authentication/token/TokenCredentials.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- oak-jackrabbit-api/src/main/java/org/apache/jackrabbit/api/security/authentication/token/TokenCredentials.java (revision 1865090)
+++ oak-jackrabbit-api/src/main/java/org/apache/jackrabbit/api/security/authentication/token/TokenCredentials.java (date 1565941202000)
@@ -16,6 +16,9 @@
*/
package org.apache.jackrabbit.api.security.authentication.token;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
import javax.jcr.Credentials;
import java.util.HashMap;
@@ -37,7 +40,7 @@
* @throws IllegalArgumentException If the specified token is null
* or empty string.
*/
- public TokenCredentials(String token) throws IllegalArgumentException {
+ public TokenCredentials(@NotNull String token) throws IllegalArgumentException {
if (token == null || token.length() == 0) {
throw new IllegalArgumentException("Invalid token '" + token + "'");
}
@@ -49,6 +52,7 @@
*
* @return the token.
*/
+ @NotNull
public String getToken() {
return token;
}
@@ -59,7 +63,7 @@
* @param name a String specifying the name of the attribute
* @param value the Object to be stored
*/
- public void setAttribute(String name, String value) {
+ public void setAttribute(@NotNull String name, @Nullable String value) {
// name cannot be null
if (name == null) {
throw new IllegalArgumentException("name cannot be null");
@@ -84,7 +88,8 @@
* @return an Object containing the value of the attribute, or
* null if the attribute does not exist
*/
- public String getAttribute(String name) {
+ @Nullable
+ public String getAttribute(@NotNull String name) {
synchronized (attributes) {
return (attributes.get(name));
}
@@ -96,7 +101,7 @@
* @param name a String specifying the name of the attribute to
* remove
*/
- public void removeAttribute(String name) {
+ public void removeAttribute(@NotNull String name) {
synchronized (attributes) {
attributes.remove(name);
}
@@ -109,6 +114,7 @@
*
* @return a string array containing the names of the stored attributes
*/
+ @NotNull
public String[] getAttributeNames() {
synchronized (attributes) {
return attributes.keySet().toArray(new String[attributes.keySet().size()]);