Skip to content

Commit 3d89560

Browse files
committed
fix: Address SonarCloud findings (catch Exception, drop unused import)
1 parent 507aca2 commit 3d89560

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

src/main/java/com/retailsvc/http/internal/RequestPreparationFilter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,14 +143,14 @@ private void fireAfterHooks(HttpExchange exchange, Request request) {
143143
for (AfterResponseHook hook : afterHooks) {
144144
try {
145145
hook.after(request, response);
146-
} catch (Throwable t) {
146+
} catch (Exception t) {
147147
LOG.debug("after-response hook threw", t);
148148
}
149149
}
150150
for (Runnable runnable : snapshot) {
151151
try {
152152
runnable.run();
153-
} catch (Throwable t) {
153+
} catch (Exception t) {
154154
LOG.debug("after-response runnable threw", t);
155155
}
156156
}

src/test/java/com/retailsvc/http/internal/RequestPreparationFilterTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import com.sun.net.httpserver.Headers;
2828
import com.sun.net.httpserver.HttpExchange;
2929
import java.io.ByteArrayInputStream;
30-
import java.io.IOException;
3130
import java.net.URI;
3231
import java.nio.charset.StandardCharsets;
3332
import java.util.List;

0 commit comments

Comments
 (0)