Author: jkaputin
Date: Tue Jan 29 09:36:52 2008
New Revision: 616458
URL: http://svn.apache.org/viewvc?rev=616458&view=rev
Log:
Merged recent changes to trunk into woden47 branch.
Modified:
webservices/woden/branches/woden47/src/org/apache/woden/ErrorReporter.java
webservices/woden/branches/woden47/src/org/apache/woden/internal/BaseWSDLReader.java
webservices/woden/branches/woden47/src/org/apache/woden/internal/MessageFormatter.java
webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/DescriptionImpl.java
Modified:
webservices/woden/branches/woden47/src/org/apache/woden/ErrorReporter.java
URL:
http://svn.apache.org/viewvc/webservices/woden/branches/woden47/src/org/apache/woden/ErrorReporter.java?rev=616458&r1=616457&r2=616458&view=diff
==============================================================================
--- webservices/woden/branches/woden47/src/org/apache/woden/ErrorReporter.java
(original)
+++ webservices/woden/branches/woden47/src/org/apache/woden/ErrorReporter.java
Tue Jan 29 09:36:52 2008
@@ -177,6 +177,8 @@
* parsing errors (via the reportError method). Typically these types of
messages
* will be for configuration or runtime errors that will be thrown as
exceptions
* by the caller.
+ * If there are no message arguments, a null value may be specified for
the
+ * <code>arguments</code> parameter instead of an empty array.
*
* @param errorId a String representing the message key
* @param arguments an Object array of message parameters
Modified:
webservices/woden/branches/woden47/src/org/apache/woden/internal/BaseWSDLReader.java
URL:
http://svn.apache.org/viewvc/webservices/woden/branches/woden47/src/org/apache/woden/internal/BaseWSDLReader.java?rev=616458&r1=616457&r2=616458&view=diff
==============================================================================
---
webservices/woden/branches/woden47/src/org/apache/woden/internal/BaseWSDLReader.java
(original)
+++
webservices/woden/branches/woden47/src/org/apache/woden/internal/BaseWSDLReader.java
Tue Jan 29 09:36:52 2008
@@ -190,7 +190,7 @@
{
if(extReg == null) {
String msg = fWsdlContext.errorReporter.getFormattedMessage(
- "WSDL014", new Object[] {});
+ "WSDL014", null);
throw new NullPointerException(msg);
}
@@ -233,9 +233,8 @@
catch(IllegalArgumentException e)
{
// Feature name is not recognized, so throw an exception.
- Object[] args = new Object[] {name};
throw new IllegalArgumentException(
- fWsdlContext.errorReporter.getFormattedMessage("WSDL006",
args));
+ fWsdlContext.errorReporter.getFormattedMessage("WSDL006",
new Object[] {name}));
}
}
@@ -262,9 +261,8 @@
catch(IllegalArgumentException e)
{
// Feature name is not recognized, so throw an exception.
- Object[] args = new Object[] {name};
throw new IllegalArgumentException(
- fWsdlContext.errorReporter.getFormattedMessage("WSDL006",
args));
+ fWsdlContext.errorReporter.getFormattedMessage("WSDL006",
new Object[] {name}));
}
}
@@ -332,9 +330,8 @@
else
{
//property name is not recognized, so throw an exception
- Object[] args = new Object[] {name};
throw new IllegalArgumentException(
- fWsdlContext.errorReporter.getFormattedMessage("WSDL008",
args));
+ fWsdlContext.errorReporter.getFormattedMessage("WSDL008",
new Object[] {name}));
}
}
Modified:
webservices/woden/branches/woden47/src/org/apache/woden/internal/MessageFormatter.java
URL:
http://svn.apache.org/viewvc/webservices/woden/branches/woden47/src/org/apache/woden/internal/MessageFormatter.java?rev=616458&r1=616457&r2=616458&view=diff
==============================================================================
---
webservices/woden/branches/woden47/src/org/apache/woden/internal/MessageFormatter.java
(original)
+++
webservices/woden/branches/woden47/src/org/apache/woden/internal/MessageFormatter.java
Tue Jan 29 09:36:52 2008
@@ -31,6 +31,8 @@
* @author [EMAIL PROTECTED]
*/
public class MessageFormatter {
+
+ private static final Object [] emptyMsgArray = new Object[] {};
/**
* The specified key is used to retrieve an unformatted message from a
@@ -61,7 +63,7 @@
bundle = ResourceBundle.getBundle(bundleName, locale);
}
String unformattedMsg = bundle.getString(key);
- String formattedMsg = MessageFormat.format(unformattedMsg,
args);
+ String formattedMsg = MessageFormat.format(unformattedMsg,
args != null ? args : emptyMsgArray);
return formattedMsg;
} catch (MissingResourceException e) {
if(i == (bundleNames.length -1)) {
Modified:
webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/DescriptionImpl.java
URL:
http://svn.apache.org/viewvc/webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/DescriptionImpl.java?rev=616458&r1=616457&r2=616458&view=diff
==============================================================================
---
webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/DescriptionImpl.java
(original)
+++
webservices/woden/branches/woden47/src/org/apache/woden/internal/wsdl20/DescriptionImpl.java
Tue Jan 29 09:36:52 2008
@@ -434,7 +434,7 @@
} else {
String msg = fWsdlContext.errorReporter.getFormattedMessage(
"WSDL523",
- new Object[] {});
+ null);
throw new WSDLException(WSDLException.OTHER_ERROR, msg);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]