|
From: <bob...@us...> - 2003-08-14 04:16:23
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler
In directory sc8-pr-cvs1:/tmp/cvs-serv10958/src/hk/hku/cecid/phoenix/message/handler
Modified Files:
Tag: b0931
MessageServiceHandler.java
Log Message:
Fix bug on NullPointerException on registering when runs on JRE1.3
The bug is due to the case that URL.getPath() will be null for a
deserialized URL.
Index: MessageServiceHandler.java
===================================================================
RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/MessageServiceHandler.java,v
retrieving revision 1.148.2.17
retrieving revision 1.148.2.18
diff -C2 -d -r1.148.2.17 -r1.148.2.18
*** MessageServiceHandler.java 21 May 2003 15:09:17 -0000 1.148.2.17
--- MessageServiceHandler.java 14 Aug 2003 03:50:27 -0000 1.148.2.18
***************
*** 1502,1505 ****
--- 1502,1520 ----
// Not client message listener and it's not using trusted repository
if (clientUrl.getProtocol().equals(MessageListener.PROTOCOL_FILE)) {
+ /*
+ fix for JSDK1.3, where null will be return if clientUrl.getPath()
+ on deserialized URL.
+ */
+ try {
+ clientUrl = new URL(clientUrl.getProtocol(),
+ clientUrl.getHost(), clientUrl.getPort(),
+ clientUrl.getFile());
+ } catch (MalformedURLException e) {
+ String err = ErrorMessages.getMessage(
+ ErrorMessages.ERR_HERMES_REGISTRATION_FAILED,
+ "Invalid client url : " + clientUrl);
+ logger.warn(err);
+ throw new MessageServiceHandlerException(err);
+ }
File clientUrlFile = new File(clientUrl.getPath());
boolean isServerRepository = false;
|