# HG changeset patch # User shurailine # Date 1507651843 25200 # Node ID 6dff69a7fecca1b78448da555291cdfa7061d5e9 # Parent 6cd8fe45ac913e0b61edfefc6bbaa053870727ab 8188824: sanity/client/SwingSet/src/ProgressBarDemoTest: Failed with NullPointerException Reviewed-by: ssadetsky diff -r 6cd8fe45ac91 -r 6dff69a7fecc 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 timeouts; - private static double timeoutsScale = -1; + private final Hashtable 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;