Bug 818565 - Portal container name is hardcoded in the LocalizationFilter
Portal container name is hardcoded in the LocalizationFilter
Status: VERIFIED
Product: JBoss Enterprise Portal Platform 5
Classification: JBoss
Component: Portal (Show other bugs)
5.2.1.GA
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 5.2.2.ER01
Assigned To: hfnukal@redhat.com
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-03 07:50 EDT by Thomas Heute
Modified: 2013-06-26 21:09 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
A hard-coded portal container name in the LocalizationFilter caused a NPE (NULL container) if the default context path was changed. The fix introduces changes to the way the portal container name is parsed by the LocalizationFilter, which corrects the issue.
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Commits:
8739 by hfnukal at 2012-06-22 09:06:17 EDT (show)
8739 by hfnukal at 2012-06-22 09:06:17 EDT

Checked in to /mnt/n4aphx2-3.storage.phx2.redhat.com/svn/repos/gatein

Bug 818565 - Portal container name is hardcoded in the LocalizationFilter

1 file changed:

  • epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/application/localization/LocalizationFilter.java (+1 / -1)


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker GTNPORTAL-2207 Major Resolved Hardcode for getting portal container in LocalizationFilter.java 2014-06-03 08:39:20 EDT

  None (edit)
Description Thomas Heute 2012-05-03 07:50:59 EDT
In LocalizationFilter.java, we hardcode "portal" for getting RootContainer:

if (container instanceof RootContainer)
     container = (ExoContainer) container.getComponentInstance("portal");
This affect if we change default context path as article: http://community.jboss.org/wiki/ChangeGateInContextPath. We will get the exception because NULL container.
The code should be change to:

if (container instanceof RootContainer)
     container = (ExoContainer) container.getComponentInstance(req.getContextPath().substring(1));
Comment 1 hfnukal@redhat.com 2012-08-24 10:27:26 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause: Portal container name is hardcoded in the LocalizationFilter
Consequence: We will get the exception because NULL container
Fix: Change code
Result: No NULL exception
Comment 2 vramik 2012-08-27 12:04:04 EDT
Verified again at 5.2.2 CR01
Comment 3 Jared MORGAN 2012-08-27 19:15:20 EDT
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,4 +1 @@
-Cause: Portal container name is hardcoded in the LocalizationFilter
+A hard-coded portal container name in the LocalizationFilter caused a NPE (NULL container) if the default context path was changed. The fix introduces changes to the way the portal container name is parsed by the LocalizationFilter, which corrects the issue.-Consequence: We will get the exception because NULL container
-Fix: Change code
-Result: No NULL exception

Note You need to log in before you can comment on or make changes to this bug.