You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by "David Jencks (JIRA)" <je...@portals.apache.org> on 2006/01/19 09:57:42 UTC

[jira] Created: (JS2-472) FragmentImpl.getFragments() can be null but is assumed not null

FragmentImpl.getFragments() can be null but is assumed not null
---------------------------------------------------------------

         Key: JS2-472
         URL: http://issues.apache.org/jira/browse/JS2-472
     Project: Jetspeed 2
        Type: Bug
    Versions: 2.1-dev    
    Reporter: David Jencks


org.apache.jetspeed.om.page.psml.FragmentImpl.getFragments() can return null if all fragments fail the security check: see line 560.

However, ContentFragmentImpl assumes that a non-null value is returned: for instance in ContentFragmentList.duplicateList().

I assume the best fix is to always return a list, even if empty.

I will supply a patch in the next day or two.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


[jira] Assigned: (JS2-472) FragmentImpl.getFragments() can be null but is assumed not null

Posted by "Ate Douma (JIRA)" <je...@portals.apache.org>.
     [ https://issues.apache.org/jira/browse/JS2-472?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ate Douma reassigned JS2-472:
-----------------------------

    Assignee:     (was: Randy Watler)

> FragmentImpl.getFragments() can be null but is assumed not null
> ---------------------------------------------------------------
>
>                 Key: JS2-472
>                 URL: https://issues.apache.org/jira/browse/JS2-472
>             Project: Jetspeed 2
>          Issue Type: Bug
>    Affects Versions: 2.1-dev
>            Reporter: David Jencks
>         Attachments: FragmentImpl.diff, JS2-472-FragmentImpl.diff
>
>
> org.apache.jetspeed.om.page.psml.FragmentImpl.getFragments() can return null if all fragments fail the security check: see line 560.
> However, ContentFragmentImpl assumes that a non-null value is returned: for instance in ContentFragmentList.duplicateList().
> I assume the best fix is to always return a list, even if empty.
> I will supply a patch in the next day or two.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


[jira] Assigned: (JS2-472) FragmentImpl.getFragments() can be null but is assumed not null

Posted by "Randy Watler (JIRA)" <je...@portals.apache.org>.
     [ http://issues.apache.org/jira/browse/JS2-472?page=all ]

Randy Watler reassigned JS2-472:
--------------------------------

    Assign To: Randy Watler

> FragmentImpl.getFragments() can be null but is assumed not null
> ---------------------------------------------------------------
>
>          Key: JS2-472
>          URL: http://issues.apache.org/jira/browse/JS2-472
>      Project: Jetspeed 2
>         Type: Bug
>     Versions: 2.1-dev
>     Reporter: David Jencks
>     Assignee: Randy Watler
>  Attachments: FragmentImpl.diff, JS2-472-FragmentImpl.diff
>
> org.apache.jetspeed.om.page.psml.FragmentImpl.getFragments() can return null if all fragments fail the security check: see line 560.
> However, ContentFragmentImpl assumes that a non-null value is returned: for instance in ContentFragmentList.duplicateList().
> I assume the best fix is to always return a list, even if empty.
> I will supply a patch in the next day or two.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


[jira] Updated: (JS2-472) FragmentImpl.getFragments() can be null but is assumed not null

Posted by "David Jencks (JIRA)" <je...@portals.apache.org>.
     [ http://issues.apache.org/jira/browse/JS2-472?page=all ]

David Jencks updated JS2-472:
-----------------------------

    Attachment: JS2-472-FragmentImpl.diff

After Randy's fix for JS2-473 I think this patch is a better solution to this problem.  I've tried to minimize whitespace changes which means that indenting needs to be adjusted before commit.

> FragmentImpl.getFragments() can be null but is assumed not null
> ---------------------------------------------------------------
>
>          Key: JS2-472
>          URL: http://issues.apache.org/jira/browse/JS2-472
>      Project: Jetspeed 2
>         Type: Bug
>     Versions: 2.1-dev
>     Reporter: David Jencks
>  Attachments: FragmentImpl.diff, JS2-472-FragmentImpl.diff
>
> org.apache.jetspeed.om.page.psml.FragmentImpl.getFragments() can return null if all fragments fail the security check: see line 560.
> However, ContentFragmentImpl assumes that a non-null value is returned: for instance in ContentFragmentList.duplicateList().
> I assume the best fix is to always return a list, even if empty.
> I will supply a patch in the next day or two.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


[jira] Commented: (JS2-472) FragmentImpl.getFragments() can be null but is assumed not null

Posted by "Randy Watler (JIRA)" <je...@portals.apache.org>.
    [ http://issues.apache.org/jira/browse/JS2-472?page=comments#action_12364410 ] 

Randy Watler commented on JS2-472:
----------------------------------

I'll get this applied in the next few days. I missed this JIRA issue on the last iterations...thanks for spotting this one!


> FragmentImpl.getFragments() can be null but is assumed not null
> ---------------------------------------------------------------
>
>          Key: JS2-472
>          URL: http://issues.apache.org/jira/browse/JS2-472
>      Project: Jetspeed 2
>         Type: Bug
>     Versions: 2.1-dev
>     Reporter: David Jencks
>     Assignee: Randy Watler
>  Attachments: FragmentImpl.diff, JS2-472-FragmentImpl.diff
>
> org.apache.jetspeed.om.page.psml.FragmentImpl.getFragments() can return null if all fragments fail the security check: see line 560.
> However, ContentFragmentImpl assumes that a non-null value is returned: for instance in ContentFragmentList.duplicateList().
> I assume the best fix is to always return a list, even if empty.
> I will supply a patch in the next day or two.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


[jira] Updated: (JS2-472) FragmentImpl.getFragments() can be null but is assumed not null

Posted by "David Jencks (JIRA)" <je...@portals.apache.org>.
     [ http://issues.apache.org/jira/browse/JS2-472?page=all ]

David Jencks updated JS2-472:
-----------------------------

    Attachment: FragmentImpl.diff

The attached patch includes the changes to make getFragments() not return null, ever.  However it also contains some changes to permissions construction/evaluation that if applied now would break the build, so this is basically to look at, not apply.  I'll include these changes also in the permissions patch I'm working on.

> FragmentImpl.getFragments() can be null but is assumed not null
> ---------------------------------------------------------------
>
>          Key: JS2-472
>          URL: http://issues.apache.org/jira/browse/JS2-472
>      Project: Jetspeed 2
>         Type: Bug
>     Versions: 2.1-dev
>     Reporter: David Jencks
>  Attachments: FragmentImpl.diff
>
> org.apache.jetspeed.om.page.psml.FragmentImpl.getFragments() can return null if all fragments fail the security check: see line 560.
> However, ContentFragmentImpl assumes that a non-null value is returned: for instance in ContentFragmentList.duplicateList().
> I assume the best fix is to always return a list, even if empty.
> I will supply a patch in the next day or two.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


[jira] Commented: (JS2-472) FragmentImpl.getFragments() can be null but is assumed not null

Posted by "Ate Douma (JIRA)" <je...@portals.apache.org>.
    [ http://issues.apache.org/jira/browse/JS2-472?page=comments#action_12374566 ] 

Ate Douma commented on JS2-472:
-------------------------------

This problem still exists.

If I enable permissions security on the (Castor) PageManager, Jetspeed fully breaks down: 

java.lang.NullPointerException
	at org.apache.jetspeed.om.page.ContentFragmentImpl$ContentFragmentList.isEmpty(ContentFragmentImpl.java:673)
	at org.apache.jetspeed.decoration.PageTheme.setupFragmentDecorations(PageTheme.java:77)
	at org.apache.jetspeed.decoration.PageTheme.<init>(PageTheme.java:52)
	at org.apache.jetspeed.decoration.DecorationFactoryImpl.getTheme(DecorationFactoryImpl.java:95)
	at org.apache.jetspeed.decoration.DecorationValve.invoke(DecorationValve.java:90)
	at org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:166)
	at org.apache.jetspeed.pipeline.valve.impl.ActionValveImpl.invoke(ActionValveImpl.java:147)
	at org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:166)
	at org.apache.jetspeed.container.ContainerValve.invoke(ContainerValve.java:76)
	at org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:166)
	at org.apache.jetspeed.profiler.impl.ProfilerValveImpl.invoke(ProfilerValveImpl.java:255)
	at org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:166)
	at org.apache.jetspeed.security.impl.LoginValidationValveImpl.invoke(LoginValidationValveImpl.java:159)
	at org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:166)
	at org.apache.jetspeed.security.impl.PasswordCredentialValveImpl.invoke(PasswordCredentialValveImpl.java:148)
	at org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:166)
	at org.apache.jetspeed.localization.impl.LocalizationValveImpl.invoke(LocalizationValveImpl.java:169)
	at org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:166)
	at org.apache.jetspeed.security.impl.AbstractSecurityValve$1.run(AbstractSecurityValve.java:117)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAsPrivileged(Subject.java:454)
	at org.apache.jetspeed.security.impl.AbstractSecurityValve.invoke(AbstractSecurityValve.java:111)
	at org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:166)
	at org.apache.jetspeed.container.url.impl.PortalURLValveImpl.invoke(PortalURLValveImpl.java:67)
	at org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:166)
	at org.apache.jetspeed.capabilities.impl.CapabilityValveImpl.invoke(CapabilityValveImpl.java:128)
	at org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:166)
	at org.apache.jetspeed.pipeline.JetspeedPipeline.invoke(JetspeedPipeline.java:145)
	at org.apache.jetspeed.engine.JetspeedEngine.service(JetspeedEngine.java:214)
	at org.apache.jetspeed.engine.JetspeedServlet.doGet(JetspeedServlet.java:232)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
	at java.lang.Thread.run(Thread.java:595)



> FragmentImpl.getFragments() can be null but is assumed not null
> ---------------------------------------------------------------
>
>          Key: JS2-472
>          URL: http://issues.apache.org/jira/browse/JS2-472
>      Project: Jetspeed 2
>         Type: Bug

>     Versions: 2.1-dev
>     Reporter: David Jencks
>     Assignee: Randy Watler
>  Attachments: FragmentImpl.diff, JS2-472-FragmentImpl.diff
>
> org.apache.jetspeed.om.page.psml.FragmentImpl.getFragments() can return null if all fragments fail the security check: see line 560.
> However, ContentFragmentImpl assumes that a non-null value is returned: for instance in ContentFragmentList.duplicateList().
> I assume the best fix is to always return a list, even if empty.
> I will supply a patch in the next day or two.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org