# HG changeset patch # User nishjain # Date 1474207777 -32400 # Node ID 69efd667068dd1f2cd7b2cc50b381d8c43c33b6b # Parent b0caaa706f76c9f86b0c88b7dd3f45bc0d4b8818 8165984: ResourceBundle lookup fields not completely thread-safe Reviewed-by: okutsu, naoto diff -r b0caaa706f76 -r 69efd667068d jdk/src/java.base/share/classes/java/util/ListResourceBundle.java --- a/jdk/src/java.base/share/classes/java/util/ListResourceBundle.java Sat Sep 17 16:37:52 2016 -0700 +++ b/jdk/src/java.base/share/classes/java/util/ListResourceBundle.java Sun Sep 18 23:09:37 2016 +0900 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2016, 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 @@ -206,5 +206,5 @@ lookup = temp; } - private Map lookup = null; + private volatile Map lookup = null; } diff -r b0caaa706f76 -r 69efd667068d jdk/src/java.base/share/classes/java/util/PropertyResourceBundle.java --- a/jdk/src/java.base/share/classes/java/util/PropertyResourceBundle.java Sat Sep 17 16:37:52 2016 -0700 +++ b/jdk/src/java.base/share/classes/java/util/PropertyResourceBundle.java Sun Sep 18 23:09:37 2016 +0900 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2016, 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,8 +46,6 @@ import java.nio.charset.MalformedInputException; import java.nio.charset.StandardCharsets; import java.nio.charset.UnmappableCharacterException; -import java.security.AccessController; -import java.util.Locale; import sun.security.action.GetPropertyAction; import sun.util.PropertyResourceBundleCharset; import sun.util.ResourceBundleEnumeration; @@ -236,5 +234,5 @@ // ==================privates==================== - private Map lookup; + private final Map lookup; }