Skip to content

Commit

Permalink
fix pmd violation
Browse files Browse the repository at this point in the history
  • Loading branch information
Lorias-Jak committed Dec 26, 2024
1 parent e10f943 commit e1feca1
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,12 @@ public Set<String> getNameEntries() throws StorageException {
@Override
public void removeUser(final UUID uniqueId) throws StorageException {
Objects.requireNonNull(uniqueId);
getName(uniqueId).ifPresent(name -> {
try {
storageProvider.delete(name);
} catch (final StorageException e) {
throw new RuntimeException(e);
}
});
final Optional<String> optionalName = getName(uniqueId);

if (optionalName.isPresent()) {
final String name = optionalName.get();
storageProvider.delete(name);
}
}

@Override
Expand Down

0 comments on commit e1feca1

Please sign in to comment.