Skip to content

Commit

Permalink
Fix Sonar issue
Browse files Browse the repository at this point in the history
  • Loading branch information
nroduit committed Sep 6, 2024
1 parent 8f4baaf commit ccba840
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,7 @@ private static String getStreamEncoding(InputStream is) throws IOException {
}

private Void runSingletonServer() {
ExecutorService executor = Executors.newFixedThreadPool(1);

try {
try (ExecutorService executor = Executors.newFixedThreadPool(1)) {
while (!Thread.currentThread().isInterrupted()) {
try {
Socket socket = ss.accept();
Expand All @@ -363,8 +361,6 @@ private Void runSingletonServer() {
LOGGER.error("Error accepting connection", e);
}
}
} finally {
executor.shutdown();
}
return null;
}
Expand Down
4 changes: 0 additions & 4 deletions weasis-launcher/src/main/java/org/weasis/launcher/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ public static boolean hasText(CharSequence str) {
return false;
}

public static boolean hasText(String str) {
return hasText((CharSequence) str);
}

public static String getWeasisProtocol(String... params) {
Pattern pattern = Pattern.compile("^weasis(-.*)?://.*?");
for (String p : params) {
Expand Down

0 comments on commit ccba840

Please sign in to comment.