You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-dev@portals.apache.org by "Brian DeHamer (JIRA)" <ji...@apache.org> on 2008/09/11 21:39:44 UTC

[jira] Created: (PLUTO-499) Invoking FilterConfig.getInitParameter() when there are no filter parameters defined results in NPE

Invoking FilterConfig.getInitParameter() when there are no filter parameters defined results in NPE
---------------------------------------------------------------------------------------------------

                 Key: PLUTO-499
                 URL: https://issues.apache.org/jira/browse/PLUTO-499
             Project: Pluto
          Issue Type: Bug
          Components: portlet container
    Affects Versions: 2.0.0
         Environment: JDK 1.5.0_16, Tomcat 5.5.27
            Reporter: Brian DeHamer


Within the init() method of a PortletFilter, if you invoke the GetInitParameter() method of the passed-in FilterConfig object a NullPointerException is thrown if the filter has been configured with NO initialization parameters.  The NPE comes from

org.apache.pluto.driver.services.container.FilterConfigImpl.getInitParameter(FilterConfigImpl.java:48)

If you configure the portlet filter with ANY initiailization parameters the NPE is avoided.

According to the JSR286 spec it seems that any call to GetInitParameter() that references a non-existent initialization parameter should return null.

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


[jira] Updated: (PLUTO-499) Invoking FilterConfig.getInitParameter() when there are no filter parameters defined results in NPE

Posted by "Craig Doremus (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PLUTO-499?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Craig Doremus updated PLUTO-499:
--------------------------------

    Affects Version/s: 2.0-refactoring
        Fix Version/s: 2.0-refactoring

The patch should be applied to the trunk and the 2.0-refactoring branch.

> Invoking FilterConfig.getInitParameter() when there are no filter parameters defined results in NPE
> ---------------------------------------------------------------------------------------------------
>
>                 Key: PLUTO-499
>                 URL: https://issues.apache.org/jira/browse/PLUTO-499
>             Project: Pluto
>          Issue Type: Bug
>          Components: portlet container
>    Affects Versions: 2.0.0, 2.0-refactoring
>         Environment: JDK 1.5.0_16, Tomcat 5.5.27
>            Reporter: Brian DeHamer
>             Fix For: 2.0.0, 2.0-refactoring
>
>         Attachments: FilterConfigImpl.java, Pluto_499.patch
>
>
> Within the init() method of a PortletFilter, if you invoke the GetInitParameter() method of the passed-in FilterConfig object a NullPointerException is thrown if the filter has been configured with NO initialization parameters.  The NPE comes from
> org.apache.pluto.driver.services.container.FilterConfigImpl.getInitParameter(FilterConfigImpl.java:48)
> If you configure the portlet filter with ANY initiailization parameters the NPE is avoided.
> According to the JSR286 spec it seems that any call to GetInitParameter() that references a non-existent initialization parameter should return null.

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


[jira] Updated: (PLUTO-499) Invoking FilterConfig.getInitParameter() when there are no filter parameters defined results in NPE

Posted by "Craig Doremus (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PLUTO-499?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Craig Doremus updated PLUTO-499:
--------------------------------

    Attachment: Pluto_499.patch

Thank you, Brian,  for debugging this issue. I created a patch file based on your input. I will try to apply it soon if someone else doesn't beat me to it.

> Invoking FilterConfig.getInitParameter() when there are no filter parameters defined results in NPE
> ---------------------------------------------------------------------------------------------------
>
>                 Key: PLUTO-499
>                 URL: https://issues.apache.org/jira/browse/PLUTO-499
>             Project: Pluto
>          Issue Type: Bug
>          Components: portlet container
>    Affects Versions: 2.0.0
>         Environment: JDK 1.5.0_16, Tomcat 5.5.27
>            Reporter: Brian DeHamer
>             Fix For: 2.0.0
>
>         Attachments: FilterConfigImpl.java, Pluto_499.patch
>
>
> Within the init() method of a PortletFilter, if you invoke the GetInitParameter() method of the passed-in FilterConfig object a NullPointerException is thrown if the filter has been configured with NO initialization parameters.  The NPE comes from
> org.apache.pluto.driver.services.container.FilterConfigImpl.getInitParameter(FilterConfigImpl.java:48)
> If you configure the portlet filter with ANY initiailization parameters the NPE is avoided.
> According to the JSR286 spec it seems that any call to GetInitParameter() that references a non-existent initialization parameter should return null.

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


[jira] Updated: (PLUTO-499) Invoking FilterConfig.getInitParameter() when there are no filter parameters defined results in NPE

Posted by "Brian DeHamer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PLUTO-499?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian DeHamer updated PLUTO-499:
--------------------------------

    Fix Version/s: 2.0.0

> Invoking FilterConfig.getInitParameter() when there are no filter parameters defined results in NPE
> ---------------------------------------------------------------------------------------------------
>
>                 Key: PLUTO-499
>                 URL: https://issues.apache.org/jira/browse/PLUTO-499
>             Project: Pluto
>          Issue Type: Bug
>          Components: portlet container
>    Affects Versions: 2.0.0
>         Environment: JDK 1.5.0_16, Tomcat 5.5.27
>            Reporter: Brian DeHamer
>             Fix For: 2.0.0
>
>         Attachments: FilterConfigImpl.java
>
>
> Within the init() method of a PortletFilter, if you invoke the GetInitParameter() method of the passed-in FilterConfig object a NullPointerException is thrown if the filter has been configured with NO initialization parameters.  The NPE comes from
> org.apache.pluto.driver.services.container.FilterConfigImpl.getInitParameter(FilterConfigImpl.java:48)
> If you configure the portlet filter with ANY initiailization parameters the NPE is avoided.
> According to the JSR286 spec it seems that any call to GetInitParameter() that references a non-existent initialization parameter should return null.

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


[jira] Resolved: (PLUTO-499) Invoking FilterConfig.getInitParameter() when there are no filter parameters defined results in NPE

Posted by "Craig Doremus (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PLUTO-499?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Craig Doremus resolved PLUTO-499.
---------------------------------

    Resolution: Fixed

Applied fix contributed by Brian DeHamer to trunk and 2.0-refactoring branch in SVN revs 701590 and 701593.

> Invoking FilterConfig.getInitParameter() when there are no filter parameters defined results in NPE
> ---------------------------------------------------------------------------------------------------
>
>                 Key: PLUTO-499
>                 URL: https://issues.apache.org/jira/browse/PLUTO-499
>             Project: Pluto
>          Issue Type: Bug
>          Components: portlet container
>    Affects Versions: 2.0.0, 2.0-refactoring
>         Environment: JDK 1.5.0_16, Tomcat 5.5.27
>            Reporter: Brian DeHamer
>             Fix For: 2.0.0, 2.0-refactoring
>
>         Attachments: FilterConfigImpl.java, Pluto_499.patch
>
>
> Within the init() method of a PortletFilter, if you invoke the GetInitParameter() method of the passed-in FilterConfig object a NullPointerException is thrown if the filter has been configured with NO initialization parameters.  The NPE comes from
> org.apache.pluto.driver.services.container.FilterConfigImpl.getInitParameter(FilterConfigImpl.java:48)
> If you configure the portlet filter with ANY initiailization parameters the NPE is avoided.
> According to the JSR286 spec it seems that any call to GetInitParameter() that references a non-existent initialization parameter should return null.

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


[jira] Updated: (PLUTO-499) Invoking FilterConfig.getInitParameter() when there are no filter parameters defined results in NPE

Posted by "Brian DeHamer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PLUTO-499?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian DeHamer updated PLUTO-499:
--------------------------------

    Attachment: FilterConfigImpl.java

Attached is an updated copy of FilterConfigImpl which includes a null check in the getInitParameters method.  This appears to solve the problem

> Invoking FilterConfig.getInitParameter() when there are no filter parameters defined results in NPE
> ---------------------------------------------------------------------------------------------------
>
>                 Key: PLUTO-499
>                 URL: https://issues.apache.org/jira/browse/PLUTO-499
>             Project: Pluto
>          Issue Type: Bug
>          Components: portlet container
>    Affects Versions: 2.0.0
>         Environment: JDK 1.5.0_16, Tomcat 5.5.27
>            Reporter: Brian DeHamer
>             Fix For: 2.0.0
>
>         Attachments: FilterConfigImpl.java
>
>
> Within the init() method of a PortletFilter, if you invoke the GetInitParameter() method of the passed-in FilterConfig object a NullPointerException is thrown if the filter has been configured with NO initialization parameters.  The NPE comes from
> org.apache.pluto.driver.services.container.FilterConfigImpl.getInitParameter(FilterConfigImpl.java:48)
> If you configure the portlet filter with ANY initiailization parameters the NPE is avoided.
> According to the JSR286 spec it seems that any call to GetInitParameter() that references a non-existent initialization parameter should return null.

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