Skip to content

Commit

Permalink
[grid] Remove unthrown exception from method signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
shs96c committed Mar 6, 2018
1 parent 22d2498 commit f176ae2
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ public RegistrationServlet(GridRegistry registry) {

@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
throws IOException {
process(request, response);
}

@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
throws IOException {
process(request, response);
}

Expand Down Expand Up @@ -105,11 +105,10 @@ protected void process(HttpServletRequest request, HttpServletResponse response)

reply(response, "ok");

new Thread(new Runnable() { // Thread safety reviewed
public void run() {
getRegistry().add(proxy);
log.fine("proxy added " + proxy.getRemoteHost());
}
// Thread safety reviewed
new Thread(() -> {
getRegistry().add(proxy);
log.fine("proxy added " + proxy.getRemoteHost());
}).start();
}

Expand Down

0 comments on commit f176ae2

Please sign in to comment.