changeset 47382:6dff69a7fecc

8188824: sanity/client/SwingSet/src/ProgressBarDemoTest: Failed with NullPointerException Reviewed-by: ssadetsky
author shurailine
date Tue, 10 Oct 2017 09:10:43 -0700
parents 6cd8fe45ac91
children 74429839ae97
files test/jdk/sanity/client/lib/jemmy/src/org/netbeans/jemmy/Timeouts.java
diffstat 1 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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 final Timeouts defaults;
+    private static double timeoutsScale = -1;
 
-    private static Timeouts defaults;
-
-    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;