directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r379013 [38/45] - in /directory/trunks/apacheds: ./ core-plugin/ core-plugin/src/main/java/org/apache/directory/server/core/tools/schema/ core-plugin/src/test/java/org/apache/directory/server/core/tools/schema/ core-shared/ core-shared/src/...
Date Mon, 20 Feb 2006 03:58:21 GMT
Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/AbandonHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/AbandonHandler.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -1 +1,4 @@
 Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/AddHandler.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/AddHandler.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/AddHandler.java (original)
+++ directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/AddHandler.java Sun Feb 19 19:57:02 2006
@@ -49,12 +49,12 @@
     private static final Logger log = LoggerFactory.getLogger( AddHandler.class );
     private static Control[] EMPTY_CONTROLS = new Control[0];
 
-    
+
     public void messageReceived( IoSession session, Object request )
     {
         AddRequest req = ( AddRequest ) request;
         LdapResult result = req.getResultResponse().getLdapResult();
-        
+
         if ( log.isDebugEnabled() )
         {
             log.debug( "Received a Add message : " + req.toString() );
@@ -74,7 +74,7 @@
             ctx.setRequestControls( ( Control[] ) req.getControls().values().toArray( EMPTY_CONTROLS ) );
             ctx.createSubcontext( req.getEntry(), req.getAttributes() );
         }
-        catch( ReferralException e )
+        catch ( ReferralException e )
         {
             ReferralImpl refs = new ReferralImpl();
             result.setReferral( refs );
@@ -86,11 +86,11 @@
             {
                 refs.addLdapUrl( ( String ) e.getReferralInfo() );
             }
-            while( e.skipReferral() );
+            while ( e.skipReferral() );
             session.write( req.getResultResponse() );
             return;
         }
-        catch( NamingException e )
+        catch ( NamingException e )
         {
             String msg = "failed to add entry " + req.getEntry();
 
@@ -112,12 +112,10 @@
 
             result.setResultCode( code );
             result.setErrorMessage( msg );
-            
-            if ( ( e.getResolvedName() != null ) &&
-                    ( ( code == ResultCodeEnum.NOSUCHOBJECT ) ||
-                      ( code == ResultCodeEnum.ALIASPROBLEM ) ||
-                      ( code == ResultCodeEnum.INVALIDDNSYNTAX ) ||
-                      ( code == ResultCodeEnum.ALIASDEREFERENCINGPROBLEM ) ) )
+
+            if ( ( e.getResolvedName() != null )
+                && ( ( code == ResultCodeEnum.NOSUCHOBJECT ) || ( code == ResultCodeEnum.ALIASPROBLEM )
+                    || ( code == ResultCodeEnum.INVALIDDNSYNTAX ) || ( code == ResultCodeEnum.ALIASDEREFERENCINGPROBLEM ) ) )
             {
                 result.setMatchedDn( e.getResolvedName().toString() );
             }

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/AddHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/AddHandler.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -1 +1,4 @@
 Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/BindHandler.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/BindHandler.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/BindHandler.java (original)
+++ directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/BindHandler.java Sun Feb 19 19:57:02 2006
@@ -61,7 +61,7 @@
         Hashtable env = SessionRegistry.getSingleton().getEnvironment();
 
         // if the bind request is not simple then we freak: no strong auth yet
-        if ( ! req.isSimple() )
+        if ( !req.isSimple() )
         {
             result.setResultCode( ResultCodeEnum.AUTHMETHODNOTSUPPORTED );
             result.setErrorMessage( "Only simple binds currently supported" );
@@ -109,10 +109,10 @@
                 ctx = new InitialLdapContext( cloned, connCtls );
             }
         }
-        catch( NamingException e )
+        catch ( NamingException e )
         {
             ResultCodeEnum code;
-            
+
             if ( e instanceof LdapException )
             {
                 code = ( ( LdapException ) e ).getResultCode();
@@ -131,15 +131,13 @@
                 msg += "\n\nBindRequest = \n" + req.toString();
             }
 
-            if ( ( e.getResolvedName() != null ) &&
-                    ( ( code == ResultCodeEnum.NOSUCHOBJECT ) ||
-                      ( code == ResultCodeEnum.ALIASPROBLEM ) ||
-                      ( code == ResultCodeEnum.INVALIDDNSYNTAX ) ||
-                      ( code == ResultCodeEnum.ALIASDEREFERENCINGPROBLEM ) ) )
+            if ( ( e.getResolvedName() != null )
+                && ( ( code == ResultCodeEnum.NOSUCHOBJECT ) || ( code == ResultCodeEnum.ALIASPROBLEM )
+                    || ( code == ResultCodeEnum.INVALIDDNSYNTAX ) || ( code == ResultCodeEnum.ALIASDEREFERENCINGPROBLEM ) ) )
             {
                 result.setMatchedDn( e.getResolvedName().toString() );
             }
-            
+
             result.setErrorMessage( msg );
             session.write( req.getResultResponse() );
             return;

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/BindHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/BindHandler.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -1 +1,4 @@
 Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/CompareHandler.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/CompareHandler.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/CompareHandler.java (original)
+++ directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/CompareHandler.java Sun Feb 19 19:57:02 2006
@@ -51,7 +51,7 @@
     private static final Logger log = LoggerFactory.getLogger( CompareHandler.class );
     private static Control[] EMPTY_CONTROLS = new Control[0];
 
-    
+
     public void messageReceived( IoSession session, Object request )
     {
         CompareRequest req = ( CompareRequest ) request;
@@ -81,7 +81,7 @@
                 result.setResultCode( ResultCodeEnum.COMPAREFALSE );
             }
         }
-        catch( ReferralException e )
+        catch ( ReferralException e )
         {
             ReferralImpl refs = new ReferralImpl();
             result.setReferral( refs );
@@ -93,7 +93,7 @@
             {
                 refs.addLdapUrl( ( String ) e.getReferralInfo() );
             }
-            while( e.skipReferral() );
+            while ( e.skipReferral() );
             session.write( req.getResultResponse() );
             return;
         }
@@ -107,10 +107,10 @@
             }
 
             ResultCodeEnum code;
-            
+
             if ( e instanceof LdapException )
             {
-                code = ( ( LdapException ) e ).getResultCode() ;
+                code = ( ( LdapException ) e ).getResultCode();
             }
             else
             {
@@ -122,13 +122,11 @@
 
             if ( e instanceof NamingException )
             {
-            	NamingException ne = (NamingException)e;
-            	
-                if ( ( ne.getResolvedName() != null ) &&
-                        ( ( code == ResultCodeEnum.NOSUCHOBJECT ) ||
-                          ( code == ResultCodeEnum.ALIASPROBLEM ) ||
-                          ( code == ResultCodeEnum.INVALIDDNSYNTAX ) ||
-                          ( code == ResultCodeEnum.ALIASDEREFERENCINGPROBLEM ) ) )
+                NamingException ne = ( NamingException ) e;
+
+                if ( ( ne.getResolvedName() != null )
+                    && ( ( code == ResultCodeEnum.NOSUCHOBJECT ) || ( code == ResultCodeEnum.ALIASPROBLEM )
+                        || ( code == ResultCodeEnum.INVALIDDNSYNTAX ) || ( code == ResultCodeEnum.ALIASDEREFERENCINGPROBLEM ) ) )
                 {
                     result.setMatchedDn( ne.getResolvedName().toString() );
                 }

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/CompareHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/CompareHandler.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -1 +1,4 @@
 Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/DeleteHandler.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/DeleteHandler.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/DeleteHandler.java (original)
+++ directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/DeleteHandler.java Sun Feb 19 19:57:02 2006
@@ -49,11 +49,11 @@
     private static final Logger log = LoggerFactory.getLogger( DeleteHandler.class );
     private static Control[] EMPTY_CONTROLS = new Control[0];
 
-    
+
     public void messageReceived( IoSession session, Object request )
     {
         DeleteRequest req = ( DeleteRequest ) request;
-        LdapResult result = req.getResultResponse().getLdapResult(); 
+        LdapResult result = req.getResultResponse().getLdapResult();
 
         try
         {
@@ -69,7 +69,7 @@
             ctx.setRequestControls( ( Control[] ) req.getControls().values().toArray( EMPTY_CONTROLS ) );
             ctx.destroySubcontext( req.getName() );
         }
-        catch( ReferralException e )
+        catch ( ReferralException e )
         {
             ReferralImpl refs = new ReferralImpl();
             result.setReferral( refs );
@@ -81,11 +81,11 @@
             {
                 refs.addLdapUrl( ( String ) e.getReferralInfo() );
             }
-            while( e.skipReferral() );
+            while ( e.skipReferral() );
             session.write( req.getResultResponse() );
             return;
         }
-        catch( NamingException e )
+        catch ( NamingException e )
         {
             String msg = "failed to delete entry " + req.getName();
 
@@ -95,7 +95,7 @@
             }
 
             ResultCodeEnum code;
-            if( e instanceof LdapException )
+            if ( e instanceof LdapException )
             {
                 code = ( ( LdapException ) e ).getResultCode();
             }
@@ -106,11 +106,9 @@
 
             result.setResultCode( code );
             result.setErrorMessage( msg );
-            if ( ( e.getResolvedName() != null ) &&
-                    ( ( code == ResultCodeEnum.NOSUCHOBJECT ) ||
-                      ( code == ResultCodeEnum.ALIASPROBLEM ) ||
-                      ( code == ResultCodeEnum.INVALIDDNSYNTAX ) ||
-                      ( code == ResultCodeEnum.ALIASDEREFERENCINGPROBLEM ) ) )
+            if ( ( e.getResolvedName() != null )
+                && ( ( code == ResultCodeEnum.NOSUCHOBJECT ) || ( code == ResultCodeEnum.ALIASPROBLEM )
+                    || ( code == ResultCodeEnum.INVALIDDNSYNTAX ) || ( code == ResultCodeEnum.ALIASDEREFERENCINGPROBLEM ) ) )
             {
                 result.setMatchedDn( e.getResolvedName().toString() );
             }

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/DeleteHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/DeleteHandler.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -1 +1,4 @@
 Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ExtendedHandler.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ExtendedHandler.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ExtendedHandler.java (original)
+++ directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ExtendedHandler.java Sun Feb 19 19:57:02 2006
@@ -15,7 +15,7 @@
  *
  */
 package org.apache.directory.server.ldap.support;
- 
+
 
 import java.util.Collections;
 import java.util.HashMap;
@@ -42,48 +42,48 @@
 {
     private Map handlers = new HashMap();
 
-    
+
     public ExtendedOperationHandler addHandler( ExtendedOperationHandler eoh )
     {
-        synchronized( handlers )
+        synchronized ( handlers )
         {
             return ( ExtendedOperationHandler ) handlers.put( eoh.getOid(), eoh );
         }
     }
-    
-    
+
+
     public ExtendedOperationHandler removeHandler( String oid )
     {
-        synchronized( handlers )
+        synchronized ( handlers )
         {
             return ( ExtendedOperationHandler ) handlers.remove( oid );
         }
     }
-    
-    
+
+
     public ExtendedOperationHandler getHandler( String oid )
     {
         return ( ExtendedOperationHandler ) handlers.get( oid );
     }
-    
-    
+
+
     public Map getHandlerMap()
     {
         return Collections.unmodifiableMap( handlers );
     }
-    
-    
+
+
     public void messageReceived( IoSession session, Object request )
     {
         ExtendedRequest req = ( ExtendedRequest ) request;
         ExtendedOperationHandler handler = ( ExtendedOperationHandler ) handlers.get( req.getOid() );
 
-        if( handler == null )
+        if ( handler == null )
         {
             // As long as no extended operations are implemented, send appropriate
             // error back to the client.
             String msg = "Unrecognized extended operation EXTENSION_OID: " + req.getOid();
-            LdapResult result = req.getResultResponse().getLdapResult();        
+            LdapResult result = req.getResultResponse().getLdapResult();
             result.setResultCode( ResultCodeEnum.PROTOCOLERROR );
             result.setErrorMessage( msg );
             session.write( req.getResultResponse() );
@@ -94,15 +94,13 @@
             {
                 handler.handleExtendedOperation( session, SessionRegistry.getSingleton(), req );
             }
-            catch( Exception e )
+            catch ( Exception e )
             {
                 LdapResult result = req.getResultResponse().getLdapResult();
                 result.setResultCode( ResultCodeEnum.UNAVAILABLE );
-                result.setErrorMessage(
-                        "Extended operation handler for the specified EXTENSION_OID (" +
-                        req.getOid() + ") has failed to process your request:\n" +
-                        ExceptionUtils.getStackTrace( e ) );
-                ( ( ExtendedResponse ) req.getResultResponse() ).setResponse( new byte[ 0 ] );
+                result.setErrorMessage( "Extended operation handler for the specified EXTENSION_OID (" + req.getOid()
+                    + ") has failed to process your request:\n" + ExceptionUtils.getStackTrace( e ) );
+                ( ( ExtendedResponse ) req.getResultResponse() ).setResponse( new byte[0] );
                 session.write( req.getResultResponse() );
             }
         }

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ExtendedHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ExtendedHandler.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -1 +1,4 @@
 Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ModifyDnHandler.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ModifyDnHandler.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ModifyDnHandler.java (original)
+++ directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ModifyDnHandler.java Sun Feb 19 19:57:02 2006
@@ -59,10 +59,10 @@
 
         if ( LOG.isDebugEnabled() )
         {
-        	LOG.debug( "req.getName() == [" + req.getName() +"]" );
+            LOG.debug( "req.getName() == [" + req.getName() + "]" );
         }
-        
-        if (req.getName() == null || req.getName().length() == 0)
+
+        if ( req.getName() == null || req.getName().length() == 0 )
         {
             // it is not allowed to modify the name of the Root DSE
             String msg = "Modify DN is not allowed on Root DSE.";
@@ -87,22 +87,22 @@
                 String deleteRDN = String.valueOf( req.getDeleteOldRdn() );
                 ctx.addToEnvironment( "java.naming.ldap.deleteRDN", deleteRDN );
 
-                if (req.isMove())
+                if ( req.isMove() )
                 {
                     LdapName oldDn = new LdapName( req.getName() );
                     LdapName newDn = null;
-                    
+
                     String newSuperior = req.getNewSuperior();
                     if ( StringTools.isEmpty( newSuperior ) )
                     {
-                    	newDn = (LdapName)oldDn.getPrefix( 1 );
+                        newDn = ( LdapName ) oldDn.getPrefix( 1 );
                     }
                     else
                     {
-                    	newDn = new LdapName( req.getNewSuperior() );
+                        newDn = new LdapName( req.getNewSuperior() );
                     }
-                    
-                    if (req.getNewRdn() != null)
+
+                    if ( req.getNewRdn() != null )
                     {
                         newDn.add( req.getNewRdn() );
                     }
@@ -121,7 +121,7 @@
                     ctx.rename( new LdapName( req.getName() ), newDn );
                 }
             }
-            catch( ReferralException e )
+            catch ( ReferralException e )
             {
                 ReferralImpl refs = new ReferralImpl();
                 result.setReferral( refs );
@@ -133,22 +133,22 @@
                 {
                     refs.addLdapUrl( ( String ) e.getReferralInfo() );
                 }
-                while( e.skipReferral() );
+                while ( e.skipReferral() );
                 session.write( req.getResultResponse() );
                 return;
             }
             catch ( NamingException e )
             {
                 String msg = "failed to modify DN of entry " + req.getName();
-                if (LOG.isDebugEnabled())
+                if ( LOG.isDebugEnabled() )
                 {
                     msg += ":\n" + ExceptionUtils.getStackTrace( e );
                 }
 
                 ResultCodeEnum code;
-                if (e instanceof LdapException)
+                if ( e instanceof LdapException )
                 {
-                    code = ((LdapException) e).getResultCode();
+                    code = ( ( LdapException ) e ).getResultCode();
                 }
                 else
                 {
@@ -158,8 +158,8 @@
                 result.setResultCode( code );
                 result.setErrorMessage( msg );
                 if ( ( e.getResolvedName() != null )
-                        && ((code == ResultCodeEnum.NOSUCHOBJECT) || (code == ResultCodeEnum.ALIASPROBLEM)
-                                || (code == ResultCodeEnum.INVALIDDNSYNTAX) || (code == ResultCodeEnum.ALIASDEREFERENCINGPROBLEM)))
+                    && ( ( code == ResultCodeEnum.NOSUCHOBJECT ) || ( code == ResultCodeEnum.ALIASPROBLEM )
+                        || ( code == ResultCodeEnum.INVALIDDNSYNTAX ) || ( code == ResultCodeEnum.ALIASDEREFERENCINGPROBLEM ) ) )
                 {
                     result.setMatchedDn( e.getResolvedName().toString() );
                 }

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ModifyDnHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ModifyDnHandler.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -1 +1,4 @@
 Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ModifyHandler.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ModifyHandler.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ModifyHandler.java (original)
+++ directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ModifyHandler.java Sun Feb 19 19:57:02 2006
@@ -72,7 +72,7 @@
             Object[] mods = req.getModificationItems().toArray( EMPTY );
             ctx.modifyAttributes( req.getName(), ( ModificationItem[] ) mods );
         }
-        catch( ReferralException e )
+        catch ( ReferralException e )
         {
             ReferralImpl refs = new ReferralImpl();
             result.setReferral( refs );
@@ -84,7 +84,7 @@
             {
                 refs.addLdapUrl( ( String ) e.getReferralInfo() );
             }
-            while( e.skipReferral() );
+            while ( e.skipReferral() );
             session.write( req.getResultResponse() );
             return;
         }
@@ -99,7 +99,7 @@
             ResultCodeEnum code;
             if ( e instanceof LdapException )
             {
-                code = ( ( LdapException ) e ).getResultCode() ;
+                code = ( ( LdapException ) e ).getResultCode();
             }
             else
             {
@@ -108,11 +108,9 @@
 
             result.setResultCode( code );
             result.setErrorMessage( msg );
-            if ( ( e.getResolvedName() != null ) &&
-                    ( ( code == ResultCodeEnum.NOSUCHOBJECT ) ||
-                      ( code == ResultCodeEnum.ALIASPROBLEM ) ||
-                      ( code == ResultCodeEnum.INVALIDDNSYNTAX ) ||
-                      ( code == ResultCodeEnum.ALIASDEREFERENCINGPROBLEM ) ) )
+            if ( ( e.getResolvedName() != null )
+                && ( ( code == ResultCodeEnum.NOSUCHOBJECT ) || ( code == ResultCodeEnum.ALIASPROBLEM )
+                    || ( code == ResultCodeEnum.INVALIDDNSYNTAX ) || ( code == ResultCodeEnum.ALIASDEREFERENCINGPROBLEM ) ) )
             {
                 result.setMatchedDn( e.getResolvedName().toString() );
             }

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ModifyHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/ModifyHandler.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -1 +1,4 @@
 Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/PersistentSearchListener.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/PersistentSearchListener.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/PersistentSearchListener.java (original)
+++ directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/PersistentSearchListener.java Sun Feb 19 19:57:02 2006
@@ -64,9 +64,9 @@
     final IoSession session;
     final SearchRequest req;
     final PersistentSearchControl control;
-    
-    
-    PersistentSearchListener( ServerLdapContext ctx, IoSession session, SearchRequest req ) 
+
+
+    PersistentSearchListener(ServerLdapContext ctx, IoSession session, SearchRequest req)
     {
         this.session = session;
         this.req = req;
@@ -74,8 +74,8 @@
         this.ctx = ctx;
         this.control = ( PersistentSearchControl ) req.getControls().get( PersistentSearchControl.CONTROL_OID );
     }
-    
-    
+
+
     public void abandon() throws NamingException
     {
         // must abandon the operation 
@@ -94,9 +94,9 @@
          * SO DON'T SEND BACK ANYTHING!!!!!
          */
     }
-    
-    
-    public void namingExceptionThrown( NamingExceptionEvent evt ) 
+
+
+    public void namingExceptionThrown( NamingExceptionEvent evt )
     {
         // must abandon the operation and send response done with an
         // error message if this occurs because something is wrong
@@ -109,7 +109,7 @@
         {
             log.error( "Attempt to remove listener from context failed", e );
         }
-        
+
         /*
          * From RFC 2251 Section 4.11:
          * 
@@ -136,7 +136,7 @@
         }
 
         ResultCodeEnum code = null;
-        if( evt.getException() instanceof LdapException )
+        if ( evt.getException() instanceof LdapException )
         {
             code = ( ( LdapException ) evt.getException() ).getResultCode();
         }
@@ -148,43 +148,45 @@
         LdapResult result = req.getResultResponse().getLdapResult();
         result.setResultCode( code );
         result.setErrorMessage( msg );
-        if ( ( evt.getException().getResolvedName() != null ) &&
-                ( ( code == ResultCodeEnum.NOSUCHOBJECT ) ||
-                  ( code == ResultCodeEnum.ALIASPROBLEM ) ||
-                  ( code == ResultCodeEnum.INVALIDDNSYNTAX ) ||
-                  ( code == ResultCodeEnum.ALIASDEREFERENCINGPROBLEM ) ) )
+        if ( ( evt.getException().getResolvedName() != null )
+            && ( ( code == ResultCodeEnum.NOSUCHOBJECT ) || ( code == ResultCodeEnum.ALIASPROBLEM )
+                || ( code == ResultCodeEnum.INVALIDDNSYNTAX ) || ( code == ResultCodeEnum.ALIASDEREFERENCINGPROBLEM ) ) )
         {
             result.setMatchedDn( evt.getException().getResolvedName().toString() );
         }
         session.write( req.getResultResponse() );
     }
 
-    
+
     public void objectChanged( NamingEvent evt )
     {
         // send the entry back
         sendEntry( evt );
     }
 
+
     public void objectAdded( NamingEvent evt )
     {
         // send the entry back
         sendEntry( evt );
     }
 
+
     public void objectRemoved( NamingEvent evt )
     {
         // send the entry back
         sendEntry( evt );
     }
 
+
     public void objectRenamed( NamingEvent evt )
     {
         // send the entry back
         sendEntry( evt );
     }
 
-    private void sendEntry( NamingEvent evt ) 
+
+    private void sendEntry( NamingEvent evt )
     {
         /*
          * @todo eventually you'll want to add the changeNumber once we move 
@@ -198,11 +200,12 @@
             ecControl = new EntryChangeControl();
             respEntry.add( ecControl );
         }
-        
+
         switch ( evt.getType() )
         {
-            case( NamingEvent.OBJECT_ADDED ):
-                if ( ! control.isNotificationEnabled( ChangeType.ADD ) ) return;
+            case ( NamingEvent.OBJECT_ADDED  ):
+                if ( !control.isNotificationEnabled( ChangeType.ADD ) )
+                    return;
                 respEntry.setObjectName( evt.getNewBinding().getName() );
                 respEntry.setAttributes( ( Attributes ) evt.getChangeInfo() );
                 if ( ecControl != null )
@@ -210,8 +213,9 @@
                     ecControl.setChangeType( ChangeType.ADD );
                 }
                 break;
-            case( NamingEvent.OBJECT_CHANGED ):
-                if ( ! control.isNotificationEnabled( ChangeType.MODIFY ) ) return;
+            case ( NamingEvent.OBJECT_CHANGED  ):
+                if ( !control.isNotificationEnabled( ChangeType.MODIFY ) )
+                    return;
                 respEntry.setObjectName( evt.getOldBinding().getName() );
                 respEntry.setAttributes( ( Attributes ) evt.getOldBinding().getObject() );
                 if ( ecControl != null )
@@ -219,8 +223,9 @@
                     ecControl.setChangeType( ChangeType.MODIFY );
                 }
                 break;
-            case( NamingEvent.OBJECT_REMOVED ):
-                if ( ! control.isNotificationEnabled( ChangeType.DELETE ) ) return;
+            case ( NamingEvent.OBJECT_REMOVED  ):
+                if ( !control.isNotificationEnabled( ChangeType.DELETE ) )
+                    return;
                 respEntry.setObjectName( evt.getOldBinding().getName() );
                 respEntry.setAttributes( ( Attributes ) evt.getOldBinding().getObject() );
                 if ( ecControl != null )
@@ -228,8 +233,9 @@
                     ecControl.setChangeType( ChangeType.DELETE );
                 }
                 break;
-            case( NamingEvent.OBJECT_RENAMED ):
-                if ( ! control.isNotificationEnabled( ChangeType.MODDN ) ) return;
+            case ( NamingEvent.OBJECT_RENAMED  ):
+                if ( !control.isNotificationEnabled( ChangeType.MODDN ) )
+                    return;
                 respEntry.setObjectName( evt.getNewBinding().getName() );
                 respEntry.setAttributes( ( Attributes ) evt.getNewBinding().getObject() );
                 if ( ecControl != null )
@@ -241,7 +247,7 @@
             default:
                 return;
         }
-        
+
         session.write( respEntry );
     }
 

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/PersistentSearchListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/PersistentSearchListener.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/SearchHandler.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/SearchHandler.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/SearchHandler.java (original)
+++ directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/SearchHandler.java Sun Feb 19 19:57:02 2006
@@ -66,7 +66,7 @@
     private static final Logger log = LoggerFactory.getLogger( SearchHandler.class );
     private static final String DEREFALIASES_KEY = "java.naming.ldap.derefAliases";
 
-    
+
     /**
      * Builds the JNDI search controls for a SearchRequest.
      *  
@@ -87,7 +87,7 @@
         return controls;
     }
 
-    
+
     /**
      * Determines if a search request is on the RootDSE of the server.
      * 
@@ -105,7 +105,7 @@
         }
         return isBaseIsRoot && isBaseScope && isRootDSEFilter;
     }
-    
+
 
     /**
      * Main message handing method for search requests.
@@ -118,17 +118,17 @@
         String[] ids = null;
         Collection retAttrs = new HashSet();
         retAttrs.addAll( req.getAttributes() );
-        
+
         // add the search request to the registry of outstanding requests for this session
         SessionRegistry.getSingleton().addOutstandingRequest( session, req );
 
         // check the attributes to see if a referral's ref attribute is included
-        if( retAttrs.size() > 0 && !retAttrs.contains( "ref" ) )
+        if ( retAttrs.size() > 0 && !retAttrs.contains( "ref" ) )
         {
             retAttrs.add( "ref" );
             ids = ( String[] ) retAttrs.toArray( ArrayUtils.EMPTY_STRING_ARRAY );
         }
-        else if( retAttrs.size() > 0 )
+        else if ( retAttrs.size() > 0 )
         {
             ids = ( String[] ) retAttrs.toArray( ArrayUtils.EMPTY_STRING_ARRAY );
         }
@@ -145,7 +145,7 @@
             if ( isRootDSESearch )
             {
                 LdapContext unknown = SessionRegistry.getSingleton().getLdapContextOnRootDSEAccess( session, null );
-                if ( ! ( unknown instanceof ServerLdapContext ) )
+                if ( !( unknown instanceof ServerLdapContext ) )
                 {
                     ctx = ( ServerLdapContext ) unknown.lookup( "" );
                 }
@@ -158,7 +158,7 @@
             else
             {
                 LdapContext unknown = SessionRegistry.getSingleton().getLdapContext( session, null, true );
-                if ( ! ( unknown instanceof ServerLdapContext ) )
+                if ( !( unknown instanceof ServerLdapContext ) )
                 {
                     ctx = ( ServerLdapContext ) unknown.lookup( "" );
                 }
@@ -185,7 +185,7 @@
             boolean allowAnonymousBinds = cfg.isAllowAnonymousAccess();
             boolean isAnonymousUser = ( ( ServerLdapContext ) ctx ).getPrincipal().getName().trim().equals( "" );
 
-            if ( isAnonymousUser && ! allowAnonymousBinds && ! isRootDSESearch )
+            if ( isAnonymousUser && !allowAnonymousBinds && !isRootDSESearch )
             {
                 LdapResult result = req.getResultResponse().getLdapResult();
                 result.setResultCode( ResultCodeEnum.INSUFFICIENTACCESSRIGHTS );
@@ -199,25 +199,26 @@
             // Handle psearch differently
             // ===============================================================
 
-            PersistentSearchControl psearchControl = ( PersistentSearchControl ) 
-                req.getControls().get( PersistentSearchControl.CONTROL_OID );
+            PersistentSearchControl psearchControl = ( PersistentSearchControl ) req.getControls().get(
+                PersistentSearchControl.CONTROL_OID );
             if ( psearchControl != null )
             {
                 // there are no limits for psearch processing
                 controls.setCountLimit( 0 );
                 controls.setTimeLimit( 0 );
-                
-                if ( ! psearchControl.isChangesOnly() )
+
+                if ( !psearchControl.isChangesOnly() )
                 {
-                    list = ( ( ServerLdapContext ) ctx ).search( new LdapName( req.getBase() ), req.getFilter(), controls );
+                    list = ( ( ServerLdapContext ) ctx ).search( new LdapName( req.getBase() ), req.getFilter(),
+                        controls );
                     if ( list instanceof AbandonListener )
                     {
                         req.addAbandonListener( ( AbandonListener ) list );
                     }
-                    if( list.hasMore() )
+                    if ( list.hasMore() )
                     {
                         Iterator it = new SearchResponseIterator( req, ctx, list, controls.getSearchScope() );
-                        while( it.hasNext() )
+                        while ( it.hasNext() )
                         {
                             Response resp = ( Response ) it.next();
                             if ( resp instanceof SearchResponseDone )
@@ -233,7 +234,8 @@
                                 // instead of returning the DONE response we break from the
                                 // loop and user the notification listener to send back 
                                 // notificationss to the client in never ending search
-                                else break;
+                                else
+                                    break;
                             }
                             else
                             {
@@ -242,7 +244,7 @@
                         }
                     }
                 }
-                
+
                 // now we process entries for ever as they change 
                 PersistentSearchListener handler = new PersistentSearchListener( ctx, session, req );
                 StringBuffer buf = new StringBuffer();
@@ -251,7 +253,7 @@
                 SessionRegistry.getSingleton().addOutstandingRequest( session, req );
                 return;
             }
-            
+
             // ===============================================================
             // Handle regular search requests from here down
             // ===============================================================
@@ -265,11 +267,11 @@
             {
                 req.addAbandonListener( ( AbandonListener ) list );
             }
-            
-            if( list.hasMore() )
+
+            if ( list.hasMore() )
             {
                 Iterator it = new SearchResponseIterator( req, ctx, list, controls.getSearchScope() );
-                while( it.hasNext() )
+                while ( it.hasNext() )
                 {
                     session.write( it.next() );
                 }
@@ -281,14 +283,14 @@
                 list.close();
                 req.getResultResponse().getLdapResult().setResultCode( ResultCodeEnum.SUCCESS );
                 Iterator it = Collections.singleton( req.getResultResponse() ).iterator();
-                while( it.hasNext() )
+                while ( it.hasNext() )
                 {
                     session.write( it.next() );
                 }
                 return;
             }
         }
-        catch( ReferralException e )
+        catch ( ReferralException e )
         {
             LdapResult result = req.getResultResponse().getLdapResult();
             ReferralImpl refs = new ReferralImpl();
@@ -301,12 +303,12 @@
             {
                 refs.addLdapUrl( ( String ) e.getReferralInfo() );
             }
-            while( e.skipReferral() );
+            while ( e.skipReferral() );
             session.write( req.getResultResponse() );
             SessionRegistry.getSingleton().removeOutstandingRequest( session, req.getMessageId() );
             return;
         }
-        catch( NamingException e )
+        catch ( NamingException e )
         {
             /*
              * From RFC 2251 Section 4.11:
@@ -324,7 +326,7 @@
             {
                 return;
             }
-            
+
             String msg = "failed on search operation";
             if ( log.isDebugEnabled() )
             {
@@ -332,7 +334,7 @@
             }
 
             ResultCodeEnum code = null;
-            if( e instanceof LdapException )
+            if ( e instanceof LdapException )
             {
                 code = ( ( LdapException ) e ).getResultCode();
             }
@@ -345,17 +347,15 @@
             result.setResultCode( code );
             result.setErrorMessage( msg );
 
-            if ( ( e.getResolvedName() != null ) &&
-                    ( ( code == ResultCodeEnum.NOSUCHOBJECT ) ||
-                      ( code == ResultCodeEnum.ALIASPROBLEM ) ||
-                      ( code == ResultCodeEnum.INVALIDDNSYNTAX ) ||
-                      ( code == ResultCodeEnum.ALIASDEREFERENCINGPROBLEM ) ) )
+            if ( ( e.getResolvedName() != null )
+                && ( ( code == ResultCodeEnum.NOSUCHOBJECT ) || ( code == ResultCodeEnum.ALIASPROBLEM )
+                    || ( code == ResultCodeEnum.INVALIDDNSYNTAX ) || ( code == ResultCodeEnum.ALIASDEREFERENCINGPROBLEM ) ) )
             {
                 result.setMatchedDn( e.getResolvedName().toString() );
             }
 
             Iterator it = Collections.singleton( req.getResultResponse() ).iterator();
-            while( it.hasNext() )
+            while ( it.hasNext() )
             {
                 session.write( it.next() );
             }
@@ -365,7 +365,14 @@
         {
             if ( list != null )
             {
-                try { list.close(); } catch( NamingException e ){ log.error("failed on list.close()", e ); } 
+                try
+                {
+                    list.close();
+                }
+                catch ( NamingException e )
+                {
+                    log.error( "failed on list.close()", e );
+                }
             }
         }
     }

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/SearchHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/SearchHandler.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -1 +1,4 @@
 Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/SearchResponseIterator.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/SearchResponseIterator.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/SearchResponseIterator.java (original)
+++ directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/SearchResponseIterator.java Sun Feb 19 19:57:02 2006
@@ -70,7 +70,7 @@
      * @param req the search request to generate responses to
      * @param underlying the underlying JNDI enumeration containing SearchResults
      */
-    public SearchResponseIterator( SearchRequest req, ServerLdapContext ctx, NamingEnumeration underlying, int scope )
+    public SearchResponseIterator(SearchRequest req, ServerLdapContext ctx, NamingEnumeration underlying, int scope)
     {
         this.req = req;
         this.ctx = ctx;
@@ -79,7 +79,7 @@
 
         try
         {
-            if( underlying.hasMore() )
+            if ( underlying.hasMore() )
             {
                 SearchResult result = ( SearchResult ) underlying.next();
 
@@ -88,7 +88,8 @@
                  * local variable for the following call to next()
                  */
                 Attribute ref = result.getAttributes().get( "ref" );
-                if( ! ctx.isReferral( result.getName() ) || req.getControls().containsKey( ManageDsaITControl.CONTROL_OID ) )
+                if ( !ctx.isReferral( result.getName() )
+                    || req.getControls().containsKey( ManageDsaITControl.CONTROL_OID ) )
                 {
                     SearchResponseEntry respEntry;
                     respEntry = new SearchResponseEntryImpl( req.getMessageId() );
@@ -102,7 +103,7 @@
                     respRef = new SearchResponseReferenceImpl( req.getMessageId() );
                     respRef.setReferral( new ReferralImpl() );
 
-                    for( int ii = 0; ii < ref.size(); ii ++ )
+                    for ( int ii = 0; ii < ref.size(); ii++ )
                     {
                         String url;
 
@@ -111,13 +112,13 @@
                             url = ( String ) ref.get( ii );
                             respRef.getReferral().addLdapUrl( url );
                         }
-                        catch( NamingException e )
+                        catch ( NamingException e )
                         {
                             try
                             {
                                 underlying.close();
                             }
-                            catch( Throwable t )
+                            catch ( Throwable t )
                             {
                             }
 
@@ -130,13 +131,13 @@
                 }
             }
         }
-        catch( NamingException e )
+        catch ( NamingException e )
         {
             try
             {
                 this.underlying.close();
             }
-            catch( Exception e2 )
+            catch ( Exception e2 )
             {
             }
 
@@ -144,26 +145,26 @@
         }
     }
 
-    
+
     public boolean hasNext()
     {
         return !done;
     }
 
-    
+
     public Object next()
     {
         Object next = prefetched;
         SearchResult result = null;
 
         // if we're done we got nothing to give back
-        if( done )
+        if ( done )
         {
             throw new NoSuchElementException();
         }
 
         // if respDone has been assembled this is our last object to return
-        if( respDone != null )
+        if ( respDone != null )
         {
             done = true;
             return respDone;
@@ -179,7 +180,7 @@
              * If we have more results from the underlying cursorr then
              * we just set the result and build the response object below.
              */
-            if( underlying.hasMore() )
+            if ( underlying.hasMore() )
             {
                 result = ( SearchResult ) underlying.next();
             }
@@ -189,7 +190,7 @@
                 {
                     underlying.close();
                 }
-                catch( Throwable t )
+                catch ( Throwable t )
                 {
                 }
 
@@ -199,13 +200,13 @@
                 return next;
             }
         }
-        catch( NamingException e )
+        catch ( NamingException e )
         {
             try
             {
                 underlying.close();
             }
-            catch( Throwable t )
+            catch ( Throwable t )
             {
             }
 
@@ -225,19 +226,19 @@
         {
             isReferral = ctx.isReferral( result.getName() );
         }
-        catch( NamingException e )
+        catch ( NamingException e )
         {
             log.error( "failed to determine if " + result.getName() + " is a referral", e );
             throw new RuntimeException( e );
         }
-        
-        
+
         // we may need to lookup the object again if the ref attribute was filtered out
         if ( isReferral && ref == null )
         {
             try
             {
-                ref = ctx.getAttributes( result.getName(), new String[]{ "ref" } ).get( "ref" );
+                ref = ctx.getAttributes( result.getName(), new String[]
+                    { "ref" } ).get( "ref" );
             }
             catch ( NamingException e )
             {
@@ -245,8 +246,9 @@
                 throw new RuntimeException( e );
             }
         }
-        
-        if( ! isReferral || req.getControls().containsKey( ManageDsaITControl.CONTROL_OID ) )        {
+
+        if ( !isReferral || req.getControls().containsKey( ManageDsaITControl.CONTROL_OID ) )
+        {
             SearchResponseEntry respEntry = new SearchResponseEntryImpl( req.getMessageId() );
             respEntry.setAttributes( result.getAttributes() );
             respEntry.setObjectName( result.getName() );
@@ -257,7 +259,6 @@
             SearchResponseReference respRef = new SearchResponseReferenceImpl( req.getMessageId() );
             respRef.setReferral( new ReferralImpl() );
 
-            
             for ( int ii = 0; ii < ref.size(); ii++ )
             {
                 String val;
@@ -267,12 +268,12 @@
                 }
                 catch ( NamingException e1 )
                 {
-                    log.error( "failed to access referral url." ); 
+                    log.error( "failed to access referral url." );
                     try
                     {
                         underlying.close();
                     }
-                    catch( Throwable t )
+                    catch ( Throwable t )
                     {
                     }
 
@@ -280,14 +281,14 @@
                     respDone = getResponse( req, e1 );
                     return next;
                 }
-                
+
                 // need to add non-ldap URLs as-is
-                if ( ! val.startsWith( "ldap" ) )
+                if ( !val.startsWith( "ldap" ) )
                 {
                     respRef.getReferral().addLdapUrl( val );
                     continue;
                 }
-                
+
                 // parse the ref value and normalize the DN according to schema 
                 LdapURL ldapUrl = new LdapURL();
                 try
@@ -296,12 +297,14 @@
                 }
                 catch ( LdapURLEncodingException e )
                 {
-                    log.error( "Bad URL ("+ val +") for ref in " + result.getName() + ".  Reference will be ignored." ); 
+                    log
+                        .error( "Bad URL (" + val + ") for ref in " + result.getName()
+                            + ".  Reference will be ignored." );
                     try
                     {
                         underlying.close();
                     }
-                    catch( Throwable t )
+                    catch ( Throwable t )
                     {
                     }
 
@@ -309,7 +312,7 @@
                     respDone = getResponse( req, e );
                     return next;
                 }
-                
+
                 StringBuffer buf = new StringBuffer();
                 buf.append( ldapUrl.getScheme() );
                 buf.append( ldapUrl.getHost() );
@@ -321,25 +324,25 @@
                 buf.append( "/" );
                 buf.append( ldapUrl.getDn() );
                 buf.append( "??" );
-                
+
                 switch ( scope )
                 {
-                    case( SearchControls.SUBTREE_SCOPE ):
+                    case ( SearchControls.SUBTREE_SCOPE  ):
                         buf.append( "sub" );
                         break;
-                        
+
                     // if we search for one level and encounter a referral then search
                     // must be continued at that node using base level search scope
-                    case( SearchControls.ONELEVEL_SCOPE ):
+                    case ( SearchControls.ONELEVEL_SCOPE  ):
                         buf.append( "base" );
                         break;
-                    case( SearchControls.OBJECT_SCOPE ):
+                    case ( SearchControls.OBJECT_SCOPE  ):
                         buf.append( "base" );
                         break;
                     default:
                         throw new IllegalStateException( "Unknown recognized search scope: " + scope );
                 }
-                
+
                 respRef.getReferral().addLdapUrl( buf.toString() );
             }
 
@@ -349,7 +352,7 @@
         return next;
     }
 
-    
+
     /**
      * Unsupported so it throws an exception.
      *
@@ -371,7 +374,7 @@
 
         SearchResponseDone resp = ( SearchResponseDone ) req.getResultResponse();
         ResultCodeEnum code = null;
-        if( e instanceof LdapException )
+        if ( e instanceof LdapException )
         {
             code = ( ( LdapException ) e ).getResultCode();
         }
@@ -382,15 +385,13 @@
 
         resp.getLdapResult().setResultCode( code );
         resp.getLdapResult().setErrorMessage( msg );
-        
+
         if ( e instanceof NamingException )
         {
-            NamingException ne = ( NamingException ) e; 
-            if ( ( ne.getResolvedName() != null ) &&
-                    ( ( code == ResultCodeEnum.NOSUCHOBJECT ) ||
-                      ( code == ResultCodeEnum.ALIASPROBLEM ) ||
-                      ( code == ResultCodeEnum.INVALIDDNSYNTAX ) ||
-                      ( code == ResultCodeEnum.ALIASDEREFERENCINGPROBLEM ) ) )
+            NamingException ne = ( NamingException ) e;
+            if ( ( ne.getResolvedName() != null )
+                && ( ( code == ResultCodeEnum.NOSUCHOBJECT ) || ( code == ResultCodeEnum.ALIASPROBLEM )
+                    || ( code == ResultCodeEnum.INVALIDDNSYNTAX ) || ( code == ResultCodeEnum.ALIASDEREFERENCINGPROBLEM ) ) )
             {
                 resp.getLdapResult().setMatchedDn( ne.getResolvedName().toString() );
             }

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/SearchResponseIterator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/SearchResponseIterator.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/UnbindHandler.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/UnbindHandler.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/UnbindHandler.java (original)
+++ directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/UnbindHandler.java Sun Feb 19 19:57:02 2006
@@ -40,7 +40,7 @@
 {
     private static final Logger log = LoggerFactory.getLogger( UnbindHandler.class );
 
-    
+
     public void messageReceived( IoSession session, Object request )
     {
         SessionRegistry registry = SessionRegistry.getSingleton();
@@ -48,7 +48,7 @@
         try
         {
             LdapContext ctx = ( LdapContext ) SessionRegistry.getSingleton().getLdapContext( session, null, false );
-            
+
             if ( ctx != null )
             {
                 if ( ctx instanceof ServerLdapContext && ( ( ServerLdapContext ) ctx ).getService().isStarted() )

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/UnbindHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/UnbindHandler.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -1 +1,4 @@
 Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/GracefulShutdownHandler.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/GracefulShutdownHandler.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/GracefulShutdownHandler.java (original)
+++ directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/GracefulShutdownHandler.java Sun Feb 19 19:57:02 2006
@@ -41,7 +41,6 @@
 import org.apache.directory.shared.ldap.message.extended.GracefulShutdownResponse;
 import org.apache.directory.shared.ldap.message.extended.NoticeOfDisconnect;
 
-
 import org.apache.mina.common.IoAcceptor;
 import org.apache.mina.common.IoSession;
 import org.apache.mina.common.WriteFuture;
@@ -56,7 +55,7 @@
 {
     private static final Logger log = LoggerFactory.getLogger( GracefulShutdownHandler.class );
     public static final Set EXTENSION_OIDS;
-    
+
     static
     {
         Set set = new HashSet( 3 );
@@ -65,19 +64,19 @@
         set.add( GracefulDisconnect.EXTENSION_OID );
         EXTENSION_OIDS = Collections.unmodifiableSet( set );
     }
-    
+
     private ServiceRegistry serviceRegistry;
     private Service ldapService;
-    
+
 
     public String getOid()
     {
         return GracefulShutdownRequest.EXTENSION_OID;
     }
 
-    
-    public void handleExtendedOperation( IoSession requestor, SessionRegistry registry, ExtendedRequest req ) 
-        throws NamingException 
+
+    public void handleExtendedOperation( IoSession requestor, SessionRegistry registry, ExtendedRequest req )
+        throws NamingException
     {
         DirectoryService service = null;
         ServerLdapContext slc = null;
@@ -94,7 +93,7 @@
         else
         {
             log.error( "Encountered session context which was not a ServerLdapContext" );
-            GracefulShutdownResponse msg = new GracefulShutdownResponse( req.getMessageId(), 
+            GracefulShutdownResponse msg = new GracefulShutdownResponse( req.getMessageId(),
                 ResultCodeEnum.OPERATIONSERROR );
             msg.getLdapResult().setErrorMessage( "The session context was not a ServerLdapContext" );
             requestor.write( msg );
@@ -103,23 +102,23 @@
 
         // make sue only the administrator can issue this shutdown request if 
         // not we respond to the requestor with with insufficientAccessRights(50)
-        if ( ! slc.getPrincipal().getName().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL ) )
+        if ( !slc.getPrincipal().getName().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL ) )
         {
             if ( log.isInfoEnabled() )
             {
-                log.info( "Rejected with insufficientAccessRights to attempt for server shutdown by " 
+                log.info( "Rejected with insufficientAccessRights to attempt for server shutdown by "
                     + slc.getPrincipal().getName() );
             }
-            
-            requestor.write( new GracefulShutdownResponse( req.getMessageId(), 
-                ResultCodeEnum.INSUFFICIENTACCESSRIGHTS ) );
+
+            requestor
+                .write( new GracefulShutdownResponse( req.getMessageId(), ResultCodeEnum.INSUFFICIENTACCESSRIGHTS ) );
             return;
         }
-        
+
         // -------------------------------------------------------------------
         // handle the body of this operation below here
         // -------------------------------------------------------------------
-        
+
         IoAcceptor acceptor = serviceRegistry.getAcceptor( ldapService.getTransportType() );
         List sessions = new ArrayList( acceptor.getManagedSessions( ldapService.getAddress() ) );
         StartupConfiguration cfg = service.getConfiguration().getStartupConfiguration();
@@ -134,7 +133,7 @@
 
         // wait for the specified delay before we unbind the service 
         waitForDelay( gsreq.getDelay() );
-        
+
         // -------------------------------------------------------------------
         // unbind the server socket for the LDAP service here so no new 
         // connections are accepted while we process this shutdown request
@@ -145,7 +144,7 @@
         //                       .setDisconnectClientsOnUnbind( false );
         // -------------------------------------------------------------------
         serviceRegistry.unbind( ldapService );
-        
+
         // -------------------------------------------------------------------
         // synchronously send a NoD to clients that are not aware of this resp
         // after sending the NoD the client is disconnected if still connected
@@ -165,11 +164,11 @@
         {
             System.exit( 0 );
         }
-        
+
         return;
     }
-    
-    
+
+
     /**
      * Sends a successful response.
      * 
@@ -194,8 +193,8 @@
         }
         requestor.close();
     }
-    
-    
+
+
     /**
      * Blocks to synchronously send the same GracefulDisconnect message to all 
      * managed sessions except for the requestor of the GracefulShutdown.
@@ -206,29 +205,29 @@
     public static void sendGracefulDisconnect( List sessions, GracefulDisconnect msg, IoSession requestor )
     {
         List writeFutures = new ArrayList();
-        
+
         // asynchronously send GracefulDisconnection messages to all connected
         // clients giving time for the message to arrive before we block 
         // waiting for message delivery to the client in the loop below
-        
-        if( sessions != null )
+
+        if ( sessions != null )
         {
-            for( Iterator i = sessions.iterator(); i.hasNext(); )
+            for ( Iterator i = sessions.iterator(); i.hasNext(); )
             {
                 IoSession session = session = ( IoSession ) i.next();
-                
+
                 // make sure we do not send the disconnect mesasge to the 
                 // client which sent the initiating GracefulShutdown request
                 if ( session.equals( requestor ) )
                 {
                     continue;
                 }
-                
+
                 try
                 {
                     writeFutures.add( session.write( msg ) );
                 }
-                catch( Exception e )
+                catch ( Exception e )
                 {
                     log.warn( "Failed to write GracefulDisconnect to client session: " + session, e );
                 }
@@ -236,14 +235,14 @@
         }
 
         // wait for GracefulDisconnect messages to be sent before returning
-        for( Iterator i = writeFutures.iterator(); i.hasNext(); )
+        for ( Iterator i = writeFutures.iterator(); i.hasNext(); )
         {
             WriteFuture future = ( WriteFuture ) i.next();
             try
             {
                 future.join( 1000 );
             }
-            catch( Exception e )
+            catch ( Exception e )
             {
                 log.warn( "Failed to sent GracefulDisconnect", e );
             }
@@ -261,14 +260,14 @@
     public static void sendNoticeOfDisconnect( List sessions, IoSession requestor )
     {
         List writeFutures = new ArrayList();
-        
+
         // Send Notification of Disconnection messages to all connected clients.
-        if( sessions != null )
+        if ( sessions != null )
         {
-            for( Iterator i = sessions.iterator(); i.hasNext(); )
+            for ( Iterator i = sessions.iterator(); i.hasNext(); )
             {
                 IoSession session = session = ( IoSession ) i.next();
-                
+
                 // make sure we do not send the disconnect mesasge to the 
                 // client which sent the initiating GracefulShutdown request
                 if ( session.equals( requestor ) )
@@ -280,7 +279,7 @@
                 {
                     writeFutures.add( session.write( NoticeOfDisconnect.UNAVAILABLE ) );
                 }
-                catch( Exception e )
+                catch ( Exception e )
                 {
                     log.warn( "Failed to sent NoD for client: " + session, e );
                 }
@@ -289,7 +288,7 @@
 
         // And close the connections when the NoDs are sent.
         Iterator sessionIt = sessions.iterator();
-        for( Iterator i = writeFutures.iterator(); i.hasNext(); )
+        for ( Iterator i = writeFutures.iterator(); i.hasNext(); )
         {
             WriteFuture future = ( WriteFuture ) i.next();
             try
@@ -297,7 +296,7 @@
                 future.join( 1000 );
                 ( ( IoSession ) sessionIt.next() ).close();
             }
-            catch( Exception e )
+            catch ( Exception e )
             {
                 log.warn( "Failed to sent NoD.", e );
             }
@@ -310,12 +309,12 @@
         // build the graceful disconnect message with replicationContexts
         GracefulDisconnect notice = new GracefulDisconnect( timeOffline, delay );
         // @todo add the referral objects for replication contexts using setup code below
-//        Iterator list = nexus.listSuffixes( true );
-//        while ( list.hasNext() )
-//        {
-//            LdapName dn = new LdapName( ( String ) list.next() );
-//            DirectoryPartition partition = nexus.getPartition( dn );
-//        }
+        //        Iterator list = nexus.listSuffixes( true );
+        //        while ( list.hasNext() )
+        //        {
+        //            LdapName dn = new LdapName( ( String ) list.next() );
+        //            DirectoryPartition partition = nexus.getPartition( dn );
+        //        }
         return notice;
     }
 
@@ -327,7 +326,7 @@
             // delay is in seconds
             long delayMillis = delay * 1000;
             long startTime = System.currentTimeMillis();
-            
+
             while ( ( System.currentTimeMillis() - startTime ) < delayMillis )
             {
                 try

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/GracefulShutdownHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/GracefulShutdownHandler.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/LaunchDiagnosticUiHandler.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/LaunchDiagnosticUiHandler.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/LaunchDiagnosticUiHandler.java (original)
+++ directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/LaunchDiagnosticUiHandler.java Sun Feb 19 19:57:02 2006
@@ -52,7 +52,7 @@
 public class LaunchDiagnosticUiHandler implements ExtendedOperationHandler
 {
     public static final Set EXTENSION_OIDS;
-    
+
     static
     {
         Set set = new HashSet( 3 );
@@ -60,31 +60,33 @@
         set.add( LaunchDiagnosticUiResponse.EXTENSION_OID );
         EXTENSION_OIDS = Collections.unmodifiableSet( set );
     }
-    
+
     private Service ldapService;
     private ServiceRegistry minaRegistry;
     private LdapProtocolProvider ldapProvider;
-    
-    
+
+
     public String getOid()
     {
         return LaunchDiagnosticUiRequest.EXTENSION_OID;
     }
 
-    
-    public void handleExtendedOperation( IoSession requestor, SessionRegistry registry, ExtendedRequest req ) throws NamingException 
+
+    public void handleExtendedOperation( IoSession requestor, SessionRegistry registry, ExtendedRequest req )
+        throws NamingException
     {
         LdapContext ctx = registry.getLdapContext( requestor, null, false );
         ctx = ( LdapContext ) ctx.lookup( "" );
-        
+
         if ( ctx instanceof ServerLdapContext )
         {
             ServerLdapContext slc = ( ServerLdapContext ) ctx;
             DirectoryService service = slc.getService();
-            
-            if ( ! slc.getPrincipal().getName().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL ) )
+
+            if ( !slc.getPrincipal().getName().equalsIgnoreCase( DirectoryPartitionNexus.ADMIN_PRINCIPAL ) )
             {
-                requestor.write( new LaunchDiagnosticUiResponse( req.getMessageId(), ResultCodeEnum.INSUFFICIENTACCESSRIGHTS ) );
+                requestor.write( new LaunchDiagnosticUiResponse( req.getMessageId(),
+                    ResultCodeEnum.INSUFFICIENTACCESSRIGHTS ) );
                 return;
             }
 
@@ -102,24 +104,24 @@
                     BTreeDirectoryPartition btPartition = ( BTreeDirectoryPartition ) partition;
                     PartitionFrame frame = new PartitionFrame( btPartition, btPartition.getSearchEngine() );
                     Point pos = getCenteredPosition( frame );
-                    pos.y = launchedWindowCount*20 + pos.y;
+                    pos.y = launchedWindowCount * 20 + pos.y;
                     double multiplier = getAspectRatio() * 20.0;
-                    pos.x =  ( int ) ( launchedWindowCount * multiplier ) + pos.x;
+                    pos.x = ( int ) ( launchedWindowCount * multiplier ) + pos.x;
                     frame.setLocation( pos );
                     frame.setVisible( true );
                     launchedWindowCount++;
                 }
             }
-            
+
             SessionsFrame sessions = new SessionsFrame();
             sessions.setMinaRegistry( minaRegistry );
             sessions.setLdapService( ldapService );
             sessions.setRequestor( requestor );
             sessions.setLdapProvider( ldapProvider.getHandler() );
             Point pos = getCenteredPosition( sessions );
-            pos.y = launchedWindowCount*20 + pos.y;
+            pos.y = launchedWindowCount * 20 + pos.y;
             double multiplier = getAspectRatio() * 20.0;
-            pos.x =  ( int ) ( launchedWindowCount * multiplier ) + pos.x;
+            pos.x = ( int ) ( launchedWindowCount * multiplier ) + pos.x;
             sessions.setLocation( pos );
             sessions.setVisible( true );
             return;
@@ -127,16 +129,16 @@
 
         requestor.write( new LaunchDiagnosticUiResponse( req.getMessageId(), ResultCodeEnum.OPERATIONSERROR ) );
     }
-    
-    
+
+
     public double getAspectRatio()
     {
         Toolkit tk = Toolkit.getDefaultToolkit();
         Dimension screenSize = tk.getScreenSize();
         return ( double ) screenSize.getWidth() / ( double ) screenSize.getHeight();
     }
-    
-    
+
+
     public Point getCenteredPosition( JFrame frame )
     {
         Point pt = new Point();

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/LaunchDiagnosticUiHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/protocol-ldap/src/main/java/org/apache/directory/server/ldap/support/extended/LaunchDiagnosticUiHandler.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-ldap/src/test/java/org/apache/directory/server/ldap/LdapProtocolProviderTest.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-ldap/src/test/java/org/apache/directory/server/ldap/LdapProtocolProviderTest.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-ldap/src/test/java/org/apache/directory/server/ldap/LdapProtocolProviderTest.java (original)
+++ directory/trunks/apacheds/protocol-ldap/src/test/java/org/apache/directory/server/ldap/LdapProtocolProviderTest.java Sun Feb 19 19:57:02 2006
@@ -72,6 +72,7 @@
         assertTrue( provider.getName() == LdapProtocolProvider.SERVICE_NAME );
     }
 
+
     /**
      * Tests to make sure handlers for alternative configurations are kicking
      * in properly with the right request type.
@@ -118,7 +119,6 @@
         assertTrue( provider.getName() == LdapProtocolProvider.SERVICE_NAME );
     }
 
-
     public static class BogusAbandonHandler implements MessageHandler
     {
         public void messageReceived( IoSession session, Object request )
@@ -167,7 +167,6 @@
         }
     }
 
-
     public static class BogusModifyDnHandler implements MessageHandler
     {
         public void messageReceived( IoSession session, Object request )
@@ -176,7 +175,6 @@
         }
     }
 
-
     public static class BogusModifyHandler implements MessageHandler
     {
         public void messageReceived( IoSession session, Object request )
@@ -184,7 +182,6 @@
             throw new NotImplementedException( "handler not implemented!" );
         }
     }
-
 
     public static class BogusSearchHandler implements MessageHandler
     {

Propchange: directory/trunks/apacheds/protocol-ldap/src/test/java/org/apache/directory/server/ldap/LdapProtocolProviderTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/protocol-ldap/src/test/java/org/apache/directory/server/ldap/LdapProtocolProviderTest.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -1 +1,4 @@
 Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-ntp/pom.xml
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-ntp/pom.xml?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-ntp/pom.xml (original)
+++ directory/trunks/apacheds/protocol-ntp/pom.xml Sun Feb 19 19:57:02 2006
@@ -4,11 +4,13 @@
   <parent>
     <groupId>org.apache.directory.server</groupId>
     <artifactId>build</artifactId>
-    <version>1.0-RC1-SNAPSHOT</version>
+    <version>1.0-RC1</version>
   </parent>
-  <version>0.5-SNAPSHOT</version>
   <artifactId>apacheds-protocol-ntp</artifactId>
   <name>ApacheDS Protocol Ntp</name>
+  <description>
+    The NTP protocol provider for ApacheDS
+  </description>
   <packaging>jar</packaging>  
   <dependencies>
     <dependency>
@@ -25,7 +27,7 @@
     <dependency>
       <groupId>org.apache.directory.server</groupId>
       <artifactId>apacheds-protocol-shared</artifactId>
-      <version>0.7.1-SNAPSHOT</version>
+      <version>${pom.version}</version>
     </dependency>
   </dependencies>
 </project>

Modified: directory/trunks/apacheds/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpConfiguration.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpConfiguration.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpConfiguration.java (original)
+++ directory/trunks/apacheds/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpConfiguration.java Sun Feb 19 19:57:02 2006
@@ -17,6 +17,7 @@
 
 package org.apache.directory.server.ntp;
 
+
 import java.util.Dictionary;
 import java.util.HashMap;
 import java.util.Map;
@@ -26,6 +27,7 @@
 import org.apache.directory.server.protocol.shared.LoadStrategy;
 import org.apache.directory.server.protocol.shared.ServiceConfiguration;
 
+
 public class NtpConfiguration extends ServiceConfiguration
 {
     private static final long serialVersionUID = 2961795205765175775L;
@@ -42,6 +44,7 @@
     /** the default prefix */
     private static final String DEFAULT_PREFIX = "ntp.";
 
+
     /**
      * Creates a new instance with default settings.
      */
@@ -50,22 +53,25 @@
         this( getDefaultConfig(), LoadStrategy.LDAP );
     }
 
+
     /**
      * Creates a new instance with default settings that operates on the
      * {@link DirectoryService} with the specified ID.
      */
-    public NtpConfiguration( String instanceId )
+    public NtpConfiguration(String instanceId)
     {
         this( getDefaultConfig(), LoadStrategy.LDAP );
         setInstanceId( instanceId );
     }
 
-    public NtpConfiguration( Map properties )
+
+    public NtpConfiguration(Map properties)
     {
         this( properties, LoadStrategy.LDAP );
     }
 
-    public NtpConfiguration( Map properties, int strategy )
+
+    public NtpConfiguration(Map properties, int strategy)
     {
         if ( properties == null )
         {
@@ -84,6 +90,7 @@
         }
     }
 
+
     public static Map getDefaultConfig()
     {
         Map defaults = new HashMap();
@@ -94,11 +101,12 @@
         return defaults;
     }
 
+
     public boolean isDifferent( Dictionary config )
     {
         int port = getPort();
 
-        if ( port == Integer.parseInt( (String) config.get( IP_PORT_KEY ) ) )
+        if ( port == Integer.parseInt( ( String ) config.get( IP_PORT_KEY ) ) )
         {
             return false;
         }
@@ -106,10 +114,12 @@
         return true;
     }
 
+
     public String getName()
     {
         return DEFAULT_NAME;
     }
+
 
     public int getPort()
     {

Propchange: directory/trunks/apacheds/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpConfiguration.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpException.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpException.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpException.java (original)
+++ directory/trunks/apacheds/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpException.java Sun Feb 19 19:57:02 2006
@@ -17,6 +17,7 @@
 
 package org.apache.directory.server.ntp;
 
+
 /**
  * The root of the NTP exception hierarchy.
  *
@@ -27,6 +28,7 @@
 {
     private static final long serialVersionUID = -225862469671550203L;
 
+
     /**
      * Creates an NtpException.
      */
@@ -35,31 +37,34 @@
         super();
     }
 
+
     /**
      * Creates an NtpException with a message and cause.
      * 
      * @param message the message
      * @param cause the cause
      */
-    public NtpException( String message, Throwable cause )
+    public NtpException(String message, Throwable cause)
     {
         super( message, cause );
     }
 
+
     /**
      * Creates an NtpException with a message.
      * 
      * @param message the message
      */
-    public NtpException( String message )
+    public NtpException(String message)
     {
         super( message );
     }
 
+
     /**
      * @param cause the cause
      */
-    public NtpException( Throwable cause )
+    public NtpException(Throwable cause)
     {
         super( cause );
     }

Propchange: directory/trunks/apacheds/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpException.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpServer.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpServer.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpServer.java (original)
+++ directory/trunks/apacheds/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpServer.java Sun Feb 19 19:57:02 2006
@@ -17,6 +17,7 @@
 
 package org.apache.directory.server.ntp;
 
+
 import java.io.IOException;
 import java.util.Dictionary;
 
@@ -28,6 +29,7 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+
 public class NtpServer
 {
     /** the log for this class */
@@ -40,7 +42,8 @@
     private Service tcpService;
     private Service udpService;
 
-    public NtpServer( NtpConfiguration config, ServiceRegistry registry )
+
+    public NtpServer(NtpConfiguration config, ServiceRegistry registry)
     {
         this.config = config;
         this.registry = registry;
@@ -66,10 +69,12 @@
         }
     }
 
+
     public boolean isDifferent( Dictionary newConfig )
     {
         return config.isDifferent( newConfig );
     }
+
 
     public void destroy()
     {

Propchange: directory/trunks/apacheds/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpServer.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpService.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpService.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpService.java (original)
+++ directory/trunks/apacheds/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpService.java Sun Feb 19 19:57:02 2006
@@ -17,7 +17,9 @@
 
 package org.apache.directory.server.ntp;
 
+
 import org.apache.directory.server.ntp.messages.NtpMessage;
+
 
 /**
  * NTP Protocol (RFC 2030)

Propchange: directory/trunks/apacheds/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpService.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/trunks/apacheds/protocol-ntp/src/main/java/org/apache/directory/server/ntp/io/NtpMessageDecoder.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/protocol-ntp/src/main/java/org/apache/directory/server/ntp/io/NtpMessageDecoder.java?rev=379013&r1=379012&r2=379013&view=diff
==============================================================================
--- directory/trunks/apacheds/protocol-ntp/src/main/java/org/apache/directory/server/ntp/io/NtpMessageDecoder.java (original)
+++ directory/trunks/apacheds/protocol-ntp/src/main/java/org/apache/directory/server/ntp/io/NtpMessageDecoder.java Sun Feb 19 19:57:02 2006
@@ -17,6 +17,7 @@
 
 package org.apache.directory.server.ntp.io;
 
+
 import java.nio.ByteBuffer;
 
 import org.apache.directory.server.ntp.messages.LeapIndicatorType;
@@ -27,6 +28,7 @@
 import org.apache.directory.server.ntp.messages.ReferenceIdentifier;
 import org.apache.directory.server.ntp.messages.StratumType;
 
+
 public class NtpMessageDecoder
 {
     public NtpMessage decode( ByteBuffer request )
@@ -46,7 +48,7 @@
         modifier.setReferenceTimestamp( new NtpTimeStamp( request ) );
         modifier.setOriginateTimestamp( new NtpTimeStamp( request ) );
 
-        byte[] unneededBytes = new byte[ 8 ];
+        byte[] unneededBytes = new byte[8];
         request.get( unneededBytes );
 
         modifier.setReceiveTimestamp( new NtpTimeStamp() );
@@ -55,48 +57,57 @@
         return modifier.getNtpMessage();
     }
 
+
     private LeapIndicatorType parseLeapIndicator( byte header )
     {
         return LeapIndicatorType.getTypeByOrdinal( ( header & 0xc0 ) >>> 6 );
     }
 
+
     private int parseVersionNumber( byte header )
     {
         return ( header & 0x38 ) >>> 3;
     }
 
+
     private ModeType parseMode( byte header )
     {
         return ModeType.getTypeByOrdinal( header & 0x07 );
     }
 
+
     private StratumType parseStratum( ByteBuffer request )
     {
         return StratumType.getTypeByOrdinal( request.get() );
     }
 
+
     private byte parsePollInterval( ByteBuffer bytes )
     {
-        return (byte) Math.round( Math.pow( 2, bytes.get() ) );
+        return ( byte ) Math.round( Math.pow( 2, bytes.get() ) );
     }
 
+
     private byte parsePrecision( ByteBuffer bytes )
     {
-        return (byte) ( 1000 * Math.pow( 2, bytes.get() ) );
+        return ( byte ) ( 1000 * Math.pow( 2, bytes.get() ) );
     }
 
+
     private ReferenceIdentifier parseReferenceIdentifier( ByteBuffer request )
     {
-        byte[] nextFourBytes = new byte[ 4 ];
+        byte[] nextFourBytes = new byte[4];
         request.get( nextFourBytes );
         return ReferenceIdentifier.getTypeByName( new String( nextFourBytes ) );
     }
 
+
     private int parseRootDelay( ByteBuffer bytes )
     {
         int temp = 256 * ( 256 * ( 256 * bytes.get() + bytes.get() ) + bytes.get() ) + bytes.get();
         return 1000 * ( temp / 0x10000 );
     }
+
 
     private int parseRootDispersion( ByteBuffer bytes )
     {

Propchange: directory/trunks/apacheds/protocol-ntp/src/main/java/org/apache/directory/server/ntp/io/NtpMessageDecoder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/trunks/apacheds/protocol-ntp/src/main/java/org/apache/directory/server/ntp/io/NtpMessageDecoder.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Feb 19 19:57:02 2006
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id



Mime
View raw message