You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "David Vendt (JIRA)" <ji...@apache.org> on 2015/11/11 10:30:10 UTC
[jira] [Created] (WICKET-6031) NPE when adding
PackageResourceReference#getResource() to shared resources
David Vendt created WICKET-6031:
-----------------------------------
Summary: NPE when adding PackageResourceReference#getResource() to shared resources
Key: WICKET-6031
URL: https://issues.apache.org/jira/browse/WICKET-6031
Project: Wicket
Issue Type: Bug
Affects Versions: 7.1.0
Reporter: David Vendt
This is my first filed issue, so please help me if I'm not filing this correctly.
This issue came across when migrating Apache 6.19.0 to 7.1.0. In our original implementation we added the pie.htc to the applications shared resources in MyWebApplication#init()
{code:java}
getSharedResources().add("/pie.htc", new PackageResourceReference(MyWebApplication.class, "pie.htc").getResource());
{code}
The resource file is next to the MyWebApplication's file and it worked in 6.19.0. Now, in 7.1.0, the method PackageResourceReference#getResource() has been extended and now takes into account the variation, style and locale of the request url.
So, obtaining the resource now depends on the request, which is not available when initializing the application.
{code}
org.apache.wicket.request.resource.PackageResourceReference.getResource(PackageResourceReference.java:115)
{code}
{code}
final Url url = RequestCycle.get().getRequest().getUrl();
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)