You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Ian Boston <ie...@tfd.co.uk> on 2010/07/29 12:45:57 UTC
Resource API changes.
Hi,
I am seeing failures with things that implement the Resource api from the 2.0.8 bundle that are used by ResourceUtil.getName(resource) in the 2.0.9-SNAPSHOT bundle.
IIUC the Resource API from 2.0.9-SNAPSHOT has getName(). ResourceUtil.getName() in 2.0.9-SNAPSHOT calls resource.getName() which doesnt exist in 2.0.8 and earlier. AbstractMethodException follows.
I think one solution would be a try catch in the deprecated methods to work with pre 2.0.8 implementations of Resource
WDYT?
Ian
Re: Resource API changes.
Posted by Felix Meschberger <fm...@gmail.com>.
Hi,
On 29.07.2010 16:45, Carsten Ziegeler wrote:
> Justin Edelson wrote
>> On 7/29/10 8:02 AM, Carsten Ziegeler wrote:
>>> Ian Boston wrote
>>>> Hi,
>>>>
>>>> I am seeing failures with things that implement the Resource api from the 2.0.8 bundle that are used by ResourceUtil.getName(resource) in the 2.0.9-SNAPSHOT bundle.
>>>>
>>>> IIUC the Resource API from 2.0.9-SNAPSHOT has getName(). ResourceUtil.getName() in 2.0.9-SNAPSHOT calls resource.getName() which doesnt exist in 2.0.8 and earlier. AbstractMethodException follows.
>>>>
>>>> I think one solution would be a try catch in the deprecated methods to work with pre 2.0.8 implementations of Resource
>>>> WDYT?
>>>>
>>> I think this is a temporary problem - the new API will export version
>>> 2.1, therefore old implementations are not expected to work anymore.
>>> This is the version contract we have - compatibility for clients, but
>>> not necessary for implementations when the minor version changes.
>>>
>>> Regards
>>> Carsten
>> Then we should change the imports on the resource implementation bundles
>> so that they're now [2.1,2.2) ?
>>
> Yes, I think so.
I will care for this.
Myabe we should just keep the old ResourceUtil implementations so as to
not trigger such exceptions.
I just adapted the actual maven dependencies. Thanks for noting.
Regards
Felix
>
> Carsten
Re: Resource API changes.
Posted by Carsten Ziegeler <cz...@apache.org>.
Justin Edelson wrote
> On 7/29/10 8:02 AM, Carsten Ziegeler wrote:
>> Ian Boston wrote
>>> Hi,
>>>
>>> I am seeing failures with things that implement the Resource api from the 2.0.8 bundle that are used by ResourceUtil.getName(resource) in the 2.0.9-SNAPSHOT bundle.
>>>
>>> IIUC the Resource API from 2.0.9-SNAPSHOT has getName(). ResourceUtil.getName() in 2.0.9-SNAPSHOT calls resource.getName() which doesnt exist in 2.0.8 and earlier. AbstractMethodException follows.
>>>
>>> I think one solution would be a try catch in the deprecated methods to work with pre 2.0.8 implementations of Resource
>>> WDYT?
>>>
>> I think this is a temporary problem - the new API will export version
>> 2.1, therefore old implementations are not expected to work anymore.
>> This is the version contract we have - compatibility for clients, but
>> not necessary for implementations when the minor version changes.
>>
>> Regards
>> Carsten
> Then we should change the imports on the resource implementation bundles
> so that they're now [2.1,2.2) ?
>
Yes, I think so.
Carsten
--
Carsten Ziegeler
cziegeler@apache.org
Re: Resource API changes.
Posted by Justin Edelson <ju...@gmail.com>.
On 7/29/10 8:02 AM, Carsten Ziegeler wrote:
> Ian Boston wrote
>> Hi,
>>
>> I am seeing failures with things that implement the Resource api from the 2.0.8 bundle that are used by ResourceUtil.getName(resource) in the 2.0.9-SNAPSHOT bundle.
>>
>> IIUC the Resource API from 2.0.9-SNAPSHOT has getName(). ResourceUtil.getName() in 2.0.9-SNAPSHOT calls resource.getName() which doesnt exist in 2.0.8 and earlier. AbstractMethodException follows.
>>
>> I think one solution would be a try catch in the deprecated methods to work with pre 2.0.8 implementations of Resource
>> WDYT?
>>
> I think this is a temporary problem - the new API will export version
> 2.1, therefore old implementations are not expected to work anymore.
> This is the version contract we have - compatibility for clients, but
> not necessary for implementations when the minor version changes.
>
> Regards
> Carsten
Then we should change the imports on the resource implementation bundles
so that they're now [2.1,2.2) ?
Justin
Re: Resource API changes.
Posted by Carsten Ziegeler <cz...@apache.org>.
Ian Boston wrote
> Hi,
>
> I am seeing failures with things that implement the Resource api from the 2.0.8 bundle that are used by ResourceUtil.getName(resource) in the 2.0.9-SNAPSHOT bundle.
>
> IIUC the Resource API from 2.0.9-SNAPSHOT has getName(). ResourceUtil.getName() in 2.0.9-SNAPSHOT calls resource.getName() which doesnt exist in 2.0.8 and earlier. AbstractMethodException follows.
>
> I think one solution would be a try catch in the deprecated methods to work with pre 2.0.8 implementations of Resource
> WDYT?
>
I think this is a temporary problem - the new API will export version
2.1, therefore old implementations are not expected to work anymore.
This is the version contract we have - compatibility for clients, but
not necessary for implementations when the minor version changes.
Regards
Carsten
--
Carsten Ziegeler
cziegeler@apache.org