directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szoer...@apache.org
Subject svn commit: r777418 - in /directory/sandbox/szoerner/apacheds-tomcatrealm: pom.xml src/main/java/org/apache/directory/tomcatrealm/EmbeddedApacheDsRealm.java
Date Fri, 22 May 2009 07:41:48 GMT
Author: szoerner
Date: Fri May 22 07:41:48 2009
New Revision: 777418

URL: http://svn.apache.org/viewvc?rev=777418&view=rev
Log:
Use of cursor improved

Modified:
    directory/sandbox/szoerner/apacheds-tomcatrealm/pom.xml
    directory/sandbox/szoerner/apacheds-tomcatrealm/src/main/java/org/apache/directory/tomcatrealm/EmbeddedApacheDsRealm.java

Modified: directory/sandbox/szoerner/apacheds-tomcatrealm/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/szoerner/apacheds-tomcatrealm/pom.xml?rev=777418&r1=777417&r2=777418&view=diff
==============================================================================
--- directory/sandbox/szoerner/apacheds-tomcatrealm/pom.xml (original)
+++ directory/sandbox/szoerner/apacheds-tomcatrealm/pom.xml Fri May 22 07:41:48 2009
@@ -43,11 +43,14 @@
   </build>
   
   <dependencies>
+
      <dependency>
       <groupId>tomcat</groupId>
       <artifactId>catalina</artifactId>
       <version>5.5.23</version>
     </dependency>
+
+
     <dependency>
       <groupId>org.apache.directory.server</groupId>
       <artifactId>apacheds-bootstrap-extract</artifactId>

Modified: directory/sandbox/szoerner/apacheds-tomcatrealm/src/main/java/org/apache/directory/tomcatrealm/EmbeddedApacheDsRealm.java
URL: http://svn.apache.org/viewvc/directory/sandbox/szoerner/apacheds-tomcatrealm/src/main/java/org/apache/directory/tomcatrealm/EmbeddedApacheDsRealm.java?rev=777418&r1=777417&r2=777418&view=diff
==============================================================================
--- directory/sandbox/szoerner/apacheds-tomcatrealm/src/main/java/org/apache/directory/tomcatrealm/EmbeddedApacheDsRealm.java
(original)
+++ directory/sandbox/szoerner/apacheds-tomcatrealm/src/main/java/org/apache/directory/tomcatrealm/EmbeddedApacheDsRealm.java
Fri May 22 07:41:48 2009
@@ -210,14 +210,14 @@
 
 			EntryFilteringCursor cursor = adminSession.search(basedn,
 					SearchScope.SUBTREE, filter,
-					AliasDerefMode.NEVER_DEREF_ALIASES, null, 0, 0);
-
-			@SuppressWarnings("unchecked")
-			CursorIterator iter = new CursorIterator(cursor);
-			if (iter.hasNext()) {
-				ServerEntry entry = (ServerEntry) iter.next();
+					AliasDerefMode.NEVER_DEREF_ALIASES, null, 0, 0);			
+			cursor.beforeFirst();
+			if (cursor.next()) {
+				ServerEntry entry = cursor.get();
 				dn = entry.getDn();
 			}
+			cursor.close();
+
 			adminSession.unbind();
 
 		} catch (Exception e) {



Mime
View raw message