You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2008/02/14 12:15:00 UTC
svn commit: r627706 -
/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
Author: elecharny
Date: Thu Feb 14 03:14:51 2008
New Revision: 627706
URL: http://svn.apache.org/viewvc?rev=627706&view=rev
Log:
Fixed a potential ClassCastException
Modified:
directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java?rev=627706&r1=627705&r2=627706&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java Thu Feb 14 03:14:51 2008
@@ -926,9 +926,10 @@
// If nothing is asked for then we just return the entry asis.
// We let other mechanisms filter out operational attributes.
// -----------------------------------------------------------
- if ( ids == null || ids.length == 0 )
+ if ( ( ids == null ) || ( ids.length == 0 ) )
{
- SearchResult result = new ServerSearchResult( "", null, ( Attributes ) getRootDSE( null ).clone(), false );
+ ServerEntry rootDSE = (ServerEntry)getRootDSE( null ).clone();
+ SearchResult result = new ServerSearchResult( "", null, ServerEntryUtils.toAttributesImpl( rootDSE ), false );
return new SingletonEnumeration<SearchResult>( result );
}
@@ -981,7 +982,8 @@
// return everything
if ( containsAsterisk && containsPlus )
{
- SearchResult result = new ServerSearchResult( "", null, ( Attributes ) getRootDSE( null ).clone(), false );
+ ServerEntry rootDSE = (ServerEntry)getRootDSE( null ).clone();
+ SearchResult result = new ServerSearchResult( "", null, ServerEntryUtils.toAttributesImpl( rootDSE ), false );
return new SingletonEnumeration<SearchResult>( result );
}