Skip to content

Commit

Permalink
Refactor 'HashStoreRunnable' run's switch case per formatter suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
doulikecookiedough committed Aug 13, 2024
1 parent 75ba6c0 commit f5ca23d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/test/java/org/dataone/hashstore/HashStoreRunnable.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public void run() {
log.debug("HashStoreRunnable - Called to: " + publicAPIMethod);
try {
switch (publicAPIMethod) {
case storeObject:
case storeObject -> {
try {
hashstore.storeObject(objStream, pid, null, null, null, -1);
} catch (Exception e) {
Expand All @@ -79,8 +79,8 @@ public void run() {
throw new HashStoreServiceException(errMsg);
}
objStream.close();
break;
case deleteObject:
}
case deleteObject -> {
try {
hashstore.deleteObject(pid);
} catch (Exception e) {
Expand All @@ -90,7 +90,7 @@ public void run() {
log.error(errMsg);
throw new HashStoreServiceException(errMsg);
}
break;
}
}
} catch (HashStoreServiceException | IOException hse) {
log.error(
Expand Down

0 comments on commit f5ca23d

Please sign in to comment.