ByteArrayResource throws error if data is null
----------------------------------------------

                 Key: WICKET-4301
                 URL: https://issues.apache.org/jira/browse/WICKET-4301
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.5.3
            Reporter: Bertrand Guay-Paquet
            Priority: Minor
         Attachments: ByteArrayResource.patch

When 
ByteArrayResource#getData(org.apache.wicket.request.resource.IResource.Attributes)
 returns null, the class throws a WicketRuntimeException.

This behavior differs from DynamicImageResource and ResourceStreamResource 
which instead issue the following call:
response.setError(HttpServletResponse.SC_NOT_FOUND);

ByteArrayResource should follow the same behavior. This would allow for 
instance to use it for resources which depend on the contents of 
attributes.getParameters(). When the parameters are invalid, a 404 should be 
issued instead of an exception.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to