src/share/classes/sun/util/resources/OpenListResourceBundle.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2005, 2012, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2005, 2013, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 66,76 ****
protected OpenListResourceBundle() {
}
// Implements java.util.ResourceBundle.handleGetObject; inherits javadoc specification.
@Override
! public Object handleGetObject(String key) {
if (key == null) {
throw new NullPointerException();
}
loadLookupTablesIfNecessary();
--- 66,76 ----
protected OpenListResourceBundle() {
}
// Implements java.util.ResourceBundle.handleGetObject; inherits javadoc specification.
@Override
! protected Object handleGetObject(String key) {
if (key == null) {
throw new NullPointerException();
}
loadLookupTablesIfNecessary();
*** 80,111 ****
/**
* Implementation of ResourceBundle.getKeys.
*/
@Override
public Enumeration<String> getKeys() {
! ResourceBundle parent = this.parent;
! return new ResourceBundleEnumeration(handleGetKeys(),
! (parent != null) ? parent.getKeys() : null);
}
/**
* Returns a set of keys provided in this resource bundle,
* including no parents.
*/
! public Set<String> handleGetKeys() {
loadLookupTablesIfNecessary();
-
return lookup.keySet();
}
@Override
public Set<String> keySet() {
if (keyset != null) {
return keyset;
}
Set<String> ks = createSet();
! ks.addAll(handleGetKeys());
if (parent != null) {
ks.addAll(parent.keySet());
}
synchronized (this) {
if (keyset == null) {
--- 80,111 ----
/**
* Implementation of ResourceBundle.getKeys.
*/
@Override
public Enumeration<String> getKeys() {
! ResourceBundle parentBundle = this.parent;
! return new ResourceBundleEnumeration(handleKeySet(),
! (parentBundle != null) ? parentBundle.getKeys() : null);
}
/**
* Returns a set of keys provided in this resource bundle,
* including no parents.
*/
! @Override
! protected Set<String> handleKeySet() {
loadLookupTablesIfNecessary();
return lookup.keySet();
}
@Override
public Set<String> keySet() {
if (keyset != null) {
return keyset;
}
Set<String> ks = createSet();
! ks.addAll(handleKeySet());
if (parent != null) {
ks.addAll(parent.keySet());
}
synchronized (this) {
if (keyset == null) {