From f176ae2223d8d75cd7dc4a79db0190318ef57a48 Mon Sep 17 00:00:00 2001 From: Simon Stewart Date: Sun, 4 Mar 2018 21:00:02 -0800 Subject: [PATCH] [grid] Remove unthrown exception from method signatures --- .../grid/web/servlet/RegistrationServlet.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/java/server/src/org/openqa/grid/web/servlet/RegistrationServlet.java b/java/server/src/org/openqa/grid/web/servlet/RegistrationServlet.java index 7b417960fd757..43e860555cdf6 100644 --- a/java/server/src/org/openqa/grid/web/servlet/RegistrationServlet.java +++ b/java/server/src/org/openqa/grid/web/servlet/RegistrationServlet.java @@ -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); } @@ -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(); }