Skip to content

Commit

Permalink
Fix Code Issues (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
aahmed-se authored Feb 2, 2024
1 parent c403aa7 commit 3c0a20d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void testWrongNamespace() {
Assertions.fail("Unexpected behaviour!");
} catch (CompletionException exception) {
Assertions.assertNotNull(exception.getCause());
Assertions.assertTrue(exception.getCause() instanceof NamespaceNotFoundException);
Assertions.assertInstanceOf(NamespaceNotFoundException.class, exception.getCause());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ protected CompletableFuture<Void> storeDelete(String path, Optional<Long> expect
return getChildrenFromStore(path)
.thenCompose(
children -> {
if (children.size() > 0) {
if (!children.isEmpty()) {
return CompletableFuture.failedFuture(
new MetadataStoreException("Key '" + path + "' has children"));
} else {
Expand Down Expand Up @@ -237,7 +237,7 @@ private <T> CompletionStage<T> convertException(Throwable ex) {

private CompletableFuture<Void> createParents(String path) {
var parent = parent(path);
if (parent == null || parent.length() == 0) {
if (parent == null || parent.isEmpty()) {
return CompletableFuture.completedFuture(null);
}
return exists(parent)
Expand Down

0 comments on commit 3c0a20d

Please sign in to comment.