Skip to content

Commit

Permalink
fix: Fixed code smell
Browse files Browse the repository at this point in the history
Refs: #31
  • Loading branch information
nirikash committed Sep 17, 2024
1 parent fc81a40 commit 17deb32
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ protected void doGet(final HttpServletRequest req, final HttpServletResponse res
try {
getServletContext().getRequestDispatcher("/hookExample.jsp").forward(req, resp);
} catch (Exception e) {
throw new RuntimeException("Get request processing failure: " + e.getMessage(), e);
throw new IllegalStateException("Get request processing failure: " + e.getMessage(), e);

Check notice

Code scanning / SonarCloud

Exceptions should not be thrown from servlet methods Low

Handle the "IllegalStateException" thrown here in a "try/catch" block. See more on SonarCloud
}
}
}
Expand Down

0 comments on commit 17deb32

Please sign in to comment.