public DirContext getInnermostDelegateDirContext ( ) { final DirContext delegateDirContext = this . getDelegateDirContext ( ) ; if ( delegateDirContext instanceof DelegatingDirContext ) { return ( ( DelegatingDirContext ) delegateDirContext ) . getInnermostDelegateDirContext ( ) ; } return delegateDirContext ; }
Recursivley inspect delegates until a non - delegating dir context is found .