Missing nullability annotations

This commit is contained in:
Luck 2018-12-07 13:33:05 +00:00
parent 1213e58240
commit e222e4e98c
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B
2 changed files with 4 additions and 2 deletions

View File

@ -80,14 +80,14 @@ public interface HeldPermission<T> {
*
* @return the expiry time
*/
OptionalLong getExpiry();
@NonNull OptionalLong getExpiry();
/**
* Gets the extra context for the permission.
*
* @return the extra context
*/
ContextSet getContexts();
@NonNull ContextSet getContexts();
/**
* Converts this permission into a Node

View File

@ -71,11 +71,13 @@ public final class NodeHeldPermission<T extends Comparable<T>> implements HeldPe
return this.node.getWorld();
}
@NonNull
@Override
public OptionalLong getExpiry() {
return this.node.isTemporary() ? OptionalLong.of(this.node.getExpiryUnixTime()) : OptionalLong.empty();
}
@NonNull
@Override
public ContextSet getContexts() {
return this.node.getContexts();