Return-Path: X-Original-To: apmail-directory-dev-archive@www.apache.org Delivered-To: apmail-directory-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CAB7B10812 for ; Tue, 25 Nov 2014 09:46:12 +0000 (UTC) Received: (qmail 45676 invoked by uid 500); 25 Nov 2014 09:46:12 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 45631 invoked by uid 500); 25 Nov 2014 09:46:12 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 45621 invoked by uid 99); 25 Nov 2014 09:46:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Nov 2014 09:46:12 +0000 Date: Tue, 25 Nov 2014 09:46:12 +0000 (UTC) From: "Emmanuel Lecharny (JIRA)" To: dev@directory.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (FC-49) The J2eePolicyMgrImpl.createSession() class stores the wront type into the context MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FC-49?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Emmanuel Lecharny resolved FC-49. --------------------------------- Resolution: Fixed Fixed with http://git-wip-us.apache.org/repos/asf/directory-fortress-realm/commit/805bc4cd > The J2eePolicyMgrImpl.createSession() class stores the wront type into the context > ---------------------------------------------------------------------------------- > > Key: FC-49 > URL: https://issues.apache.org/jira/browse/FC-49 > Project: FORTRESS-CORE > Issue Type: Bug > Affects Versions: 1.0.0-RC39 > Reporter: Emmanuel Lecharny > Fix For: 1.0.0-RC40 > > > The Map we use in this method should contain a {{}}. In the method, we store a {{String}} (a serialized version of the session). In order for this to be possible, the {{Map}} has no generic : > {code} > HashMap context = new HashMap(); > {code} > Obviously, using something like : > {code} > HashMap context = new HashMap(); > {code} > will cause a compilation error a few lines down : > {code} > String ser = serialize( session ); > // Store the serialized principal inside the context hashmap > // which allows overriden toString to return it later, from within an application thread. > // This facilitates assertion of rbac session from the tomcat realm into the web application session. > context.put( TcPrincipal.SERIALIZED, ser ); <<---------- Error ! > {code} > This serialized form of the session is only used by the {{TcTerminal.toString()}} method : > {code} > public final String toString() > { > String ser = null; > HashMap context = getContext(); > if ( context != null ) > { > ser = (String)context.get( SERIALIZED ); > } > return ser; > } > {code} > At this point, I think we should simply use a {{HashMap}} data structure, and cast the content accordingly to the {{String}} we use as a key (ie, to {{Session}} when the key is {{"session"}} and to {{String}} when it's {{"SERIALIZED"}} -- This message was sent by Atlassian JIRA (v6.3.4#6332)