Path: blob/master/test/jdk/java/util/ResourceBundle/Bug4168625Class.java
41149 views
/*1* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*/22/*23*24*25* (C) Copyright IBM Corp. 1999 - All Rights Reserved26*27* The original version of this source code and documentation is28* copyrighted and owned by IBM. These materials are provided29* under terms of a License Agreement between IBM and Sun.30* This technology is protected by multiple US and International31* patents. This notice and attribution to IBM may not be removed.32*33*/34import java.util.ResourceBundle;35import java.util.MissingResourceException;36import java.util.Locale;3738/**39* Class loaded by custom class loader to load resources.40* This call is called through the ResourceGetter interface41* by the test. The ResourceGetter interface is loaded42* by the system loader to avoid ClassCastsExceptions.43*/44public class Bug4168625Class implements Bug4168625Getter {45/** return the specified resource or null if not found */46public ResourceBundle getResourceBundle(String resource, Locale locale) {47try {48return ResourceBundle.getBundle(resource, locale);49} catch (MissingResourceException e) {50return null;51}52}53}545556