# HG changeset patch # User lana # Date 1464902103 0 # Node ID 59f8ee713e5ff59fbbd676a99443ecca47394642 # Parent 476ac9d909fafa97ca908cbfa0bfe6464cdacd75# Parent 8cc53e29c1d9ba8f5c38433c3130b0031fe96b6f Merge diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/LICENSE --- a/jaxws/LICENSE Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/LICENSE Thu Jun 02 21:15:03 2016 +0000 @@ -3,7 +3,7 @@ Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. -59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -287,8 +287,8 @@ more details. You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., 59 - Temple Place, Suite 330, Boston, MA 02111-1307 USA + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/Localizable.java --- a/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/Localizable.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/Localizable.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,6 +25,9 @@ package com.sun.istack.internal.localization; +import java.util.Locale; +import java.util.ResourceBundle; + /** * Localizable message. * @@ -51,6 +54,9 @@ public Object[] getArguments(); public String getResourceBundleName(); + public default ResourceBundle getResourceBundle(Locale locale) { + return null; + } /** * Special constant that represents a message that diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/LocalizableMessage.java --- a/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/LocalizableMessage.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/LocalizableMessage.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,7 +25,11 @@ package com.sun.istack.internal.localization; +import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier; + import java.util.Arrays; +import java.util.Locale; +import java.util.ResourceBundle; /** * @author WS Development Team @@ -33,17 +37,31 @@ public final class LocalizableMessage implements Localizable { private final String _bundlename; + private final ResourceBundleSupplier _rbSupplier; + private final String _key; private final Object[] _args; public LocalizableMessage(String bundlename, String key, Object... args) { _bundlename = bundlename; + _rbSupplier = null; _key = key; if(args==null) args = new Object[0]; _args = args; } + public LocalizableMessage(String bundlename, ResourceBundleSupplier rbSupplier, + String key, Object... args) { + _bundlename = bundlename; + _rbSupplier = rbSupplier; + _key = key; + if(args==null) + args = new Object[0]; + _args = args; + } + + public String getKey() { return _key; } @@ -55,4 +73,12 @@ public String getResourceBundleName() { return _bundlename; } + + @Override + public ResourceBundle getResourceBundle(Locale locale) { + if (_rbSupplier == null) + return null; + + return _rbSupplier.getResourceBundle(locale); + } } diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/LocalizableMessageFactory.java --- a/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/LocalizableMessageFactory.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/LocalizableMessageFactory.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,19 +25,37 @@ package com.sun.istack.internal.localization; +import java.util.Locale; +import java.util.ResourceBundle; + /** * @author WS Development Team */ public class LocalizableMessageFactory { private final String _bundlename; + private final ResourceBundleSupplier _rbSupplier; public LocalizableMessageFactory(String bundlename) { _bundlename = bundlename; + _rbSupplier = null; + } + + public LocalizableMessageFactory(String bundlename, ResourceBundleSupplier rbSupplier) { + _bundlename = bundlename; + _rbSupplier = rbSupplier; } public Localizable getMessage(String key, Object... args) { - return new LocalizableMessage(_bundlename, key, args); + return new LocalizableMessage(_bundlename, _rbSupplier, key, args); } + public interface ResourceBundleSupplier { + /** + * Gets the ResourceBundle. + * @param locale the requested bundle's locale + * @return ResourceBundle + */ + ResourceBundle getResourceBundle(Locale locale); + } } diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/Localizer.java --- a/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/Localizer.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/Localizer.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,6 +25,7 @@ package com.sun.istack.internal.localization; +import com.sun.istack.internal.localization.LocalizableMessageFactory.ResourceBundleSupplier; import java.text.MessageFormat; import java.util.HashMap; import java.util.Locale; @@ -61,6 +62,7 @@ // this message is not localizable return (String) l.getArguments()[0]; } + String bundlename = l.getResourceBundleName(); try { @@ -68,6 +70,13 @@ (ResourceBundle) _resourceBundles.get(bundlename); if (bundle == null) { + bundle = l.getResourceBundle(_locale); + if (bundle != null) { + _resourceBundles.put(bundlename, bundle); + } + } + + if (bundle == null) { try { bundle = ResourceBundle.getBundle(bundlename, _locale); } catch (MissingResourceException e) { @@ -151,5 +160,4 @@ } return sb.toString(); } - } diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/policy/privateutil/LocalizationMessages.java --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/policy/privateutil/LocalizationMessages.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/policy/privateutil/LocalizationMessages.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -29,15 +29,23 @@ import com.sun.istack.internal.localization.LocalizableMessageFactory; import com.sun.istack.internal.localization.Localizer; +import java.util.Locale; +import java.util.ResourceBundle; + /** * Defines string formatting method for each constant in the resource file * */ public final class LocalizationMessages { + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.policy.privateutil.Localization"; + private final static LocalizableMessageFactory messageFactory = + new LocalizableMessageFactory(BUNDLE_NAME, LocalizationMessages::getResourceBundle); + private final static Localizer localizer = new Localizer(); - private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.policy.privateutil.Localization"); - private final static Localizer localizer = new Localizer(); + private static ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } public static Localizable localizableWSP_0017_UNABLE_TO_ACCESS_POLICY_SOURCE_MODEL_PLUS_REASON(Object arg0, Object arg1) { return messageFactory.getMessage("WSP_0017_UNABLE_TO_ACCESS_POLICY_SOURCE_MODEL_PLUS_REASON", arg0, arg1); diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/AddressingMessages.java --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/AddressingMessages.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/AddressingMessages.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -29,15 +29,23 @@ import com.sun.istack.internal.localization.LocalizableMessageFactory; import com.sun.istack.internal.localization.Localizer; +import java.util.Locale; +import java.util.ResourceBundle; + /** * Defines string formatting method for each constant in the resource file * */ public final class AddressingMessages { + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.addressing"; + private final static LocalizableMessageFactory messageFactory = + new LocalizableMessageFactory(BUNDLE_NAME, AddressingMessages::getResourceBundle); + private final static Localizer localizer = new Localizer(); - private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.addressing"); - private final static Localizer localizer = new Localizer(); + private static ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } public static Localizable localizableNON_ANONYMOUS_RESPONSE_ONEWAY() { return messageFactory.getMessage("nonAnonymous.response.oneway"); diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/BindingApiMessages.java --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/BindingApiMessages.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/BindingApiMessages.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -29,15 +29,23 @@ import com.sun.istack.internal.localization.LocalizableMessageFactory; import com.sun.istack.internal.localization.Localizer; +import java.util.Locale; +import java.util.ResourceBundle; + /** * Defines string formatting method for each constant in the resource file * */ public final class BindingApiMessages { + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.bindingApi"; + private final static LocalizableMessageFactory messageFactory = + new LocalizableMessageFactory(BUNDLE_NAME, BindingApiMessages::getResourceBundle); + private final static Localizer localizer = new Localizer(); - private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.bindingApi"); - private final static Localizer localizer = new Localizer(); + private static ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } public static Localizable localizableBINDING_API_NO_FAULT_MESSAGE_NAME() { return messageFactory.getMessage("binding.api.no.fault.message.name"); diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ClientMessages.java --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ClientMessages.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ClientMessages.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -29,15 +29,23 @@ import com.sun.istack.internal.localization.LocalizableMessageFactory; import com.sun.istack.internal.localization.Localizer; +import java.util.Locale; +import java.util.ResourceBundle; + /** * Defines string formatting method for each constant in the resource file * */ public final class ClientMessages { + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.client"; + private final static LocalizableMessageFactory messageFactory = + new LocalizableMessageFactory(BUNDLE_NAME, ClientMessages::getResourceBundle); + private final static Localizer localizer = new Localizer(); - private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.client"); - private final static Localizer localizer = new Localizer(); + private static ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } public static Localizable localizableFAILED_TO_PARSE(Object arg0, Object arg1) { return messageFactory.getMessage("failed.to.parse", arg0, arg1); diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/DispatchMessages.java --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/DispatchMessages.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/DispatchMessages.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -29,15 +29,23 @@ import com.sun.istack.internal.localization.LocalizableMessageFactory; import com.sun.istack.internal.localization.Localizer; +import java.util.Locale; +import java.util.ResourceBundle; + /** * Defines string formatting method for each constant in the resource file * */ public final class DispatchMessages { + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.dispatch"; + private final static LocalizableMessageFactory messageFactory = + new LocalizableMessageFactory(BUNDLE_NAME, DispatchMessages::getResourceBundle); + private final static Localizer localizer = new Localizer(); - private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.dispatch"); - private final static Localizer localizer = new Localizer(); + private static ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } public static Localizable localizableINVALID_NULLARG_XMLHTTP_REQUEST_METHOD(Object arg0, Object arg1) { return messageFactory.getMessage("invalid.nullarg.xmlhttp.request.method", arg0, arg1); diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/EncodingMessages.java --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/EncodingMessages.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/EncodingMessages.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -29,15 +29,23 @@ import com.sun.istack.internal.localization.LocalizableMessageFactory; import com.sun.istack.internal.localization.Localizer; +import java.util.Locale; +import java.util.ResourceBundle; + /** * Defines string formatting method for each constant in the resource file * */ public final class EncodingMessages { + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.encoding"; + private final static LocalizableMessageFactory messageFactory = + new LocalizableMessageFactory(BUNDLE_NAME, EncodingMessages::getResourceBundle); + private final static Localizer localizer = new Localizer(); - private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.encoding"); - private final static Localizer localizer = new Localizer(); + private static ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } public static Localizable localizableFAILED_TO_READ_RESPONSE(Object arg0) { return messageFactory.getMessage("failed.to.read.response", arg0); diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/HandlerMessages.java --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/HandlerMessages.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/HandlerMessages.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -29,15 +29,23 @@ import com.sun.istack.internal.localization.LocalizableMessageFactory; import com.sun.istack.internal.localization.Localizer; +import java.util.Locale; +import java.util.ResourceBundle; + /** * Defines string formatting method for each constant in the resource file * */ public final class HandlerMessages { + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.handler"; + private final static LocalizableMessageFactory messageFactory = + new LocalizableMessageFactory(BUNDLE_NAME, HandlerMessages::getResourceBundle); + private final static Localizer localizer = new Localizer(); - private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.handler"); - private final static Localizer localizer = new Localizer(); + private static ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } public static Localizable localizableHANDLER_MESSAGE_CONTEXT_INVALID_CLASS(Object arg0, Object arg1) { return messageFactory.getMessage("handler.messageContext.invalid.class", arg0, arg1); diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/HttpserverMessages.java --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/HttpserverMessages.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/HttpserverMessages.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -29,15 +29,23 @@ import com.sun.istack.internal.localization.LocalizableMessageFactory; import com.sun.istack.internal.localization.Localizer; +import java.util.Locale; +import java.util.ResourceBundle; + /** * Defines string formatting method for each constant in the resource file * */ public final class HttpserverMessages { + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.httpserver"; + private final static LocalizableMessageFactory messageFactory = + new LocalizableMessageFactory(BUNDLE_NAME, HttpserverMessages::getResourceBundle); + private final static Localizer localizer = new Localizer(); - private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.httpserver"); - private final static Localizer localizer = new Localizer(); + private static ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } public static Localizable localizableUNEXPECTED_HTTP_METHOD(Object arg0) { return messageFactory.getMessage("unexpected.http.method", arg0); diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ManagementMessages.java --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ManagementMessages.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ManagementMessages.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -29,15 +29,23 @@ import com.sun.istack.internal.localization.LocalizableMessageFactory; import com.sun.istack.internal.localization.Localizer; +import java.util.Locale; +import java.util.ResourceBundle; + /** * Defines string formatting method for each constant in the resource file * */ public final class ManagementMessages { + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.management"; + private final static LocalizableMessageFactory messageFactory = + new LocalizableMessageFactory(BUNDLE_NAME, ManagementMessages::getResourceBundle); + private final static Localizer localizer = new Localizer(); - private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.management"); - private final static Localizer localizer = new Localizer(); + private static ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } public static Localizable localizableWSM_1008_EXPECTED_INTEGER_DISPOSE_DELAY_VALUE(Object arg0) { return messageFactory.getMessage("WSM_1008_EXPECTED_INTEGER_DISPOSE_DELAY_VALUE", arg0); diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ModelerMessages.java --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ModelerMessages.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ModelerMessages.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -29,15 +29,23 @@ import com.sun.istack.internal.localization.LocalizableMessageFactory; import com.sun.istack.internal.localization.Localizer; +import java.util.Locale; +import java.util.ResourceBundle; + /** * Defines string formatting method for each constant in the resource file * */ public final class ModelerMessages { + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.modeler"; + private final static LocalizableMessageFactory messageFactory = + new LocalizableMessageFactory(BUNDLE_NAME, ModelerMessages::getResourceBundle); + private final static Localizer localizer = new Localizer(); - private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.modeler"); - private final static Localizer localizer = new Localizer(); + private static ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } public static Localizable localizableNESTED_MODELER_ERROR(Object arg0) { return messageFactory.getMessage("nestedModelerError", arg0); diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/PolicyMessages.java --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/PolicyMessages.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/PolicyMessages.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -29,15 +29,23 @@ import com.sun.istack.internal.localization.LocalizableMessageFactory; import com.sun.istack.internal.localization.Localizer; +import java.util.Locale; +import java.util.ResourceBundle; + /** * Defines string formatting method for each constant in the resource file * */ public final class PolicyMessages { + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.policy"; + private final static LocalizableMessageFactory messageFactory = + new LocalizableMessageFactory(BUNDLE_NAME, PolicyMessages::getResourceBundle); + private final static Localizer localizer = new Localizer(); - private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.policy"); - private final static Localizer localizer = new Localizer(); + private static ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } public static Localizable localizableWSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL() { return messageFactory.getMessage("WSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL"); diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ProviderApiMessages.java --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ProviderApiMessages.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ProviderApiMessages.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -29,15 +29,23 @@ import com.sun.istack.internal.localization.LocalizableMessageFactory; import com.sun.istack.internal.localization.Localizer; +import java.util.Locale; +import java.util.ResourceBundle; + /** * Defines string formatting method for each constant in the resource file * */ public final class ProviderApiMessages { + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.providerApi"; + private final static LocalizableMessageFactory messageFactory = + new LocalizableMessageFactory(BUNDLE_NAME, ProviderApiMessages::getResourceBundle); + private final static Localizer localizer = new Localizer(); - private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.providerApi"); - private final static Localizer localizer = new Localizer(); + private static ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } public static Localizable localizableNULL_ADDRESS_SERVICE_ENDPOINT() { return messageFactory.getMessage("null.address.service.endpoint"); diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/SenderMessages.java --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/SenderMessages.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/SenderMessages.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -29,15 +29,23 @@ import com.sun.istack.internal.localization.LocalizableMessageFactory; import com.sun.istack.internal.localization.Localizer; +import java.util.Locale; +import java.util.ResourceBundle; + /** * Defines string formatting method for each constant in the resource file * */ public final class SenderMessages { + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.sender"; + private final static LocalizableMessageFactory messageFactory = + new LocalizableMessageFactory(BUNDLE_NAME, SenderMessages::getResourceBundle); + private final static Localizer localizer = new Localizer(); - private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.sender"); - private final static Localizer localizer = new Localizer(); + private static ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } public static Localizable localizableSENDER_REQUEST_ILLEGAL_VALUE_FOR_CONTENT_NEGOTIATION(Object arg0) { return messageFactory.getMessage("sender.request.illegalValueForContentNegotiation", arg0); diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ServerMessages.java --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ServerMessages.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ServerMessages.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -29,15 +29,23 @@ import com.sun.istack.internal.localization.LocalizableMessageFactory; import com.sun.istack.internal.localization.Localizer; +import java.util.Locale; +import java.util.ResourceBundle; + /** * Defines string formatting method for each constant in the resource file * */ public final class ServerMessages { + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.server"; + private final static LocalizableMessageFactory messageFactory = + new LocalizableMessageFactory(BUNDLE_NAME, ServerMessages::getResourceBundle); + private final static Localizer localizer = new Localizer(); - private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.server"); - private final static Localizer localizer = new Localizer(); + private static ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } public static Localizable localizableRUNTIME_PARSER_WSDL_INCORRECTSERVICE(Object arg0, Object arg1) { return messageFactory.getMessage("runtime.parser.wsdl.incorrectservice", arg0, arg1); diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/SoapMessages.java --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/SoapMessages.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/SoapMessages.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -29,15 +29,23 @@ import com.sun.istack.internal.localization.LocalizableMessageFactory; import com.sun.istack.internal.localization.Localizer; +import java.util.Locale; +import java.util.ResourceBundle; + /** * Defines string formatting method for each constant in the resource file * */ public final class SoapMessages { + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.soap"; + private final static LocalizableMessageFactory messageFactory = + new LocalizableMessageFactory(BUNDLE_NAME, SoapMessages::getResourceBundle); + private final static Localizer localizer = new Localizer(); - private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.soap"); - private final static Localizer localizer = new Localizer(); + private static ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } public static Localizable localizableSOAP_FAULT_CREATE_ERR(Object arg0) { return messageFactory.getMessage("soap.fault.create.err", arg0); diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/StreamingMessages.java --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/StreamingMessages.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/StreamingMessages.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -29,15 +29,23 @@ import com.sun.istack.internal.localization.LocalizableMessageFactory; import com.sun.istack.internal.localization.Localizer; +import java.util.Locale; +import java.util.ResourceBundle; + /** * Defines string formatting method for each constant in the resource file * */ public final class StreamingMessages { + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.streaming"; + private final static LocalizableMessageFactory messageFactory = + new LocalizableMessageFactory(BUNDLE_NAME, StreamingMessages::getResourceBundle); + private final static Localizer localizer = new Localizer(); - private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.streaming"); - private final static Localizer localizer = new Localizer(); + private static ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } public static Localizable localizableFASTINFOSET_DECODING_NOT_ACCEPTED() { return messageFactory.getMessage("fastinfoset.decodingNotAccepted"); diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/TubelineassemblyMessages.java --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/TubelineassemblyMessages.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/TubelineassemblyMessages.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -29,15 +29,23 @@ import com.sun.istack.internal.localization.LocalizableMessageFactory; import com.sun.istack.internal.localization.Localizer; +import java.util.Locale; +import java.util.ResourceBundle; + /** * Defines string formatting method for each constant in the resource file * */ public final class TubelineassemblyMessages { + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.tubelineassembly"; + private final static LocalizableMessageFactory messageFactory = + new LocalizableMessageFactory(BUNDLE_NAME, TubelineassemblyMessages::getResourceBundle); + private final static Localizer localizer = new Localizer(); - private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.tubelineassembly"); - private final static Localizer localizer = new Localizer(); + private static ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } public static Localizable localizableMASM_0019_MSG_LOGGING_SYSTEM_PROPERTY_ILLEGAL_VALUE(Object arg0, Object arg1) { return messageFactory.getMessage("MASM0019_MSG_LOGGING_SYSTEM_PROPERTY_ILLEGAL_VALUE", arg0, arg1); diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/UtilMessages.java --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/UtilMessages.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/UtilMessages.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -29,15 +29,23 @@ import com.sun.istack.internal.localization.LocalizableMessageFactory; import com.sun.istack.internal.localization.Localizer; +import java.util.Locale; +import java.util.ResourceBundle; + /** * Defines string formatting method for each constant in the resource file * */ public final class UtilMessages { + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.util"; + private final static LocalizableMessageFactory messageFactory = + new LocalizableMessageFactory(BUNDLE_NAME, UtilMessages::getResourceBundle); + private final static Localizer localizer = new Localizer(); - private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.util"); - private final static Localizer localizer = new Localizer(); + private static ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } public static Localizable localizableUTIL_LOCATION(Object arg0, Object arg1) { return messageFactory.getMessage("util.location", arg0, arg1); diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/WsdlmodelMessages.java --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/WsdlmodelMessages.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/WsdlmodelMessages.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -29,15 +29,23 @@ import com.sun.istack.internal.localization.LocalizableMessageFactory; import com.sun.istack.internal.localization.Localizer; +import java.util.Locale; +import java.util.ResourceBundle; + /** * Defines string formatting method for each constant in the resource file * */ public final class WsdlmodelMessages { + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.wsdlmodel"; + private final static LocalizableMessageFactory messageFactory = + new LocalizableMessageFactory(BUNDLE_NAME, WsdlmodelMessages::getResourceBundle); + private final static Localizer localizer = new Localizer(); - private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.wsdlmodel"); - private final static Localizer localizer = new Localizer(); + private static ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } public static Localizable localizableWSDL_PORTADDRESS_EPRADDRESS_NOT_MATCH(Object arg0, Object arg1, Object arg2) { return messageFactory.getMessage("wsdl.portaddress.epraddress.not.match", arg0, arg1, arg2); diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/WsservletMessages.java --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/WsservletMessages.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/WsservletMessages.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -29,15 +29,23 @@ import com.sun.istack.internal.localization.LocalizableMessageFactory; import com.sun.istack.internal.localization.Localizer; +import java.util.Locale; +import java.util.ResourceBundle; + /** * Defines string formatting method for each constant in the resource file * */ public final class WsservletMessages { + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.wsservlet"; + private final static LocalizableMessageFactory messageFactory = + new LocalizableMessageFactory(BUNDLE_NAME, WsservletMessages::getResourceBundle); + private final static Localizer localizer = new Localizer(); - private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.wsservlet"); - private final static Localizer localizer = new Localizer(); + private static ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } public static Localizable localizableERROR_WSDL_PUBLISHER_CANNOT_READ_CONFIGURATION() { return messageFactory.getMessage("error.wsdlPublisher.cannotReadConfiguration"); diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/XmlmessageMessages.java --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/XmlmessageMessages.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/XmlmessageMessages.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -29,15 +29,23 @@ import com.sun.istack.internal.localization.LocalizableMessageFactory; import com.sun.istack.internal.localization.Localizer; +import java.util.Locale; +import java.util.ResourceBundle; + /** * Defines string formatting method for each constant in the resource file * */ public final class XmlmessageMessages { + private final static String BUNDLE_NAME = "com.sun.xml.internal.ws.resources.xmlmessage"; + private final static LocalizableMessageFactory messageFactory = + new LocalizableMessageFactory(BUNDLE_NAME, XmlmessageMessages::getResourceBundle); + private final static Localizer localizer = new Localizer(); - private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.xmlmessage"); - private final static Localizer localizer = new Localizer(); + private static ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } public static Localizable localizableXML_NULL_HEADERS() { return messageFactory.getMessage("xml.null.headers"); diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/exception/JAXWSExceptionBase.java --- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/exception/JAXWSExceptionBase.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/exception/JAXWSExceptionBase.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -34,6 +34,8 @@ import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; +import java.util.Locale; +import java.util.ResourceBundle; import javax.xml.ws.WebServiceException; /** @@ -125,7 +127,8 @@ args[i] = in.readObject(); } } - msg = new LocalizableMessageFactory(resourceBundleName).getMessage(key,args); + msg = new LocalizableMessageFactory(resourceBundleName, this::getResourceBundle) + .getMessage(key,args); } private static Throwable findNestedException(Object[] args) { @@ -149,6 +152,16 @@ */ protected abstract String getDefaultResourceBundleName(); + /* + * Returns the ResourceBundle in this module. + * + * Subclasses in a different module has to override this method. + */ + @Override + public ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(getDefaultResourceBundleName(), locale); + } + // // Localizable delegation // diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/processor/ProcessorException.java --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/processor/ProcessorException.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/processor/ProcessorException.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -27,6 +27,9 @@ import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase; +import java.util.Locale; +import java.util.ResourceBundle; + /** * ProcessorException represents an exception that occurred while processing * a web service. @@ -52,4 +55,9 @@ public String getDefaultResourceBundleName() { return "com.sun.tools.internal.ws.resources.processor"; } + + @Override + public ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(getDefaultResourceBundleName(), locale); + } } diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ConfigurationMessages.java --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ConfigurationMessages.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ConfigurationMessages.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -29,20 +29,29 @@ import com.sun.istack.internal.localization.LocalizableMessageFactory; import com.sun.istack.internal.localization.Localizer; +import java.util.Locale; +import java.util.ResourceBundle; + /** * Defines string formatting method for each constant in the resource file * */ public final class ConfigurationMessages { + private final static String BUNDLE_NAME = "com.sun.tools.internal.ws.resources.configuration"; + private final static LocalizableMessageFactory messageFactory = + new LocalizableMessageFactory(BUNDLE_NAME, ConfigurationMessages::getResourceBundle); + private final static Localizer localizer = new Localizer(); - private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.tools.internal.ws.resources.configuration"); - private final static Localizer localizer = new Localizer(); + private static ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } public static Localizable localizableCONFIGURATION_NOT_BINDING_FILE(Object arg0) { return messageFactory.getMessage("configuration.notBindingFile", arg0); } + /** * Ignoring: binding file "{0}". It is not a jaxws or a jaxb binding file. * diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/GeneratorMessages.java --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/GeneratorMessages.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/GeneratorMessages.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -29,15 +29,23 @@ import com.sun.istack.internal.localization.LocalizableMessageFactory; import com.sun.istack.internal.localization.Localizer; +import java.util.Locale; +import java.util.ResourceBundle; + /** * Defines string formatting method for each constant in the resource file * */ public final class GeneratorMessages { + private final static String BUNDLE_NAME = "com.sun.tools.internal.ws.resources.generator"; + private final static LocalizableMessageFactory messageFactory = + new LocalizableMessageFactory(BUNDLE_NAME, GeneratorMessages::getResourceBundle); + private final static Localizer localizer = new Localizer(); - private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.tools.internal.ws.resources.generator"); - private final static Localizer localizer = new Localizer(); + private static ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } public static Localizable localizableGENERATOR_SERVICE_CLASS_ALREADY_EXIST(Object arg0, Object arg1) { return messageFactory.getMessage("generator.service.classAlreadyExist", arg0, arg1); diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/JavacompilerMessages.java --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/JavacompilerMessages.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/JavacompilerMessages.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -29,15 +29,23 @@ import com.sun.istack.internal.localization.LocalizableMessageFactory; import com.sun.istack.internal.localization.Localizer; +import java.util.Locale; +import java.util.ResourceBundle; + /** * Defines string formatting method for each constant in the resource file * */ public final class JavacompilerMessages { + private final static String BUNDLE_NAME = "com.sun.tools.internal.ws.resources.javacompiler"; + private final static LocalizableMessageFactory messageFactory = + new LocalizableMessageFactory(BUNDLE_NAME, JavacompilerMessages::getResourceBundle); + private final static Localizer localizer = new Localizer(); - private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.tools.internal.ws.resources.javacompiler"); - private final static Localizer localizer = new Localizer(); + private static ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } public static Localizable localizableNO_JAVACOMPILER_ERROR() { return messageFactory.getMessage("no.javacompiler.error"); diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ModelMessages.java --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ModelMessages.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ModelMessages.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -29,15 +29,23 @@ import com.sun.istack.internal.localization.LocalizableMessageFactory; import com.sun.istack.internal.localization.Localizer; +import java.util.Locale; +import java.util.ResourceBundle; + /** * Defines string formatting method for each constant in the resource file * */ public final class ModelMessages { + private final static String BUNDLE_NAME = "com.sun.tools.internal.ws.resources.model"; + private final static LocalizableMessageFactory messageFactory = + new LocalizableMessageFactory(BUNDLE_NAME, ModelMessages::getResourceBundle); + private final static Localizer localizer = new Localizer(); - private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.tools.internal.ws.resources.model"); - private final static Localizer localizer = new Localizer(); + private static ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } public static Localizable localizableMODEL_NESTED_MODEL_ERROR(Object arg0) { return messageFactory.getMessage("model.nestedModelError", arg0); diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ModelerMessages.java --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ModelerMessages.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ModelerMessages.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -29,15 +29,23 @@ import com.sun.istack.internal.localization.LocalizableMessageFactory; import com.sun.istack.internal.localization.Localizer; +import java.util.Locale; +import java.util.ResourceBundle; + /** * Defines string formatting method for each constant in the resource file * */ public final class ModelerMessages { + private final static String BUNDLE_NAME = "com.sun.tools.internal.ws.resources.modeler"; + private final static LocalizableMessageFactory messageFactory = + new LocalizableMessageFactory(BUNDLE_NAME, ModelerMessages::getResourceBundle); + private final static Localizer localizer = new Localizer(); - private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.tools.internal.ws.resources.modeler"); - private final static Localizer localizer = new Localizer(); + private static ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } public static Localizable localizableMIMEMODELER_INVALID_MIME_CONTENT_INVALID_SCHEMA_TYPE(Object arg0, Object arg1) { return messageFactory.getMessage("mimemodeler.invalidMimeContent.invalidSchemaType", arg0, arg1); diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ProcessorMessages.java --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ProcessorMessages.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ProcessorMessages.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -28,14 +28,21 @@ import com.sun.istack.internal.localization.LocalizableMessageFactory; import com.sun.istack.internal.localization.Localizer; +import java.util.Locale; +import java.util.ResourceBundle; + /** * Defines string formatting method for each constant in the resource file * */ public final class ProcessorMessages { - - private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.tools.internal.ws.resources.processor"); + private final static String BUNDLE_NAME = "com.sun.tools.internal.ws.resources.processor"; + private final static LocalizableMessageFactory messageFactory = + new LocalizableMessageFactory(BUNDLE_NAME, ProcessorMessages::getResourceBundle); private final static Localizer localizer = new Localizer(); + private static ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } } diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/UtilMessages.java --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/UtilMessages.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/UtilMessages.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -29,15 +29,23 @@ import com.sun.istack.internal.localization.LocalizableMessageFactory; import com.sun.istack.internal.localization.Localizer; +import java.util.Locale; +import java.util.ResourceBundle; + /** * Defines string formatting method for each constant in the resource file * */ public final class UtilMessages { + private final static String BUNDLE_NAME = "com.sun.tools.internal.ws.resources.util"; + private final static LocalizableMessageFactory messageFactory = + new LocalizableMessageFactory(BUNDLE_NAME, UtilMessages::getResourceBundle); + private final static Localizer localizer = new Localizer(); - private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.tools.internal.ws.resources.util"); - private final static Localizer localizer = new Localizer(); + private static ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } public static Localizable localizableSAX_2_DOM_NOTSUPPORTED_CREATEELEMENT(Object arg0) { return messageFactory.getMessage("sax2dom.notsupported.createelement", arg0); diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/WebserviceapMessages.java --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/WebserviceapMessages.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/WebserviceapMessages.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -29,15 +29,23 @@ import com.sun.istack.internal.localization.LocalizableMessageFactory; import com.sun.istack.internal.localization.Localizer; +import java.util.Locale; +import java.util.ResourceBundle; + /** * Defines string formatting method for each constant in the resource file * */ public final class WebserviceapMessages { + private final static String BUNDLE_NAME = "com.sun.tools.internal.ws.resources.webserviceap"; + private final static LocalizableMessageFactory messageFactory = + new LocalizableMessageFactory(BUNDLE_NAME, WebserviceapMessages::getResourceBundle); + private final static Localizer localizer = new Localizer(); - private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.tools.internal.ws.resources.webserviceap"); - private final static Localizer localizer = new Localizer(); + private static ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } public static Localizable localizableWEBSERVICEAP_ENDPOINTINTERFACES_DO_NOT_MATCH(Object arg0, Object arg1) { return messageFactory.getMessage("webserviceap.endpointinterfaces.do.not.match", arg0, arg1); diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/WscompileMessages.java --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/WscompileMessages.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/WscompileMessages.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -29,15 +29,23 @@ import com.sun.istack.internal.localization.LocalizableMessageFactory; import com.sun.istack.internal.localization.Localizer; +import java.util.Locale; +import java.util.ResourceBundle; + /** * Defines string formatting method for each constant in the resource file * */ public final class WscompileMessages { + private final static String BUNDLE_NAME = "com.sun.tools.internal.ws.resources.wscompile"; + private final static LocalizableMessageFactory messageFactory = + new LocalizableMessageFactory(BUNDLE_NAME, WscompileMessages::getResourceBundle); + private final static Localizer localizer = new Localizer(); - private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.tools.internal.ws.resources.wscompile"); - private final static Localizer localizer = new Localizer(); + private static ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } public static Localizable localizableWSIMPORT_ARCHIVING_ARTIFACTS(Object arg0) { return messageFactory.getMessage("wsimport.archivingArtifacts", arg0); diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/WsdlMessages.java --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/WsdlMessages.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/WsdlMessages.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -29,15 +29,23 @@ import com.sun.istack.internal.localization.LocalizableMessageFactory; import com.sun.istack.internal.localization.Localizer; +import java.util.Locale; +import java.util.ResourceBundle; + /** * Defines string formatting method for each constant in the resource file * */ public final class WsdlMessages { + private final static String BUNDLE_NAME = "com.sun.tools.internal.ws.resources.wsdl"; + private final static LocalizableMessageFactory messageFactory = + new LocalizableMessageFactory(BUNDLE_NAME, WsdlMessages::getResourceBundle); + private final static Localizer localizer = new Localizer(); - private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.tools.internal.ws.resources.wsdl"); - private final static Localizer localizer = new Localizer(); + private static ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(BUNDLE_NAME, locale); + } public static Localizable localizablePARSING_ELEMENT_EXPECTED() { return messageFactory.getMessage("parsing.elementExpected"); diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/util/WSDLParseException.java --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/util/WSDLParseException.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/util/WSDLParseException.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -27,6 +27,9 @@ import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase; +import java.util.Locale; +import java.util.ResourceBundle; + /** * @author WS Development Team */ @@ -43,4 +46,9 @@ public String getDefaultResourceBundleName() { return "com.sun.tools.internal.ws.resources.util"; } + + @Override + public ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(getDefaultResourceBundleName(), locale); + } } diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wsdl/framework/ParseException.java --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wsdl/framework/ParseException.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wsdl/framework/ParseException.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -28,6 +28,9 @@ import com.sun.istack.internal.localization.Localizable; import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase; +import java.util.Locale; +import java.util.ResourceBundle; + /** * An exception signalling a parsing error. * @@ -50,4 +53,9 @@ public String getDefaultResourceBundleName() { return "com.sun.tools.internal.ws.resources.wsdl"; } + + @Override + public ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(getDefaultResourceBundleName(), locale); + } } diff -r 476ac9d909fa -r 59f8ee713e5f jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wsdl/framework/ValidationException.java --- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wsdl/framework/ValidationException.java Thu Jun 02 20:33:35 2016 +0000 +++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wsdl/framework/ValidationException.java Thu Jun 02 21:15:03 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -27,6 +27,9 @@ import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase; +import java.util.Locale; +import java.util.ResourceBundle; + /** * An exception signalling that validation of an entity failed. * @@ -45,4 +48,9 @@ public String getDefaultResourceBundleName() { return "com.sun.tools.internal.ws.resources.wsdl"; } + + @Override + public ResourceBundle getResourceBundle(Locale locale) { + return ResourceBundle.getBundle(getDefaultResourceBundleName(), locale); + } }