[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] ServiceReference.compareTo(Object)

Hi Tom and Alex.

I'm sorry for beeing late to your reply.
(The mail server in my office had been down.. :-(

Thank you for quick reply and opening the bug !

Regards
Shinichi Okano

Thomas Watson-san wrote on 2009/04/24 23:44:
>
> I opened bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=273593 to
> track this
>
> Tom
>
>
>
> Inactive hide details for BJ Hargrave---04/24/2009 07:49:33
> AM---Please open a bug in the bugzilla system for this.BJ
> Hargrave---04/24/2009 07:49:33 AM---Please open a bug in the bugzilla
> system for this.
>
>
> From: 	
> BJ Hargrave/Austin/IBM@IBMUS
>
> To: 	
> Equinox development mailing list <equinox-dev@xxxxxxxxxxx>
>
> Date: 	
> 04/24/2009 07:49 AM
>
> Subject: 	
> Re: [equinox-dev] ServiceReference.compareTo(Object)
>
> ------------------------------------------------------------------------
>
>
>
> Please open a bug in the bugzilla system for this.
> -- 
>
> *BJ Hargrave*
> Senior Technical Staff Member, IBM
> OSGi Fellow and CTO of the _OSGi Alliance_ <http://www.osgi.org/>_
> __hargrave@xxxxxxxxxxx <mailto:hargrave@xxxxxxxxxx> 	
>
> office: +1 386 848 1781
> mobile: +1 386 848 3788
>
>
>
> From: 	岡野 真一 <okano-shinichi@xxxxxxxxx>
> To: 	equinox-dev@xxxxxxxxxxx
> Date: 	2009/04/24 05:37
> Subject: 	[equinox-dev] ServiceReference.compareTo(Object)
> Sent by: 	equinox-dev-bounces@xxxxxxxxxxx
>
>
> ------------------------------------------------------------------------
>
>
>
> Hi all !
>
> I am using Equinox 3.4.2, and I thik I found a bug.
>
> The Javadoc of "org.osgi.framework.ServiceReference.compareTo(Object)"
> says the following:
>
> This ServiceReference is less than the specified ServiceReference if
> it has a lower service ranking and greater if it has a higher
> service ranking. Otherwise, if this ServiceReference and the
> specified ServiceReference have the same service ranking, this
> ServiceReference is less than the specified ServiceReference if it
> has a higher service id and greater if it has a lower service id.
>
> But,
> org.eclipse.osgi.framework.internal.core.ServiceReferenceImpl.compareTo(Object)
> (version=3.4.3.R34x_v20081215-1030) is implemented the following.
>
> if (this.getRanking() != other.getRanking())
> return this.getRanking() > other.getRanking() ? -1 : 1;
> return this.getId() == other.getId() ? 0 : this.getId() >
> other.getId() ? 1 : -1;
>
> I think the following is correct.
>
> if (this.getRanking() != other.getRanking())
>
> return this.getRanking() > other.getRanking() ? 1 : -1; // <--
>
> return this.getId() == other.getId() ? 0 : this.getId() >
> other.getId() ? -1 : 1; // <<-
>
>
> I'm sorry if I have a mistake, or if it had already been discussed.
>
> Thanks.
>
> -- 
> -------------------------------------------------------------
> Shinichi Okano (okano-shinichi@xxxxxxxxx)
>
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@xxxxxxxxxxxx
> __https://dev.eclipse.org/mailman/listinfo/equinox-dev_
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
>   

-- 
----------------------------------------------------------------------
Shinichi Okano (okano-shinichi@xxxxxxxxx)
Sumitomo Electric Industries, Ltd. (http://www.sei.co.jp/index.en.html)