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-105 - make final, add alt tag, remove redundant null checks
Date Sat, 30 May 2015 12:32:24 GMT
Repository: directory-fortress-core
Updated Branches:
  refs/heads/master 7d3d46dd5 -> eff00738a


FC-105 - make final, add alt tag, remove redundant null checks


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/eff00738
Tree: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/tree/eff00738
Diff: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/diff/eff00738

Branch: refs/heads/master
Commit: eff00738a67d30034e6ab51e3275aa965fab09a9
Parents: 7d3d46d
Author: Shawn McKinney <smckinney@apache.org>
Authored: Sat May 30 07:32:20 2015 -0500
Committer: Shawn McKinney <smckinney@apache.org>
Committed: Sat May 30 07:32:20 2015 -0500

----------------------------------------------------------------------
 .../directory/fortress/core/GlobalErrIds.java   |  2 +-
 .../directory/fortress/core/GlobalIds.java      |  2 +-
 .../directory/fortress/core/cfg/Config.java     | 26 ++++++++++----------
 .../directory/fortress/core/cli/Options.java    |  2 +-
 .../core/doc-files/apache-directory-studio.html |  8 +++---
 .../core/doc-files/apache-fortress-core.html    |  2 +-
 .../fortress/core/doc-files/apache-tomcat.html  |  2 +-
 .../core/ldap/group/GroupMgrFactory.java        |  2 +-
 .../apache/directory/fortress/core/package.html | 14 +++++------
 .../fortress/core/rbac/GlobalPwMsgIds.java      |  2 +-
 .../directory/fortress/core/rbac/Props.java     |  2 +-
 .../fortress/core/util/attr/RegExUtil.java      |  6 ++---
 12 files changed, 35 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/eff00738/src/main/java/org/apache/directory/fortress/core/GlobalErrIds.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/GlobalErrIds.java b/src/main/java/org/apache/directory/fortress/core/GlobalErrIds.java
index a7aaf72..f0530f8 100755
--- a/src/main/java/org/apache/directory/fortress/core/GlobalErrIds.java
+++ b/src/main/java/org/apache/directory/fortress/core/GlobalErrIds.java
@@ -38,7 +38,7 @@ package org.apache.directory.fortress.core;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class GlobalErrIds
+public final class GlobalErrIds
 {
     /**
      * Private constructor

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/eff00738/src/main/java/org/apache/directory/fortress/core/GlobalIds.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/GlobalIds.java b/src/main/java/org/apache/directory/fortress/core/GlobalIds.java
index 44f16da..216cf69 100755
--- a/src/main/java/org/apache/directory/fortress/core/GlobalIds.java
+++ b/src/main/java/org/apache/directory/fortress/core/GlobalIds.java
@@ -36,7 +36,7 @@ import org.apache.directory.fortress.core.cfg.Config;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class GlobalIds
+public final class GlobalIds
 {
     /**
      * Private constructor

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/eff00738/src/main/java/org/apache/directory/fortress/core/cfg/Config.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/cfg/Config.java b/src/main/java/org/apache/directory/fortress/core/cfg/Config.java
index 34e9e8e..5638246 100755
--- a/src/main/java/org/apache/directory/fortress/core/cfg/Config.java
+++ b/src/main/java/org/apache/directory/fortress/core/cfg/Config.java
@@ -48,7 +48,7 @@ import org.apache.directory.fortress.core.SecurityException;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class Config
+public final class Config
 {
     private static final String propFile = "fortress.properties";
     private static final String userPropFile = "fortress.user.properties";
@@ -393,14 +393,14 @@ public class Config
     private static void getExternalConfig()
     {
         String PREFIX = "getExternalConfig override name [{}] value [{}]";
-        // Check to see if the ldap host has been overriden by a system property:
+        // Check to see if the ldap host has been overridden by a system property:
         String szValue = System.getProperty( EXT_LDAP_HOST );
         if( VUtil.isNotNullOrEmpty( szValue ))
         {
             config.setProperty( GlobalIds.LDAP_HOST, szValue );
             LOG.info( PREFIX, GlobalIds.LDAP_HOST, szValue );
         }
-        // Check to see if the ldap port has been overriden by a system property:
+        // Check to see if the ldap port has been overridden by a system property:
         szValue = System.getProperty( EXT_LDAP_PORT );
         if( VUtil.isNotNullOrEmpty( szValue ))
         {
@@ -408,7 +408,7 @@ public class Config
             LOG.info( PREFIX, GlobalIds.LDAP_PORT, szValue );
         }
 
-        // Check to see if the admin pool uid has been overriden by a system property:
+        // Check to see if the admin pool uid has been overridden by a system property:
         szValue = System.getProperty( EXT_LDAP_ADMIN_POOL_UID );
         if( VUtil.isNotNullOrEmpty( szValue ))
         {
@@ -417,7 +417,7 @@ public class Config
             LOG.info( "getExternalConfig override name [{}]", GlobalIds.LDAP_ADMIN_POOL_UID
);
         }
 
-        // Check to see if the admin pool pw has been overriden by a system property:
+        // Check to see if the admin pool pw has been overridden by a system property:
         szValue = System.getProperty( EXT_LDAP_ADMIN_POOL_PW );
         if( VUtil.isNotNullOrEmpty( szValue ))
         {
@@ -426,7 +426,7 @@ public class Config
             LOG.info( "getExternalConfig override name [{}]", GlobalIds.LDAP_ADMIN_POOL_PW
);
         }
 
-        // Check to see if the admin pool min connections has been overriden by a system
property:
+        // Check to see if the admin pool min connections has been overridden by a system
property:
         szValue = System.getProperty( EXT_LDAP_ADMIN_POOL_MIN );
         if( VUtil.isNotNullOrEmpty( szValue ))
         {
@@ -434,7 +434,7 @@ public class Config
             LOG.info( PREFIX, GlobalIds.LDAP_ADMIN_POOL_MIN, szValue );
         }
 
-        // Check to see if the admin pool max connections has been overriden by a system
property:
+        // Check to see if the admin pool max connections has been overridden by a system
property:
         szValue = System.getProperty( EXT_LDAP_ADMIN_POOL_MAX );
         if( VUtil.isNotNullOrEmpty( szValue ))
         {
@@ -442,7 +442,7 @@ public class Config
             LOG.info( PREFIX, GlobalIds.LDAP_ADMIN_POOL_MAX, szValue );
         }
 
-        // Check to see if ssl enabled parameter has been overriden by a system property:
+        // Check to see if ssl enabled parameter has been overridden by a system property:
         szValue = System.getProperty( EXT_ENABLE_LDAP_SSL );
         if( VUtil.isNotNullOrEmpty( szValue ))
         {
@@ -450,7 +450,7 @@ public class Config
             LOG.info( PREFIX, GlobalIds.ENABLE_LDAP_SSL, szValue );
         }
 
-        // Check to see if the ssl debug enabled parameter has been overriden by a system
property:
+        // Check to see if the ssl debug enabled parameter has been overridden by a system
property:
         szValue = System.getProperty( EXT_ENABLE_LDAP_SSL_DEBUG );
         if( VUtil.isNotNullOrEmpty( szValue ))
         {
@@ -458,7 +458,7 @@ public class Config
             LOG.info( PREFIX, GlobalIds.ENABLE_LDAP_SSL_DEBUG, szValue );
         }
 
-        // Check to see if the trust store location has been overriden by a system property:
+        // Check to see if the trust store location has been overridden by a system property:
         szValue = System.getProperty( EXT_TRUST_STORE );
         if( VUtil.isNotNullOrEmpty( szValue ))
         {
@@ -466,7 +466,7 @@ public class Config
             LOG.info( PREFIX, GlobalIds.TRUST_STORE, szValue );
         }
 
-        // Check to see if the trust store password has been overriden by a system property:
+        // Check to see if the trust store password has been overridden by a system property:
         szValue = System.getProperty( EXT_TRUST_STORE_PW );
         if( VUtil.isNotNullOrEmpty( szValue ))
         {
@@ -483,7 +483,7 @@ public class Config
             LOG.info( PREFIX, GlobalIds.SET_TRUST_STORE_PROP, szValue );
         }
 
-        // Check to see if the config realm name has been overriden by a system property:
+        // Check to see if the config realm name has been overridden by a system property:
         szValue = System.getProperty( EXT_CONFIG_REALM );
         if( VUtil.isNotNullOrEmpty( szValue ))
         {
@@ -491,7 +491,7 @@ public class Config
             LOG.info( PREFIX, GlobalIds.CONFIG_REALM, szValue );
         }
 
-        // Check to see if the ldap server type has been overriden by a system property:
+        // Check to see if the ldap server type has been overridden by a system property:
         szValue = System.getProperty( EXT_SERVER_TYPE  );
         if( VUtil.isNotNullOrEmpty( szValue ))
         {

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/eff00738/src/main/java/org/apache/directory/fortress/core/cli/Options.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/cli/Options.java b/src/main/java/org/apache/directory/fortress/core/cli/Options.java
index a08ce45..34aef5d 100755
--- a/src/main/java/org/apache/directory/fortress/core/cli/Options.java
+++ b/src/main/java/org/apache/directory/fortress/core/cli/Options.java
@@ -381,7 +381,7 @@ public class Options implements java.io.Serializable
             for (Object raw : fractionValues)
             {
                 String szRaw = (String) raw;
-                int indx = szRaw.indexOf("=");
+                int indx = szRaw.indexOf('=');
                 if (indx >= 1)
                 {
                     group.addProperty(szRaw.substring(0, indx), szRaw.substring(indx + 1));

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/eff00738/src/main/java/org/apache/directory/fortress/core/doc-files/apache-directory-studio.html
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/doc-files/apache-directory-studio.html
b/src/main/java/org/apache/directory/fortress/core/doc-files/apache-directory-studio.html
index c7c46dc..347b02b 100644
--- a/src/main/java/org/apache/directory/fortress/core/doc-files/apache-directory-studio.html
+++ b/src/main/java/org/apache/directory/fortress/core/doc-files/apache-directory-studio.html
@@ -41,7 +41,7 @@
 <p>
 
 <h3>Setup Apache Directory Studio</h3>
-<img src="apache-studio-logo.jpeg">
+<img src="apache-studio-logo.jpeg" alt="Apache Directory Studio">
 <br/><br/>
 <h4>This section provides instructions to install and configure Apache Directory Studio
LDAP Browser</h4>
 Steps to install:
@@ -90,7 +90,7 @@ cd ApacheDirectoryStudio-linux-x86_64-2.0.0.v20130628/
         'apacheds'. If apache directory server is running locally you may use 'localhost'
and default port is
         '10389'.
     </li>
-    <br/><img src="./connection-create-screenshot1.png" height="75%" width="50%"/><br/><br/>
+    <br/><img src="./connection-create-screenshot1.png" height="75%" width="50%"
alt="Create LDAP Connection"/><br/><br/>
 
     <br/>
 
@@ -98,13 +98,13 @@ cd ApacheDirectoryStudio-linux-x86_64-2.0.0.v20130628/
         The default creds for apache directory server are 'uid=admin,ou=system' and 'secret'
for the password.
         It's a good idea to verify this info by clicking on the 'Check Authentication' button.
     </li>
-    <br/><img src="./connection-create-screenshot2.png" height="75%" width="50%"/><br/><br/>
+    <br/><img src="./connection-create-screenshot2.png" height="75%" width="50%"
alt="Create LDAP Connection 2"/><br/><br/>
 
     <br/>
     <li>
         After all the info has been entered, you should be able to browse the directory.
     </li>
-    <br/><img src="./connection-create-screenshot3.png" height="75%" width="50%"/><br/><br/>
+    <br/><img src="./connection-create-screenshot3.png" height="75%" width="50%"
alt="Create LDAP Connection 3"/><br/><br/>
 </ol>
 </body>
 <p style="font: monospace; color: black; font-size: 6pt">Copyright 2003-2015, The Apache
Software Foundation. All Rights

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/eff00738/src/main/java/org/apache/directory/fortress/core/doc-files/apache-fortress-core.html
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/doc-files/apache-fortress-core.html
b/src/main/java/org/apache/directory/fortress/core/doc-files/apache-fortress-core.html
index efd4c76..3d4a775 100755
--- a/src/main/java/org/apache/directory/fortress/core/doc-files/apache-fortress-core.html
+++ b/src/main/java/org/apache/directory/fortress/core/doc-files/apache-fortress-core.html
@@ -41,7 +41,7 @@
 <p>
 
 <h3>Build Apache Fortress Core</h3>
-<img src="fortress100.gif" alt="Fortress Core">
+<img src="fortress100.gif" alt="Apache Fortress Core">
 <br/><br/>
 <h4>This section provides instructions to install Fortress Core, setup usage with ApacheDS,
and run the junit tests</h4>
 Steps to complete:

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/eff00738/src/main/java/org/apache/directory/fortress/core/doc-files/apache-tomcat.html
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/doc-files/apache-tomcat.html
b/src/main/java/org/apache/directory/fortress/core/doc-files/apache-tomcat.html
index ec9f941..b721014 100755
--- a/src/main/java/org/apache/directory/fortress/core/doc-files/apache-tomcat.html
+++ b/src/main/java/org/apache/directory/fortress/core/doc-files/apache-tomcat.html
@@ -41,7 +41,7 @@
 <p>
 
 <h3>Setup Apache Tomcat Web Server</h3>
-<img src="tomcat.png">
+<img src="tomcat.png" alt="Apache Tomcat">
 <br/><br/>
 This document contains instructions to install Tomcat 7 and configure for use with Fortress
Realm.
 <hr>

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/eff00738/src/main/java/org/apache/directory/fortress/core/ldap/group/GroupMgrFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/ldap/group/GroupMgrFactory.java
b/src/main/java/org/apache/directory/fortress/core/ldap/group/GroupMgrFactory.java
index 8da7cb3..33f6ae5 100755
--- a/src/main/java/org/apache/directory/fortress/core/ldap/group/GroupMgrFactory.java
+++ b/src/main/java/org/apache/directory/fortress/core/ldap/group/GroupMgrFactory.java
@@ -38,7 +38,7 @@ import org.apache.directory.fortress.core.util.attr.VUtil;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class GroupMgrFactory
+public final class GroupMgrFactory
 {
     private static String groupClassName = Config.getProperty( GlobalIds.GROUP_IMPLEMENTATION
);
     private static final String CLS_NM = GroupMgrFactory.class.getName();

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/eff00738/src/main/java/org/apache/directory/fortress/core/package.html
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/package.html b/src/main/java/org/apache/directory/fortress/core/package.html
index 9fe698f..ec52950 100755
--- a/src/main/java/org/apache/directory/fortress/core/package.html
+++ b/src/main/java/org/apache/directory/fortress/core/package.html
@@ -78,22 +78,22 @@
     <h4>RBAC0 - Core</h4>
     Many-to-many relationship between Users, Roles and Permissions. Selective role activation
into sessions.  API to add, update, delete identity data and perform identity and access control
decisions during runtime operations.
     <p/>
-    <img src="./doc-files/RbacCore.png"/>
+    <img src="./doc-files/RbacCore.png" alt="Apache Fortress Core"/>
 
     <h4>RBAC1 - General Hierarchical Roles</h4>
     Simplifies role engineering tasks using inheritance of one or more parent roles.
     <p/>
-    <img src="./doc-files/RbacHier.png"/>
+    <img src="./doc-files/RbacHier.png" alt="Hierarchical RBAC"/>
 
     <h4>RBAC2 - Static Separation of Duty (SSD) Relations</h4>
     Enforce mutual membership exclusions across role assignments.  Facilitate dual control
policies by restricting which roles may be assigned to users in combination.  SSD provide
added granularity for authorization limits which help enterprises meet strict compliance regulations.
     <p/>
-    <img src="./doc-files/RbacSSD.png"/>
+    <img src="./doc-files/RbacSSD.png" alt="RBAC Static Separpation of Duties"/>
 
     <h4>RBAC3 - Dynamic Separation of Duty (DSD) Relations</h4>
     Control allowed role combinations to be activated within an RBAC session.  DSD policies
fine tune role policies that facilitate authorization dual control and two man policy restrictions
during runtime security checks.
     <p/>
-    <img src="./doc-files/RbacDSD.png"/>
+    <img src="./doc-files/RbacDSD.png" alt="RBAC Dynamic Separation of Duties"/>
     <p/>
 
     <hr>
@@ -106,7 +106,7 @@
     and system functions for creating and managing ARBAC attributes on user sessions and
making delegated 
     administrative access control decisions.
     <h4>ARBAC02 Diagram</h4>
-    <img src="./doc-files/ARbac.png"/>
+    <img src="./doc-files/ARbac.png" alt="ARBAC02"/>
     <p/>
     Fortress fully supports the Oh/Sandhu/Zhang ARBAC02 model for delegated administration.
 
     ARBAC provides large enterprises the capability to delegate administrative authority
to 
@@ -142,7 +142,7 @@
     The following is an example of policies that can be configured. There is no limit to
the number of different policies 
     that can be created and enforced.
     <p/>
-    <img src="./doc-files/PasswordPolicy.png"/>
+    <img src="./doc-files/PasswordPolicy.png" alt="Password Policies"/>
     <p/>
 
     <hr>
@@ -157,7 +157,7 @@
     </ol>
 
     <h4>Diagram of Audit Events</h4>
-    <img src="./doc-files/Audit.png"/>
+    <img src="./doc-files/Audit.png" alt="Auditing"/>
     <p/>
     All events include Fortress context, see {@code FortEntity}.
     <p/>

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/eff00738/src/main/java/org/apache/directory/fortress/core/rbac/GlobalPwMsgIds.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/rbac/GlobalPwMsgIds.java b/src/main/java/org/apache/directory/fortress/core/rbac/GlobalPwMsgIds.java
index 6c9fb44..206b77d 100755
--- a/src/main/java/org/apache/directory/fortress/core/rbac/GlobalPwMsgIds.java
+++ b/src/main/java/org/apache/directory/fortress/core/rbac/GlobalPwMsgIds.java
@@ -28,7 +28,7 @@ import java.io.Serializable;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class GlobalPwMsgIds implements Serializable
+public final class GlobalPwMsgIds implements Serializable
 {
     /** Default serialVersionUID */
     private static final long serialVersionUID = 1L;

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/eff00738/src/main/java/org/apache/directory/fortress/core/rbac/Props.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/rbac/Props.java b/src/main/java/org/apache/directory/fortress/core/rbac/Props.java
index d68e666..d0d94cb 100755
--- a/src/main/java/org/apache/directory/fortress/core/rbac/Props.java
+++ b/src/main/java/org/apache/directory/fortress/core/rbac/Props.java
@@ -203,7 +203,7 @@ public class Props extends FortEntity implements Serializable
          */
         public boolean equals( Object obj )
         {
-            if ( obj != null && obj instanceof Props.Entry )
+            if ( obj instanceof Props.Entry )
             {
                 Props.Entry inObj = ( Props.Entry ) obj;
                 return key.equals( inObj.getKey() );

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/eff00738/src/main/java/org/apache/directory/fortress/core/util/attr/RegExUtil.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/util/attr/RegExUtil.java b/src/main/java/org/apache/directory/fortress/core/util/attr/RegExUtil.java
index 2f4d151..7c3852e 100755
--- a/src/main/java/org/apache/directory/fortress/core/util/attr/RegExUtil.java
+++ b/src/main/java/org/apache/directory/fortress/core/util/attr/RegExUtil.java
@@ -43,13 +43,13 @@ final class RegExUtil
     private static final String CLS_NM = RegExUtil.class.getName();
     private static final Logger LOG = LoggerFactory.getLogger( CLS_NM );
     private static final String SAFE_TEXT_PATTERN_STRING = Config.getProperty( GlobalIds.REG_EX_SAFE_TEXT
);
-    private static Pattern SAFE_TEXT_PATTERN;
+    private static Pattern safeTextPattern;
     
     static 
     {
         if ( ( SAFE_TEXT_PATTERN_STRING != null ) && ( SAFE_TEXT_PATTERN_STRING.length()
!= 0 ) )
         {
-            SAFE_TEXT_PATTERN = Pattern.compile( SAFE_TEXT_PATTERN_STRING );
+            safeTextPattern = Pattern.compile( SAFE_TEXT_PATTERN_STRING );
         }
     }
 
@@ -75,7 +75,7 @@ final class RegExUtil
         }
         else
         {
-            Matcher safeTextMatcher = SAFE_TEXT_PATTERN.matcher( value );
+            Matcher safeTextMatcher = safeTextPattern.matcher( value );
             
             if ( !safeTextMatcher.find() )
             {


Mime
View raw message