Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse Communications Framework (ECF) » NPE on RemoteService call with no parameters
NPE on RemoteService call with no parameters [message #609987] Thu, 14 December 2006 12:13 Go to next message
Paul Woodward is currently offline Paul WoodwardFriend
Messages: 11
Registered: July 2009
Junior Member
------=_Part_734_7217988.1166098460794
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi Guys,

RemoteCallImpl.toString() calls Arrays.asList with the list of parameters which will fail with a NPE if there are none.

I've attached a simple patch that works for me.

Regards, Paul
------=_Part_734_7217988.1166098460794
Content-Type: text/plain; name=patch.txt; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=patch.txt

### Eclipse Workspace Patch 1.0
#P org.eclipse.ecf.provider.remoteservice
Index: src/org/eclipse/ecf/provider/remoteservice/generic/RemoteCal lImpl.java
============================================================ =======
RCS file: /cvsroot/technology/org.eclipse.ecf/plugins/org.eclipse.ecf. provider.remoteservice/src/org/eclipse/ecf/provider/remotese rvice/generic/RemoteCallImpl.java,v
retrieving revision 1.3
diff -u -r1.3 RemoteCallImpl.java
--- src/org/eclipse/ecf/provider/remoteservice/generic/RemoteCal lImpl.java 25 Nov 2006 05:45:37 -0000 1.3
+++ src/org/eclipse/ecf/provider/remoteservice/generic/RemoteCal lImpl.java 14 Dec 2006 12:12:59 -0000
@@ -58,7 +58,7 @@
buf.append("class=").append(clazz).append(";");
buf.append("method=").append(method)
.append(";");
- buf.append("params=").append(Arrays.asList(parameters)).append( ";");
+ buf.append("params=").append(parameters == null ? "" : Arrays.asList(parameters)).append(";");
buf.append("timeout=").append(timeout).append("]");
return buf.toString();
}

------=_Part_734_7217988.1166098460794--
Re: NPE on RemoteService call with no parameters [message #609989 is a reply to message #609987] Thu, 14 December 2006 23:28 Go to previous message
Scott Lewis is currently offline Scott LewisFriend
Messages: 1038
Registered: July 2009
Senior Member
Hi Paul,

Thanks for the bug report and fix. I've created a bug, added patch as
attachment, applied the patch and marked bug as fixed.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=168139

Again, thanks Paul!

Scott


Paul Woodward wrote:
> Hi Guys,
>
> RemoteCallImpl.toString() calls Arrays.asList with the list of parameters which will fail with a NPE if there are none.
>
> I've attached a simple patch that works for me.
>
> Regards, Paul
>
>
> ------------------------------------------------------------ ------------
>
> ### Eclipse Workspace Patch 1.0
> #P org.eclipse.ecf.provider.remoteservice
> Index: src/org/eclipse/ecf/provider/remoteservice/generic/RemoteCal lImpl.java
> ============================================================ =======
> RCS file: /cvsroot/technology/org.eclipse.ecf/plugins/org.eclipse.ecf. provider.remoteservice/src/org/eclipse/ecf/provider/remotese rvice/generic/RemoteCallImpl.java,v
> retrieving revision 1.3
> diff -u -r1.3 RemoteCallImpl.java
> --- src/org/eclipse/ecf/provider/remoteservice/generic/RemoteCal lImpl.java 25 Nov 2006 05:45:37 -0000 1.3
> +++ src/org/eclipse/ecf/provider/remoteservice/generic/RemoteCal lImpl.java 14 Dec 2006 12:12:59 -0000
> @@ -58,7 +58,7 @@
> buf.append("class=").append(clazz).append(";");
> buf.append("method=").append(method)
> .append(";");
> - buf.append("params=").append(Arrays.asList(parameters)).append( ";");
> + buf.append("params=").append(parameters == null ? "" : Arrays.asList(parameters)).append(";");
> buf.append("timeout=").append(timeout).append("]");
> return buf.toString();
> }
Previous Topic:IBM Websphere MQSeries JMS provider
Next Topic:ECF 0.9.5 stable
Goto Forum:
  


Current Time: Fri Apr 26 20:52:52 GMT 2024

Powered by FUDForum. Page generated in 0.03384 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top