OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

sca-j message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: NEW ISSUE: Signature of ComponentContext.cast() method


TARGET: Java Common Annotations and APIs

DESCRIPTION: Signature of ComponentContext.cast() method

The signature of the ComponentContext.cast() method is currently
defined as follows:

<B, R extends ServiceReference<B>> R cast(B target)
     throws IllegalArgumentException;

The double parameterization does not make sense, because there
is nothing in the API that extends ServiceReference.

This form of the API was introduced when we had CallableReference
and ServiceReference.  At that time, the signature was:

<B, R extends CallableReference<B>> R cast(B target)
     throws IllegalArgumentException;

The double parameterization was useful then, because it allowed
either a ServiceReference or a CallableReference to be returned.

Now that CallableReference and ServiceReference have been merged,
it is confusing and redundant to have this double parameterization.

PROPOSAL:

Change the API signature to:

<B> ServiceReference<B> cast(B target) throws IllegalArgumentException;




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]