You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2015/11/14 11:00:18 UTC
[jira] [Resolved] (WICKET-6031) NPE in
PackageResourceReference#getResource() when there is no request
[ https://issues.apache.org/jira/browse/WICKET-6031?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Grigorov resolved WICKET-6031.
-------------------------------------
Resolution: Fixed
Fix Version/s: 8.0.0-M1
7.2.0
> NPE in PackageResourceReference#getResource() when there is no request
> ----------------------------------------------------------------------
>
> 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
> Assignee: Martin Grigorov
> Fix For: 7.2.0, 8.0.0-M1
>
>
> 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, which results in a NullPointerException in the following line:
> {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)