Bug6530694.java revision 0:37a05a11f281
1214571Sdim/* 2214571Sdim * Copyright (c) 2007 Sun Microsystems, Inc. All Rights Reserved. 3214571Sdim * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4214571Sdim * 5214571Sdim * This code is free software; you can redistribute it and/or modify it 6214571Sdim * under the terms of the GNU General Public License version 2 only, as 7214571Sdim * published by the Free Software Foundation. 8214571Sdim * 9214571Sdim * This code is distributed in the hope that it will be useful, but WITHOUT 10214571Sdim * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11214571Sdim * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12214571Sdim * version 2 for more details (a copy is included in the LICENSE file that 13214571Sdim * accompanied this code). 14214571Sdim * 15214571Sdim * You should have received a copy of the GNU General Public License version 16214571Sdim * 2 along with this work; if not, write to the Free Software Foundation, 17214571Sdim * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18214571Sdim * 19214571Sdim * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 20214571Sdim * CA 95054 USA or visit www.sun.com if you need additional information or 21214571Sdim * have any questions. 22214571Sdim * 23214571Sdim * @test 24214571Sdim * @bug 6530694 25214571Sdim * @summary Checks that sun.util.CoreResourceBundleControl does not apply 26214571Sdim * to the application provided Swing resources. 27214571Sdim * @run main/othervm Bug6530694 28214571Sdim */ 29214571Sdim 30214571Sdimimport java.util.Locale; 31214571Sdimimport javax.swing.UIDefaults; 32214571Sdimimport javax.swing.UIManager; 33214571Sdim 34214571Sdimpublic class Bug6530694 { 35214571Sdim Bug6530694() { 36214571Sdim Locale.setDefault(Locale.GERMANY); 37214571Sdim UIDefaults defs = UIManager.getDefaults(); 38214571Sdim defs.addResourceBundle("Bug6530694"); 39214571Sdim String str = defs.getString("testkey"); 40214571Sdim if (!"testvalue".equals(str)) { 41214571Sdim throw new RuntimeException("Could not load the resource for de_DE locale"); 42214571Sdim } 43214571Sdim } 44214571Sdim 45214571Sdim public static void main(String[] args) { 46214571Sdim new Bug6530694(); 47214571Sdim } 48214571Sdim} 49214571Sdim