directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smckin...@apache.org
Subject directory-fortress-core git commit: FC-109 - simplify if statements
Date Thu, 04 Jun 2015 21:13:14 GMT
Repository: directory-fortress-core
Updated Branches:
  refs/heads/1.0-RC41 ec2042514 -> 0d7e7601d


FC-109 - simplify if statements


Project: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/commit/0d7e7601
Tree: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/tree/0d7e7601
Diff: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/diff/0d7e7601

Branch: refs/heads/1.0-RC41
Commit: 0d7e7601d0d216315c7b24bcd7afd9998fb92a87
Parents: ec20425
Author: Shawn McKinney <smckinney@apache.org>
Authored: Thu Jun 4 16:13:28 2015 -0500
Committer: Shawn McKinney <smckinney@apache.org>
Committed: Thu Jun 4 16:13:28 2015 -0500

----------------------------------------------------------------------
 .../java/org/apache/directory/fortress/core/util/time/Date.java    | 2 +-
 .../java/org/apache/directory/fortress/core/AuditMgrConsole.java   | 2 +-
 .../java/org/apache/directory/fortress/core/impl/TestUtils.java    | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/0d7e7601/src/main/java/org/apache/directory/fortress/core/util/time/Date.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/util/time/Date.java b/src/main/java/org/apache/directory/fortress/core/util/time/Date.java
index bafa628..193ad58 100755
--- a/src/main/java/org/apache/directory/fortress/core/util/time/Date.java
+++ b/src/main/java/org/apache/directory/fortress/core/util/time/Date.java
@@ -88,7 +88,7 @@ public class Date
                 rc = 0;
             }
         }
-        else if(!noEnd)
+        else
         {
             if (constraint.getBeginDate().compareTo(time.date) <= 0
                 && constraint.getEndDate().compareTo(time.date) >= 0)

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/0d7e7601/src/test/java/org/apache/directory/fortress/core/AuditMgrConsole.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/directory/fortress/core/AuditMgrConsole.java b/src/test/java/org/apache/directory/fortress/core/AuditMgrConsole.java
index 8596c97..a911a9d 100755
--- a/src/test/java/org/apache/directory/fortress/core/AuditMgrConsole.java
+++ b/src/test/java/org/apache/directory/fortress/core/AuditMgrConsole.java
@@ -502,7 +502,7 @@ class AuditMgrConsole
         // Here the sample reqDN=ftOpNm=TOP2_2+ftObjId=002,ftObjNm=TOB2_1,ou=Permissions,ou=RBAC,dc=example,dc=com
         // Will be mapped to objName=TOB2_1, opName=TOP2_2, objId=002, in the returned permission
object.
         Dn dn = new Dn( authZ.getReqDN() );
-        if(dn != null && dn.getRdns() != null && CollectionUtils.isNotEmpty(
dn.getRdns() ) )
+        if( dn.getRdns() != null && CollectionUtils.isNotEmpty( dn.getRdns() ) )
         {
             for( Rdn rdn : dn.getRdns() )
             {

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/0d7e7601/src/test/java/org/apache/directory/fortress/core/impl/TestUtils.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/directory/fortress/core/impl/TestUtils.java b/src/test/java/org/apache/directory/fortress/core/impl/TestUtils.java
index c406b8f..4855837 100755
--- a/src/test/java/org/apache/directory/fortress/core/impl/TestUtils.java
+++ b/src/test/java/org/apache/directory/fortress/core/impl/TestUtils.java
@@ -202,7 +202,7 @@ public class TestUtils extends TestCase
 
             Annotation annotation = field.getAnnotation( MyAnnotation.class );
             //Annotation[] annotations = field.getDeclaredAnnotations();
-            if ( annotation instanceof MyAnnotation )
+            if ( annotation != null )
             {
                 MyAnnotation myAnnotation = ( MyAnnotation ) annotation;
 


Mime
View raw message