Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Communications Framework (ECF) » NPE on RemoteService call with no parameters
NPE on RemoteService call with no parameters [message #609987] Thu, 14 December 2006 07:13 Go to next message
Paul Woodward is currently offline Paul Woodward
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 18:28 Go to previous message
Scott Lewis is currently offline Scott Lewis
Messages: 964
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: Wed Jul 23 14:24:05 EDT 2014

Powered by FUDForum. Page generated in 0.02322 seconds