8188824: sanity/client/SwingSet/src/ProgressBarDemoTest: Failed with NullPointerException
authorshurailine
Tue, 10 Oct 2017 09:10:43 -0700
changeset 47382 6dff69a7fecc
parent 47381 6cd8fe45ac91
child 47383 74429839ae97
8188824: sanity/client/SwingSet/src/ProgressBarDemoTest: Failed with NullPointerException Reviewed-by: ssadetsky
test/jdk/sanity/client/lib/jemmy/src/org/netbeans/jemmy/Timeouts.java
--- a/test/jdk/sanity/client/lib/jemmy/src/org/netbeans/jemmy/Timeouts.java	Mon Oct 09 11:38:46 2017 -0700
+++ b/test/jdk/sanity/client/lib/jemmy/src/org/netbeans/jemmy/Timeouts.java	Tue Oct 10 09:10:43 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -46,11 +46,10 @@
 public class Timeouts {
 
     private static final long DELTA_TIME = 100;
-
-    private static Timeouts defaults;
+    private static final Timeouts defaults;
+    private static double timeoutsScale = -1;
 
-    private Hashtable<String, Long> timeouts;
-    private static double timeoutsScale = -1;
+    private final Hashtable<String, Long> timeouts;
 
     /**
      * Creates empty Timeouts object.
@@ -204,7 +203,6 @@
         long oldValue = -1;
         if (contains(name)) {
             oldValue = getTimeout(name);
-            timeouts.remove(name);
         }
         timeouts.put(name, newValue);
         return oldValue;