struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fritzi (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-4045) Null Pointer Exception on DefaultActionValidatorManager
Date Tue, 16 Apr 2013 20:41:18 GMT

    [ https://issues.apache.org/jira/browse/WW-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13633322#comment-13633322
] 

Fritzi commented on WW-4045:
----------------------------

I have that Lukasz:
  if ((checkFile && fileUrl != null && fileManager.fileNeedsReloading(fileUrl.toString()))
|| !validatorFileCache.containsKey(fileName)) {

The thing is, that the fileName is not in the validatorFileCache so it is going in the if
block anyway.  Shouldn't the code be more like this:
   if (fileUrl != null && (checkFile && && fileManager.fileNeedsReloading(fileUrl.toString()))
|| !validatorFileCache.containsKey(fileName))

So that you are guaranteed to have the fileUrl before going in the if block, if it is null,
just add it to the validatorFileCache.
                
> Null Pointer Exception on DefaultActionValidatorManager
> -------------------------------------------------------
>
>                 Key: WW-4045
>                 URL: https://issues.apache.org/jira/browse/WW-4045
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.3.7
>            Reporter: Fritzi
>             Fix For: 2.3.15
>
>
> With the change implemented on WW-3850, I think the missing piece is that if the validatorFileCache
does not contain the fileName being modified, that the line  is = fileManager.loadFile(fileUrl);
is still being executed which will still result in a null pointer exception.  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message