diff --git a/simpleexample2/restserver/src/main/java/simpleex/restserver/LatLongGrizzlyApp.java b/simpleexample2/restserver/src/main/java/simpleex/restserver/LatLongGrizzlyApp.java index 6e7fae7d74fb178589a878d5ed6777ce4f0549db..dc0faf74ba96087d81a2cb654e95cb2fa2c0989b 100644 --- a/simpleexample2/restserver/src/main/java/simpleex/restserver/LatLongGrizzlyApp.java +++ b/simpleexample2/restserver/src/main/java/simpleex/restserver/LatLongGrizzlyApp.java @@ -3,7 +3,6 @@ package simpleex.restserver; import java.net.URI; import java.util.logging.Level; import java.util.logging.Logger; - import org.glassfish.grizzly.http.server.HttpServer; import org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory; import org.glassfish.jersey.server.ResourceConfig; @@ -16,12 +15,7 @@ public class LatLongGrizzlyApp { try { final ResourceConfig resourceConfig = new LatLongConfig(); final HttpServer server = GrizzlyHttpServerFactory.createHttpServer(BASE_URI, resourceConfig); - Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() { - @Override - public void run() { - server.shutdownNow(); - } - })); + Runtime.getRuntime().addShutdownHook(new Thread(server::shutdownNow)); Thread.currentThread().join(); } catch (final InterruptedException ex) { Logger.getLogger(LatLongGrizzlyApp.class.getName()).log(Level.SEVERE, null, ex);