src/share/jaxws_classes/com/sun/istack/internal/localization/Localizer.java

changeset 368
0989ad8c0860
parent 286
f50545b5e2f1
child 637
9c07ef4934dd
equal deleted inserted replaced
366:8c0b6bccfe47 368:0989ad8c0860
1 /* 1 /*
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this 7 * published by the Free Software Foundation. Oracle designates this
86 bundle = 86 bundle =
87 ResourceBundle.getBundle( 87 ResourceBundle.getBundle(
88 alternateBundleName, 88 alternateBundleName,
89 _locale); 89 _locale);
90 } catch (MissingResourceException e2) { 90 } catch (MissingResourceException e2) {
91 // give up 91 //try context classloader
92 return getDefaultMessage(l); 92 try {
93 bundle = ResourceBundle.getBundle(bundlename, _locale, Thread.currentThread().getContextClassLoader());
94 } catch (MissingResourceException e3) {
95 // give up
96 return getDefaultMessage(l);
97 }
98
93 } 99 }
94 } 100 }
95 } 101 }
96 102
97 _resourceBundles.put(bundlename, bundle); 103 _resourceBundles.put(bundlename, bundle);

mercurial