struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton (JIRA)" <j...@apache.org>
Subject [jira] Commented: (STR-3173) Regression : NullPointerException in org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty
Date Tue, 16 Dec 2008 20:23:37 GMT

    [ https://issues.apache.org/struts/browse/STR-3173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45283#action_45283
] 

Niall Pemberton commented on STR-3173:
--------------------------------------

Xavier is correct the Map of properties that is built from the request parameters and passed
to the BeanUtils populate method (which delegates to BeanUtils setProperty() method[1]) to
populate the form ignores properties that don't exist - so this method should do as well.
We just need to add a null check to that method.

[1] http://commons.apache.org/beanutils/v1.8.0/apidocs/org/apache/commons/beanutils/BeanUtilsBean.html#setProperty(java.lang.Object,%20java.lang.String,%20java.lang.Object)

> Regression : NullPointerException in org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty
> --------------------------------------------------------------------------------------------------------
>
>                 Key: STR-3173
>                 URL: https://issues.apache.org/struts/browse/STR-3173
>             Project: Struts 1
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.3.10
>            Reporter: Xavier Poinsard
>            Priority: Blocker
>
> With version 1.3.10 we got the following error but not with previous stable version.
> We are using a Form with fileUpload.
> Here is the stack trace : 
> java.lang.NullPointerException
>    at java.lang.Class.isAssignableFrom(Native Method)
>    at org.apache.struts.util.RequestUtils.rationalizeMultipleFileProperty(RequestUtils.java:506)
>    at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:459)
>    at org.apache.struts.chain.commands.servlet.PopulateActionForm.populate(PopulateActionForm.java:50)
>    at org.apache.struts.chain.commands.AbstractPopulateActionForm.execute(AbstractPopulateActionForm.java:60)
>    at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
>    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
>    at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
>    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
>    at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
>    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
>    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message