mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-03 14:38:51 +00:00
Fix annotation inconsistency and other nonsense
This commit is contained in:
1 parent
3f6d47be1c
commit
8a1b574d62
48 files changed
+182
-326
No files matched your search
+3
-6
@@ -72,8 +72,7 @@ public class JSONUserService<T extends ChatUser> implements UserService<T> {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public T wrap(final @NonNull UUID uuid) {
|
||||
public @Nullable T wrap(final @NonNull UUID uuid) {
|
||||
try {
|
||||
return this.userCache.get(uuid);
|
||||
} catch (final ExecutionException exception) {
|
||||
@@ -83,14 +82,12 @@ public class JSONUserService<T extends ChatUser> implements UserService<T> {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public T wrapIfLoaded(final @NonNull UUID uuid) {
|
||||
public @Nullable T wrapIfLoaded(final @NonNull UUID uuid) {
|
||||
return this.userCache.getIfPresent(uuid);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public T refreshUser(final @NonNull UUID uuid) {
|
||||
public @Nullable T refreshUser(final @NonNull UUID uuid) {
|
||||
this.userCache.invalidate(uuid);
|
||||
|
||||
return this.wrap(uuid);
|
||||
|
||||
+3
-6
@@ -107,8 +107,7 @@ public class MySQLUserService<T extends ChatUser> implements UserService<T> {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public T wrap(final @NonNull UUID uuid) {
|
||||
public @Nullable T wrap(final @NonNull UUID uuid) {
|
||||
try {
|
||||
return this.userCache.get(uuid);
|
||||
} catch (final ExecutionException exception) {
|
||||
@@ -118,14 +117,12 @@ public class MySQLUserService<T extends ChatUser> implements UserService<T> {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public T wrapIfLoaded(final @NonNull UUID uuid) {
|
||||
public @Nullable T wrapIfLoaded(final @NonNull UUID uuid) {
|
||||
return this.userCache.getIfPresent(uuid);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public T refreshUser(final @NonNull UUID uuid) {
|
||||
public @Nullable T refreshUser(final @NonNull UUID uuid) {
|
||||
this.userCache.invalidate(uuid);
|
||||
|
||||
return this.wrap(uuid);
|
||||
|
||||
Reference in new issue
Block a user