--- a/jdk/src/jdk.httpserver/share/classes/sun/net/httpserver/ServerImpl.java Mon Dec 01 11:34:44 2014 -0500
+++ b/jdk/src/jdk.httpserver/share/classes/sun/net/httpserver/ServerImpl.java Mon Dec 01 17:20:06 2014 +0000
@@ -206,11 +206,13 @@
if (timer1Enabled) {
timer1.cancel();
}
- try {
- dispatcherThread.join();
- } catch (InterruptedException e) {
- Thread.currentThread().interrupt();
- logger.log(Level.FINER, "ServerImpl.stop: ", e);
+ if (dispatcherThread != null) {
+ try {
+ dispatcherThread.join();
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ logger.log(Level.FINER, "ServerImpl.stop: ", e);
+ }
}
}