You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ka...@apache.org on 2010/09/13 22:44:21 UTC
svn commit: r996683 -
/directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
Author: kayyagari
Date: Mon Sep 13 20:44:21 2010
New Revision: 996683
URL: http://svn.apache.org/viewvc?rev=996683&view=rev
Log:
o removed some unused code (the if conditions will never be executed cause the corresponding XXXFuture can never be null inside the switch block)
Modified:
directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
Modified: directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java?rev=996683&r1=996682&r2=996683&view=diff
==============================================================================
--- directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java (original)
+++ directory/shared/trunk/ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java Mon Sep 13 20:44:21 2010
@@ -1466,12 +1466,6 @@ public class LdapNetworkConnection exten
AddFuture addFuture = ( AddFuture ) responseFuture;
- if ( addFuture == null )
- {
- LOG.error( "AddFuture is null" );
- throw new LdapException( "AddFuture is null" );
- }
-
// remove the listener from the listener map
if ( LOG.isDebugEnabled() )
{
@@ -1501,12 +1495,6 @@ public class LdapNetworkConnection exten
BindFuture bindFuture = ( BindFuture ) responseFuture;
- if ( bindFuture == null )
- {
- LOG.error( "BindFuture is null" );
- throw new LdapException( "BindFuture is null" );
- }
-
// remove the listener from the listener map
if ( bindResponse.getLdapResult().getResultCode() == ResultCodeEnum.SUCCESS )
{
@@ -1535,12 +1523,6 @@ public class LdapNetworkConnection exten
CompareFuture compareFuture = ( CompareFuture ) responseFuture;
- if ( compareFuture == null )
- {
- LOG.error( "CompareFuture is null" );
- throw new LdapException( "CompareFuture is null" );
- }
-
// remove the listener from the listener map
if ( LOG.isDebugEnabled() )
{
@@ -1570,12 +1552,6 @@ public class LdapNetworkConnection exten
DeleteFuture deleteFuture = ( DeleteFuture ) responseFuture;
- if ( deleteFuture == null )
- {
- LOG.error( "DeleteFuture is null" );
- throw new LdapException( "DeleteFuture is null" );
- }
-
if ( LOG.isDebugEnabled() )
{
if ( deleteResponse.getLdapResult().getResultCode() == ResultCodeEnum.SUCCESS )
@@ -1604,12 +1580,6 @@ public class LdapNetworkConnection exten
ExtendedFuture extendedFuture = ( ExtendedFuture ) responseFuture;
- if ( extendedFuture == null )
- {
- LOG.error( "ExtendedFuture is null" );
- throw new LdapException( "extendedFuture is null" );
- }
-
// remove the listener from the listener map
if ( LOG.isDebugEnabled() )
{
@@ -1666,12 +1636,6 @@ public class LdapNetworkConnection exten
ModifyFuture modifyFuture = ( ModifyFuture ) responseFuture;
- if ( modifyFuture == null )
- {
- LOG.error( "ModifyFuture is null" );
- throw new LdapException( "ModifyFuture is null" );
- }
-
if ( LOG.isDebugEnabled() )
{
if ( modifyResponse.getLdapResult().getResultCode() == ResultCodeEnum.SUCCESS )
@@ -1700,12 +1664,6 @@ public class LdapNetworkConnection exten
ModifyDnFuture modifyDnFuture = ( ModifyDnFuture ) responseFuture;
- if ( modifyDnFuture == null )
- {
- LOG.error( "ModifyDNFuture is null" );
- throw new LdapException( "ModifyDNFuture is null" );
- }
-
if ( LOG.isDebugEnabled() )
{
if ( modifyDnResponse.getLdapResult().getResultCode() == ResultCodeEnum.SUCCESS )
@@ -1734,12 +1692,6 @@ public class LdapNetworkConnection exten
SearchFuture searchFuture = ( SearchFuture ) responseFuture;
- if ( searchFuture == null )
- {
- LOG.error( "SearchFuture is null" );
- throw new LdapException( "SearchFuture is null" );
- }
-
if ( LOG.isDebugEnabled() )
{
if ( searchResultDone.getLdapResult().getResultCode() == ResultCodeEnum.SUCCESS )
@@ -1773,12 +1725,6 @@ public class LdapNetworkConnection exten
searchFuture = ( SearchFuture ) responseFuture;
- if ( searchFuture == null )
- {
- LOG.error( "SearchFuture is null" );
- throw new LdapException( "SearchFuture is null" );
- }
-
if ( LOG.isDebugEnabled() )
{
LOG.debug( "Search entry found : {}", searchResultEntry );
@@ -1795,12 +1741,6 @@ public class LdapNetworkConnection exten
searchFuture = ( SearchFuture ) responseFuture;
- if ( searchFuture == null )
- {
- LOG.error( "SearchFuture is null" );
- throw new LdapException( "SearchFuture is null" );
- }
-
if ( LOG.isDebugEnabled() )
{
LOG.debug( "Search reference found : {}", searchResultReference );