directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r945438 - in /directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2: engine/Dsmlv2Engine.java reponse/Dsmlv2ResponseGrammar.java
Date Mon, 17 May 2010 23:38:39 GMT
Author: elecharny
Date: Mon May 17 23:38:38 2010
New Revision: 945438

URL: http://svn.apache.org/viewvc?rev=945438&view=rev
Log:
Fixed some PMD issues

Modified:
    directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java
    directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/Dsmlv2ResponseGrammar.java

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java?rev=945438&r1=945437&r2=945438&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java
(original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java
Mon May 17 23:38:38 2010
@@ -439,17 +439,16 @@ public class Dsmlv2Engine
         }
 
         LdapResponseCodec realResponse = (LdapResponseCodec)response;
+        ResultCodeEnum resultCode = realResponse.getLdapResult().getResultCode();
 
-        if ( !continueOnError )
+        if ( ( !continueOnError ) 
+                && ( resultCode != ResultCodeEnum.SUCCESS )
+                && ( resultCode != ResultCodeEnum.COMPARE_TRUE )
+                && ( resultCode != ResultCodeEnum.COMPARE_FALSE )
+                && ( resultCode != ResultCodeEnum.REFERRAL ) )
         {
-            if ( ( realResponse.getLdapResult().getResultCode() != ResultCodeEnum.SUCCESS
)
-                && ( realResponse.getLdapResult().getResultCode() != ResultCodeEnum.COMPARE_TRUE
)
-                && ( realResponse.getLdapResult().getResultCode() != ResultCodeEnum.COMPARE_FALSE
)
-                && ( realResponse.getLdapResult().getResultCode() != ResultCodeEnum.REFERRAL
) )
-            {
-                // Turning on Exit flag
-                exit = true;
-            }
+            // Turning on Exit flag
+            exit = true;
         }
     }
 

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/Dsmlv2ResponseGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/Dsmlv2ResponseGrammar.java?rev=945438&r1=945437&r2=945438&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/Dsmlv2ResponseGrammar.java
(original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/Dsmlv2ResponseGrammar.java
Mon May 17 23:38:38 2010
@@ -1389,13 +1389,10 @@ public class Dsmlv2ResponseGrammar exten
             }
             // descr
             attributeValue = xpp.getAttributeValue( "", "descr" );
-            if ( attributeValue != null )
-            {
-                if ( DSMLV2_DESCR_TAGS.contains( attributeValue ) == false )
-                {
-                    throw new XmlPullParserException( I18n.err( I18n.ERR_03011, attributeValue
), xpp, null );
-                }
 
+            if ( ( attributeValue != null ) && ( DSMLV2_DESCR_TAGS.contains( attributeValue
) == false ) )
+            {
+                throw new XmlPullParserException( I18n.err( I18n.ERR_03011, attributeValue
), xpp, null );
             }
         }
     };



Mime
View raw message