directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r627706 - /directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
Date Thu, 14 Feb 2008 11:15:00 GMT
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 );
                 }
                 



Mime
View raw message