8153944: wsimport and wsgen usage messages not printed
Reviewed-by: alanb, lancea, aefimov
--- a/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/Localizable.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/Localizable.java Mon May 30 17:32:33 2016 -0700
@@ -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
--- a/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/LocalizableMessage.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/LocalizableMessage.java Mon May 30 17:32:33 2016 -0700
@@ -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);
+ }
}
--- a/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/LocalizableMessageFactory.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/LocalizableMessageFactory.java Mon May 30 17:32:33 2016 -0700
@@ -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);
+ }
}
--- a/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/Localizer.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/java.xml.bind/share/classes/com/sun/istack/internal/localization/Localizer.java Mon May 30 17:32:33 2016 -0700
@@ -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();
}
-
}
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/policy/privateutil/LocalizationMessages.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/policy/privateutil/LocalizationMessages.java Mon May 30 17:32:33 2016 -0700
@@ -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);
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/AddressingMessages.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/AddressingMessages.java Mon May 30 17:32:33 2016 -0700
@@ -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");
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/BindingApiMessages.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/BindingApiMessages.java Mon May 30 17:32:33 2016 -0700
@@ -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");
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ClientMessages.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ClientMessages.java Mon May 30 17:32:33 2016 -0700
@@ -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);
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/DispatchMessages.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/DispatchMessages.java Mon May 30 17:32:33 2016 -0700
@@ -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);
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/EncodingMessages.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/EncodingMessages.java Mon May 30 17:32:33 2016 -0700
@@ -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);
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/HandlerMessages.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/HandlerMessages.java Mon May 30 17:32:33 2016 -0700
@@ -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);
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/HttpserverMessages.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/HttpserverMessages.java Mon May 30 17:32:33 2016 -0700
@@ -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);
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ManagementMessages.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ManagementMessages.java Mon May 30 17:32:33 2016 -0700
@@ -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);
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ModelerMessages.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ModelerMessages.java Mon May 30 17:32:33 2016 -0700
@@ -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);
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/PolicyMessages.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/PolicyMessages.java Mon May 30 17:32:33 2016 -0700
@@ -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");
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ProviderApiMessages.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ProviderApiMessages.java Mon May 30 17:32:33 2016 -0700
@@ -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");
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/SenderMessages.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/SenderMessages.java Mon May 30 17:32:33 2016 -0700
@@ -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);
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ServerMessages.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/ServerMessages.java Mon May 30 17:32:33 2016 -0700
@@ -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);
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/SoapMessages.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/SoapMessages.java Mon May 30 17:32:33 2016 -0700
@@ -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);
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/StreamingMessages.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/StreamingMessages.java Mon May 30 17:32:33 2016 -0700
@@ -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");
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/TubelineassemblyMessages.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/TubelineassemblyMessages.java Mon May 30 17:32:33 2016 -0700
@@ -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);
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/UtilMessages.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/UtilMessages.java Mon May 30 17:32:33 2016 -0700
@@ -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);
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/WsdlmodelMessages.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/WsdlmodelMessages.java Mon May 30 17:32:33 2016 -0700
@@ -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);
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/WsservletMessages.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/WsservletMessages.java Mon May 30 17:32:33 2016 -0700
@@ -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");
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/XmlmessageMessages.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/resources/XmlmessageMessages.java Mon May 30 17:32:33 2016 -0700
@@ -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");
--- a/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/exception/JAXWSExceptionBase.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/exception/JAXWSExceptionBase.java Mon May 30 17:32:33 2016 -0700
@@ -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
//
--- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/processor/ProcessorException.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/processor/ProcessorException.java Mon May 30 17:32:33 2016 -0700
@@ -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);
+ }
}
--- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ConfigurationMessages.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ConfigurationMessages.java Mon May 30 17:32:33 2016 -0700
@@ -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.
*
--- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/GeneratorMessages.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/GeneratorMessages.java Mon May 30 17:32:33 2016 -0700
@@ -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);
--- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/JavacompilerMessages.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/JavacompilerMessages.java Mon May 30 17:32:33 2016 -0700
@@ -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");
--- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ModelMessages.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ModelMessages.java Mon May 30 17:32:33 2016 -0700
@@ -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);
--- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ModelerMessages.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ModelerMessages.java Mon May 30 17:32:33 2016 -0700
@@ -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);
--- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ProcessorMessages.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/ProcessorMessages.java Mon May 30 17:32:33 2016 -0700
@@ -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);
+ }
}
--- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/UtilMessages.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/UtilMessages.java Mon May 30 17:32:33 2016 -0700
@@ -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);
--- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/WebserviceapMessages.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/WebserviceapMessages.java Mon May 30 17:32:33 2016 -0700
@@ -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);
--- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/WscompileMessages.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/WscompileMessages.java Mon May 30 17:32:33 2016 -0700
@@ -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);
--- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/WsdlMessages.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/resources/WsdlMessages.java Mon May 30 17:32:33 2016 -0700
@@ -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");
--- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/util/WSDLParseException.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/util/WSDLParseException.java Mon May 30 17:32:33 2016 -0700
@@ -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);
+ }
}
--- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wsdl/framework/ParseException.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wsdl/framework/ParseException.java Mon May 30 17:32:33 2016 -0700
@@ -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);
+ }
}
--- a/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wsdl/framework/ValidationException.java Mon May 30 16:31:56 2016 +0200
+++ b/jaxws/src/jdk.xml.ws/share/classes/com/sun/tools/internal/ws/wsdl/framework/ValidationException.java Mon May 30 17:32:33 2016 -0700
@@ -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);
+ }
}