Skip to content

SonarCloud fix: java:S108 Nested blocks of code should not be left empty #10396

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ public void testAddOrRemoveServersToOrFromGroup() throws Exception {
fail();
}
catch (ServerNotInGroupException e) {
//should be here
}

assertFalse(serverGroup.getServers().contains(testServer1));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,7 @@ public void testListChannelsNoMinion() {
fail("Expected NoSuchSystemException");
}
catch (NoSuchSystemException e) {
//should be here
}
catch (Throwable t) {
fail("Expected NoSuchSystemException but got " + t);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ public void testRoleCheck() {
fail("PermissionCheckFailureException should be thrown");
}
catch (PermissionCheckFailureException e) {
//should be here
}

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ public void testAddPathStateChannel() {

}
catch (InvalidOperationException e) {

//should be here
}
//Symlinks are not allowed for state channel
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ public final void testCreateImageProfileFailed() throws Exception {
fail("Invalid store provided.");
}
catch (NoSuchImageStoreException ignore) {
//should be here
}

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ public void testActionsArchivedOnSystemDeleteUser() throws Exception {
fail("Must throw LookupException.");
}
catch (LookupException ignored) {
//should be here
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public void testInValidContents() throws Exception {
fail("Exception expected but didn't throw");
}
catch (InvalidFormulaException ex) {

//should be here
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ public static String fixUuidIfSwappedUuidExists(String uuid) {
}
}
catch (IllegalArgumentException ignored) {
//ignored
}
return uuid;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ public void startup() throws TaskomaticException {
this.shutdownLock.wait();
}
catch (InterruptedException ignored) {
//ignored
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,14 @@ public void testListRoleCheck() {
fail("PermissionCheckFailureException should be thrown");
}
catch (PermissionCheckFailureException e) {
//should be here
}
try {
handler.list(admin);
fail("PermissionCheckFailureException should be thrown");
}
catch (PermissionCheckFailureException e) {
//should be here
}
}

Expand All @@ -107,12 +109,14 @@ public void testCreateRoleCheck() throws TaskomaticApiException {
fail("PermissionCheckFailureException should be thrown");
}
catch (PermissionCheckFailureException e) {
//should be here
}
try {
handler.create(regular, null, null, null, null, null, null, null);
fail("PermissionCheckFailureException should be thrown");
}
catch (PermissionCheckFailureException e) {
//should be here
}
}

Expand All @@ -126,12 +130,14 @@ public void testSetDetailsRoleCheck() throws TaskomaticApiException {
fail("PermissionCheckFailureException should be thrown");
}
catch (PermissionCheckFailureException e) {
//should be here
}
try {
handler.setDetails(regular, null, null);
fail("PermissionCheckFailureException should be thrown");
}
catch (PermissionCheckFailureException e) {
//should be here
}
}

Expand All @@ -142,12 +148,14 @@ public void testDeleteRoleCheck() {
fail("PermissionCheckFailureException should be thrown");
}
catch (PermissionCheckFailureException e) {
//should be here
}
try {
handler.delete(regular, null);
fail("PermissionCheckFailureException should be thrown");
}
catch (PermissionCheckFailureException e) {
//should be here
}
}

Expand Down
Loading