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 E78F510B71 for ; Sat, 29 Nov 2014 10:58:12 +0000 (UTC) Received: (qmail 70587 invoked by uid 500); 29 Nov 2014 10:58:12 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 70489 invoked by uid 500); 29 Nov 2014 10:58: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 70324 invoked by uid 99); 29 Nov 2014 10:58:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 29 Nov 2014 10:58:12 +0000 Date: Sat, 29 Nov 2014 10:58:12 +0000 (UTC) From: "Kiran Ayyagari (JIRA)" To: dev@directory.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DIRSERVER-2030) Remove the casting in generateResponse() method of SearchRequestHandler 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/DIRSERVER-2030?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Kiran Ayyagari updated DIRSERVER-2030: -------------------------------------- Description: Currently to check if an entry is a referral the below cast is done. {code}Attribute ref = ( ( ClonedServerEntry ) entry ).getOriginalEntry().get( SchemaConstants.REF_AT );{code} But this casting fails when SortControl is used cause SortedEntryCursor returns DefaultEntry objects (they contain the attributes of a `filtered` ClonedEntry). OTOH, this casting is not needed to check the referral nature of an entry. was: Currently to check if an entry is a referral the below cast is done. {code}Attribute ref = ( ( ClonedServerEntry ) entry ).getOriginalEntry().get( SchemaConstants.REF_AT );{code} But this casting fails when SortControl is used cause SortedEntryCursor returns DefaultEntry objects (they contain the attributes of a -filtered- ClonedEntry). OTOH, this casting is not needed to check the referral nature of an entry. > Remove the casting in generateResponse() method of SearchRequestHandler > ----------------------------------------------------------------------- > > Key: DIRSERVER-2030 > URL: https://issues.apache.org/jira/browse/DIRSERVER-2030 > Project: Directory ApacheDS > Issue Type: Improvement > Affects Versions: 2.0.0-M19 > Reporter: Kiran Ayyagari > Assignee: Kiran Ayyagari > Priority: Blocker > Fix For: 2.0.0-M20 > > > Currently to check if an entry is a referral the below cast is done. > {code}Attribute ref = ( ( ClonedServerEntry ) entry ).getOriginalEntry().get( SchemaConstants.REF_AT );{code} > But this casting fails when SortControl is used cause SortedEntryCursor returns DefaultEntry objects (they contain the attributes of a `filtered` ClonedEntry). > OTOH, this casting is not needed to check the referral nature of an entry. -- This message was sent by Atlassian JIRA (v6.3.4#6332)