directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ersi...@apache.org
Subject svn commit: r349403 - in /directory/sandbox/ersiner/apacheds-with-storedprocs: core-unit/src/test/java/org/apache/ldap/server/storedprocs/ core/src/main/java/org/apache/ldap/server/storedprocs/
Date Mon, 28 Nov 2005 09:21:47 GMT
Author: ersiner
Date: Mon Nov 28 01:20:42 2005
New Revision: 349403

URL: http://svn.apache.org/viewcvs?rev=349403&view=rev
Log:
Minor cleanup.


Modified:
    directory/sandbox/ersiner/apacheds-with-storedprocs/core-unit/src/test/java/org/apache/ldap/server/storedprocs/JavaStoredProcTest.java
    directory/sandbox/ersiner/apacheds-with-storedprocs/core-unit/src/test/java/org/apache/ldap/server/storedprocs/LdapClassLoaderTest.java
    directory/sandbox/ersiner/apacheds-with-storedprocs/core/src/main/java/org/apache/ldap/server/storedprocs/LdapClassLoader.java

Modified: directory/sandbox/ersiner/apacheds-with-storedprocs/core-unit/src/test/java/org/apache/ldap/server/storedprocs/JavaStoredProcTest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/ersiner/apacheds-with-storedprocs/core-unit/src/test/java/org/apache/ldap/server/storedprocs/JavaStoredProcTest.java?rev=349403&r1=349402&r2=349403&view=diff
==============================================================================
--- directory/sandbox/ersiner/apacheds-with-storedprocs/core-unit/src/test/java/org/apache/ldap/server/storedprocs/JavaStoredProcTest.java
(original)
+++ directory/sandbox/ersiner/apacheds-with-storedprocs/core-unit/src/test/java/org/apache/ldap/server/storedprocs/JavaStoredProcTest.java
Mon Nov 28 01:20:42 2005
@@ -37,17 +37,17 @@
  */
 public class JavaStoredProcTest extends AbstractAdminTestCase
 {
-	private static final String HELLOWORLD_CLASS_BASE64 = 
-		"yv66vgAAADEAHQoABgAPCQAQABEIABIKABMAFAcAFQcAFgEABjxpbml0PgEAAygpV" +
-		"gEABENvZGUBAA9MaW5lTnVtYmVyVGFibGUBAARtYWluAQAWKFtMamF2YS9sYW5nL1N0cmluZzsp" +
+    private static final String HELLOWORLD_CLASS_BASE64 = 
+        "yv66vgAAADEAHQoABgAPCQAQABEIABIKABMAFAcAFQcAFgEABjxpbml0PgEAAygpV" +
+        "gEABENvZGUBAA9MaW5lTnVtYmVyVGFibGUBAARtYWluAQAWKFtMamF2YS9sYW5nL1N0cmluZzsp" +
         "VgEAClNvdXJjZUZpbGUBAA9IZWxsb1dvcmxkLmphdmEMAAcACAcAFwwAGAAZAQAMSGVsbG8gV29" +
         "ybGQhBwAaDAAbABwBAApIZWxsb1dvcmxkAQAQamF2YS9sYW5nL09iamVjdAEAEGphdmEvbGFuZy" +
         "9TeXN0ZW0BAANvdXQBABVMamF2YS9pby9QcmludFN0cmVhbTsBABNqYXZhL2lvL1ByaW50U3RyZ" +
         "WFtAQAHcHJpbnRsbgEAFShMamF2YS9sYW5nL1N0cmluZzspVgAhAAUABgAAAAAAAgABAAcACAAB" +
         "AAkAAAAdAAEAAQAAAAUqtwABsQAAAAEACgAAAAYAAQAAAAEACQALAAwAAQAJAAAAJQACAAEAAAA" +
         "JsgACEgO2AASxAAAAAQAKAAAACgACAAAABQAIAAYAAQANAAAAAgAO";
-	private static final byte[] HELLOWORLD_CLASS_BYTES = Base64.decode( HELLOWORLD_CLASS_BASE64.toCharArray()
);
-	
+    private static final byte[] HELLOWORLD_CLASS_BYTES = Base64.decode( HELLOWORLD_CLASS_BASE64.toCharArray()
);
+    
     protected void setUp() throws Exception
     {
         // bind to RootDSE

Modified: directory/sandbox/ersiner/apacheds-with-storedprocs/core-unit/src/test/java/org/apache/ldap/server/storedprocs/LdapClassLoaderTest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/ersiner/apacheds-with-storedprocs/core-unit/src/test/java/org/apache/ldap/server/storedprocs/LdapClassLoaderTest.java?rev=349403&r1=349402&r2=349403&view=diff
==============================================================================
--- directory/sandbox/ersiner/apacheds-with-storedprocs/core-unit/src/test/java/org/apache/ldap/server/storedprocs/LdapClassLoaderTest.java
(original)
+++ directory/sandbox/ersiner/apacheds-with-storedprocs/core-unit/src/test/java/org/apache/ldap/server/storedprocs/LdapClassLoaderTest.java
Mon Nov 28 01:20:42 2005
@@ -36,16 +36,16 @@
  */
 public class LdapClassLoaderTest extends AbstractAdminTestCase
 {
-	private static final String HELLOWORLD_CLASS_BASE64 = 
-		"yv66vgAAADEAHQoABgAPCQAQABEIABIKABMAFAcAFQcAFgEABjxpbml0PgEAAygpV" +
-		"gEABENvZGUBAA9MaW5lTnVtYmVyVGFibGUBAARtYWluAQAWKFtMamF2YS9sYW5nL1N0cmluZzsp" +
+    private static final String HELLOWORLD_CLASS_BASE64 = 
+        "yv66vgAAADEAHQoABgAPCQAQABEIABIKABMAFAcAFQcAFgEABjxpbml0PgEAAygpV" +
+        "gEABENvZGUBAA9MaW5lTnVtYmVyVGFibGUBAARtYWluAQAWKFtMamF2YS9sYW5nL1N0cmluZzsp" +
         "VgEAClNvdXJjZUZpbGUBAA9IZWxsb1dvcmxkLmphdmEMAAcACAcAFwwAGAAZAQAMSGVsbG8gV29" +
         "ybGQhBwAaDAAbABwBAApIZWxsb1dvcmxkAQAQamF2YS9sYW5nL09iamVjdAEAEGphdmEvbGFuZy" +
         "9TeXN0ZW0BAANvdXQBABVMamF2YS9pby9QcmludFN0cmVhbTsBABNqYXZhL2lvL1ByaW50U3RyZ" +
         "WFtAQAHcHJpbnRsbgEAFShMamF2YS9sYW5nL1N0cmluZzspVgAhAAUABgAAAAAAAgABAAcACAAB" +
         "AAkAAAAdAAEAAQAAAAUqtwABsQAAAAEACgAAAAYAAQAAAAEACQALAAwAAQAJAAAAJQACAAEAAAA" +
         "JsgACEgO2AASxAAAAAQAKAAAACgACAAAABQAIAAYAAQANAAAAAgAO";
-	private static final byte[] HELLOWORLD_CLASS_BYTES = Base64.decode( HELLOWORLD_CLASS_BASE64.toCharArray()
);
+    private static final byte[] HELLOWORLD_CLASS_BYTES = Base64.decode( HELLOWORLD_CLASS_BASE64.toCharArray()
);
     
     protected void setUp() throws Exception
     {

Modified: directory/sandbox/ersiner/apacheds-with-storedprocs/core/src/main/java/org/apache/ldap/server/storedprocs/LdapClassLoader.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/ersiner/apacheds-with-storedprocs/core/src/main/java/org/apache/ldap/server/storedprocs/LdapClassLoader.java?rev=349403&r1=349402&r2=349403&view=diff
==============================================================================
--- directory/sandbox/ersiner/apacheds-with-storedprocs/core/src/main/java/org/apache/ldap/server/storedprocs/LdapClassLoader.java
(original)
+++ directory/sandbox/ersiner/apacheds-with-storedprocs/core/src/main/java/org/apache/ldap/server/storedprocs/LdapClassLoader.java
Mon Nov 28 01:20:42 2005
@@ -42,7 +42,7 @@
  */
 public class LdapClassLoader extends ClassLoader
 {
-	private static final Logger log = LoggerFactory.getLogger( LdapClassLoader.class );
+    private static final Logger log = LoggerFactory.getLogger( LdapClassLoader.class );
     private ServerLdapContext ctx;
 
     
@@ -56,16 +56,16 @@
     {
         byte[] classBytes = null;
 
-    	BranchNode filter = new BranchNode( BranchNode.AND );
-    	filter.addNode( new SimpleNode( "fqcn", name, LeafNode.EQUALITY ) );
-    	filter.addNode( new SimpleNode( "objectClass", "javaClass", LeafNode.EQUALITY ) );
-    	SearchControls controls = new SearchControls();
-    	controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
+        BranchNode filter = new BranchNode( BranchNode.AND );
+        filter.addNode( new SimpleNode( "fqcn", name, LeafNode.EQUALITY ) );
+        filter.addNode( new SimpleNode( "objectClass", "javaClass", LeafNode.EQUALITY ) );
+        SearchControls controls = new SearchControls();
+        controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
 
-    	NamingEnumeration list = null;
+        NamingEnumeration list = null;
         
-    	try 
-    	{   
+        try 
+        {   
             ServerLdapContext RootDSE = ( ( ServerLdapContext ) ctx.lookup( "" ) );
             
             // get Naming Contexts over the RootDSE
@@ -80,6 +80,8 @@
             {
                 currentNamingContext = ( String ) namingContexts.next();
                 
+                System.out.println( currentNamingContext );
+                
                 // search the class under the naming context considered 
                 list = ( ( ServerLdapContext ) RootDSE.lookup( currentNamingContext ) ).search(
new LdapName(), filter, controls );
                 if ( list.hasMore() )
@@ -98,17 +100,17 @@
                 log.warn( msg );
                 throw new ClassNotFoundException( msg );
             }
-		} 
-    	catch ( NamingException e ) 
-    	{
-    		String msg = "Encountered JNDI failure while searching directory for class: " + name;
-			log.error( msg, e );
-			throw new ClassNotFoundException( msg );
-		}
-    	finally
-    	{
-    		if ( list != null ) { try { list.close(); } catch( Exception e ) {} };
-    	}
+        } 
+        catch ( NamingException e ) 
+        {
+            String msg = "Encountered JNDI failure while searching directory for class: "
+ name;
+            log.error( msg, e );
+            throw new ClassNotFoundException( msg );
+        }
+        finally
+        {
+            if ( list != null ) { try { list.close(); } catch( Exception e ) {} };
+        }
 
         return defineClass( name, classBytes, 0, classBytes.length );
     }



Mime
View raw message