You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Martin Grigorov <mg...@apache.org> on 2015/07/06 22:36:22 UTC

PackageResource#getResourceStream() needs to be removed

Hi,

With https://issues.apache.org/jira/browse/WICKET-5909 we consolidated
PackageResource#getResourceStream() and
PackageResource#getCacheableResourceStream().
#getResourceStream() is deprecated in favour of
#getCacheableResourceStream().
Being deprecated actually hides a problem - Wicket doesn't call it anymore
at org.apache.wicket.request.resource.PackageResource#newResourceResponse().
If the application currently overrides #getResourceStream() then migrating
to Wicket 7.x will lead to a compilation *warning* but the application will
fail at runtime.
The application should really be updated to override
#getCacheableResourceStream() to do its work.
I've just hit this problem with Wicket Bootstrap:
https://github.com/l0rdn1kk0n/wicket-bootstrap/commit/4dfd5cf49770e2bcf5dbfb775a9e542bfbfdc447

If you agree I'll remove PackageResource#getResourceStream() and add an
entry to the migration guide.

Martin Grigorov
Freelancer. Available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

Re: PackageResource#getResourceStream() needs to be removed

Posted by Martin Grigorov <mg...@apache.org>.
Done!

Martin Grigorov
Freelancer. Available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Tue, Jul 7, 2015 at 9:36 AM, Martin Grigorov <mg...@apache.org>
wrote:

> Agreed!
>
> Martin Grigorov
> Freelancer. Available for hire!
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Tue, Jul 7, 2015 at 9:29 AM, Sven Meier <sv...@meiers.net> wrote:
>
>> Hi,
>>
>> could we rather remove #getCacheableResourceStream()? For me this
>> method's name is confusing.
>>
>> Sven
>>
>>
>>
>> On 06.07.2015 22:36, Martin Grigorov wrote:
>>
>>> Hi,
>>>
>>> With https://issues.apache.org/jira/browse/WICKET-5909 we consolidated
>>> PackageResource#getResourceStream() and
>>> PackageResource#getCacheableResourceStream().
>>> #getResourceStream() is deprecated in favour of
>>> #getCacheableResourceStream().
>>> Being deprecated actually hides a problem - Wicket doesn't call it
>>> anymore
>>> at
>>> org.apache.wicket.request.resource.PackageResource#newResourceResponse().
>>> If the application currently overrides #getResourceStream() then
>>> migrating
>>> to Wicket 7.x will lead to a compilation *warning* but the application
>>> will
>>> fail at runtime.
>>> The application should really be updated to override
>>> #getCacheableResourceStream() to do its work.
>>> I've just hit this problem with Wicket Bootstrap:
>>>
>>> https://github.com/l0rdn1kk0n/wicket-bootstrap/commit/4dfd5cf49770e2bcf5dbfb775a9e542bfbfdc447
>>>
>>> If you agree I'll remove PackageResource#getResourceStream() and add an
>>> entry to the migration guide.
>>>
>>> Martin Grigorov
>>> Freelancer. Available for hire!
>>> Wicket Training and Consulting
>>> https://twitter.com/mtgrigorov
>>>
>>>
>>
>

Re: PackageResource#getResourceStream() needs to be removed

Posted by Martin Grigorov <mg...@apache.org>.
Agreed!

Martin Grigorov
Freelancer. Available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Tue, Jul 7, 2015 at 9:29 AM, Sven Meier <sv...@meiers.net> wrote:

> Hi,
>
> could we rather remove #getCacheableResourceStream()? For me this method's
> name is confusing.
>
> Sven
>
>
>
> On 06.07.2015 22:36, Martin Grigorov wrote:
>
>> Hi,
>>
>> With https://issues.apache.org/jira/browse/WICKET-5909 we consolidated
>> PackageResource#getResourceStream() and
>> PackageResource#getCacheableResourceStream().
>> #getResourceStream() is deprecated in favour of
>> #getCacheableResourceStream().
>> Being deprecated actually hides a problem - Wicket doesn't call it anymore
>> at
>> org.apache.wicket.request.resource.PackageResource#newResourceResponse().
>> If the application currently overrides #getResourceStream() then migrating
>> to Wicket 7.x will lead to a compilation *warning* but the application
>> will
>> fail at runtime.
>> The application should really be updated to override
>> #getCacheableResourceStream() to do its work.
>> I've just hit this problem with Wicket Bootstrap:
>>
>> https://github.com/l0rdn1kk0n/wicket-bootstrap/commit/4dfd5cf49770e2bcf5dbfb775a9e542bfbfdc447
>>
>> If you agree I'll remove PackageResource#getResourceStream() and add an
>> entry to the migration guide.
>>
>> Martin Grigorov
>> Freelancer. Available for hire!
>> Wicket Training and Consulting
>> https://twitter.com/mtgrigorov
>>
>>
>

Re: PackageResource#getResourceStream() needs to be removed

Posted by Sven Meier <sv...@meiers.net>.
Hi,

could we rather remove #getCacheableResourceStream()? For me this 
method's name is confusing.

Sven


On 06.07.2015 22:36, Martin Grigorov wrote:
> Hi,
>
> With https://issues.apache.org/jira/browse/WICKET-5909 we consolidated
> PackageResource#getResourceStream() and
> PackageResource#getCacheableResourceStream().
> #getResourceStream() is deprecated in favour of
> #getCacheableResourceStream().
> Being deprecated actually hides a problem - Wicket doesn't call it anymore
> at org.apache.wicket.request.resource.PackageResource#newResourceResponse().
> If the application currently overrides #getResourceStream() then migrating
> to Wicket 7.x will lead to a compilation *warning* but the application will
> fail at runtime.
> The application should really be updated to override
> #getCacheableResourceStream() to do its work.
> I've just hit this problem with Wicket Bootstrap:
> https://github.com/l0rdn1kk0n/wicket-bootstrap/commit/4dfd5cf49770e2bcf5dbfb775a9e542bfbfdc447
>
> If you agree I'll remove PackageResource#getResourceStream() and add an
> entry to the migration guide.
>
> Martin Grigorov
> Freelancer. Available for hire!
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>