Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] Expected behavior of IRemoteServiceContainerAdapter#getRemoteServiceReferences ?

Hi Jan,

Jan S. Rellermeyer wrote:
What is the expected behavior of
org.eclipse.ecf.remoteservice.IRemoteServiceContainerAdapter#getRemoteServic
eReferences when there are no results to be returned. The test cases check
for an empty array. This is not the "usual OSGi way", where these kinds of
methods return null in case of no results. (see, e.g.,
BundleContext#getServiceReferences in the specs)

Yeah. I think it's cleaner (as you suggest below) to return an empty array, but as you say this doesn't seem to be the convention adopted by OSGi at this point. So in order to be closer to BundleContext, I would be inclined to have it return null. I will adjust the docs and the impl accordingly.

The elegance of this can be
questioned since it typically leads to an additional null check but it's
probably what people expect.

Yes.

Scott

Cheers,
Jan.

------------------------------------------------------------
ETH Zurich, MSc Jan S. Rellermeyer,
Information and Communication Systems Research Group (IKS), Department of Computer Science, IFW B 47.1, Haldeneggsteig 4, CH–8092 Zürich Tel +41 44 632 30 38,
http://www.iks.inf.ethz.ch
------------------------------------------------------------


_______________________________________________
ecf-dev mailing list
ecf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ecf-dev



Back to the top