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-191 - sonar cleanup variable names and javadoc ol type
Date Sun, 09 Oct 2016 17:33:00 GMT
Repository: directory-fortress-core
Updated Branches:
  refs/heads/master 748b2cf6f -> d22fc1bb2


FC-191 - sonar cleanup variable names and javadoc ol type


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

Branch: refs/heads/master
Commit: d22fc1bb20a82126d21054a966a193f21c3fb1fd
Parents: 748b2cf
Author: Shawn McKinney <smckinney@apache.org>
Authored: Sun Oct 9 12:32:51 2016 -0500
Committer: Shawn McKinney <smckinney@apache.org>
Committed: Sun Oct 9 12:32:51 2016 -0500

----------------------------------------------------------------------
 .../core/doc-files/apache-fortress-core.html    |  4 +--
 .../core/doc-files/apache-fortress-web.html     |  4 +--
 .../core/doc-files/ten-minute-guide.html        |  6 ++--
 .../directory/fortress/core/impl/PsoUtil.java   | 17 +++++----
 .../directory/fortress/core/impl/RoleUtil.java  | 18 ++++++----
 .../directory/fortress/core/impl/SDUtil.java    | 18 ++++++----
 .../directory/fortress/core/impl/UsoUtil.java   | 18 ++++++----
 .../core/ldap/LdapConnectionProvider.java       | 10 +++---
 .../directory/fortress/core/rest/RestUtils.java | 18 ++++++----
 .../directory/fortress/core/util/Config.java    | 22 +++++++-----
 .../fortress/core/util/EncryptUtil.java         | 18 ++++++----
 .../directory/fortress/core/util/LdapUtil.java  | 10 +++---
 .../directory/fortress/core/util/RegExUtil.java | 17 +++++----
 .../directory/fortress/core/util/VUtil.java     | 38 +++++++++++++-------
 .../fortress/core/util/cache/CacheMgr.java      | 24 +++++++------
 15 files changed, 145 insertions(+), 97 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d22fc1bb/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 6ec6817..e34c965 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
@@ -216,7 +216,7 @@ mvn test -Pconsole
         This program provides an interfactive console for driving the fortress functions.
It is useful for testing and
         ad-hoc updates to the data.
         <br/><br/>
-        <ol type="a">
+        <ul>
             <li>Start at the Main Menu:
                 <br/><img src="./screenshot-fortress-console-main.png" height="50%"
width="40%"
                           alt="Fortress Console Main"/>
@@ -242,7 +242,7 @@ mvn test -Pconsole
             </li>
             <br/>
             <li>etc</li>
-        </ol>
+        </ul>
     </li>
 
 </ol>

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d22fc1bb/src/main/java/org/apache/directory/fortress/core/doc-files/apache-fortress-web.html
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/doc-files/apache-fortress-web.html
b/src/main/java/org/apache/directory/fortress/core/doc-files/apache-fortress-web.html
index 0fa60e8..8e9b67f 100755
--- a/src/main/java/org/apache/directory/fortress/core/doc-files/apache-fortress-web.html
+++ b/src/main/java/org/apache/directory/fortress/core/doc-files/apache-fortress-web.html
@@ -113,7 +113,7 @@ mvn tomcat:redeploy
     <li>
         Try the various user accounts, notice how each has different policies:
         <br><br>
-        <ol type="a">
+        <ul>
             <li>
                 <b>userId</b>: <i>test</i>, <b>password</b>:
<i>password</i>
             </li>
@@ -129,7 +129,7 @@ mvn tomcat:redeploy
             <li>
                 <b>userId</b>: <i>test3</i>, <b>password</b>:
<i>password</i>
             </li>
-        </ol>
+        </ul>
     </li>
 
     <br/>

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d22fc1bb/src/main/java/org/apache/directory/fortress/core/doc-files/ten-minute-guide.html
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/doc-files/ten-minute-guide.html
b/src/main/java/org/apache/directory/fortress/core/doc-files/ten-minute-guide.html
index a3bbf9d..d7bcccb 100644
--- a/src/main/java/org/apache/directory/fortress/core/doc-files/ten-minute-guide.html
+++ b/src/main/java/org/apache/directory/fortress/core/doc-files/ten-minute-guide.html
@@ -53,7 +53,7 @@ It takes about ten minutes after completing the steps on this page.
 These items are required and must be installed to target machine before any of these tutorial
steps. Instructions cover
 Debian and Fedora system syntax.
 Fortress is written in Java, runs on various platforms, but the others are not be covered
here.
-<ol type="1">
+<ol>
     <li>Java 7 (or greater) sdk installed.</li>
     <li><a href="http://git-scm.com/download/linux">Git Download for Linux and
Unix</a></li>
     <li><a href="http://maven.apache.org/">Apache Maven 3</a></li>
@@ -63,7 +63,7 @@ Fortress is written in Java, runs on various platforms, but the others are
not b
 <h4>Getting Started - Generating the tutorial's how-to guide</h4>
 This tutorial is contained within the javadoc of directory-fortress-core source archive.
To generate, follow these
 instructions:
-<ol type="1">
+<ol>
 
     <li>Clone the directory-fortress repos from apache git:
                 <pre>
@@ -126,7 +126,7 @@ mvn javadoc:javadoc
 </ol>
 <hr/>
 <h4>Infrastructure Installed</h4>
-<ol type="1">
+<ol>
     <li><a href="http://directory.apache.org/apacheds/">Apache Directory Server</a></li>
     <li><a href="http://directory.apache.org/studio/">Apache Directory Studio</a></li>
     <li><a href="http://directory.apache.org/fortress/">Apache Fortress</a></li>

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d22fc1bb/src/main/java/org/apache/directory/fortress/core/impl/PsoUtil.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/impl/PsoUtil.java b/src/main/java/org/apache/directory/fortress/core/impl/PsoUtil.java
index de95100..a10fdee 100755
--- a/src/main/java/org/apache/directory/fortress/core/impl/PsoUtil.java
+++ b/src/main/java/org/apache/directory/fortress/core/impl/PsoUtil.java
@@ -68,17 +68,20 @@ final class PsoUtil
     private static final String CLS_NM = PsoUtil.class.getName();
     private static final Logger LOG = LoggerFactory.getLogger( CLS_NM );
 
-    private static volatile PsoUtil INSTANCE = null; 
+    private static volatile PsoUtil sINSTANCE = null;
 
-    public static PsoUtil getInstance() {
-        if(INSTANCE == null) {
-            synchronized (PsoUtil.class) {
-                if(INSTANCE == null){
-        	        INSTANCE = new PsoUtil();
+    public static PsoUtil getInstance()
+    {
+        if(sINSTANCE == null)
+        {
+            synchronized (PsoUtil.class)
+            {
+                if(sINSTANCE == null){
+        	        sINSTANCE = new PsoUtil();
                 }
             }
         }
-        return INSTANCE;
+        return sINSTANCE;
     }
     
     public PsoUtil(){

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d22fc1bb/src/main/java/org/apache/directory/fortress/core/impl/RoleUtil.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/impl/RoleUtil.java b/src/main/java/org/apache/directory/fortress/core/impl/RoleUtil.java
index d90d466..b14bce2 100755
--- a/src/main/java/org/apache/directory/fortress/core/impl/RoleUtil.java
+++ b/src/main/java/org/apache/directory/fortress/core/impl/RoleUtil.java
@@ -69,17 +69,21 @@ final class RoleUtil implements ParentUtil
     private static final String CLS_NM = RoleUtil.class.getName();
     private static final Logger LOG = LoggerFactory.getLogger( CLS_NM );
 
-    private static volatile RoleUtil INSTANCE = null; 
+    private static volatile RoleUtil sINSTANCE = null;
 
-    public static RoleUtil getInstance() {
-        if(INSTANCE == null) {
-            synchronized (RoleUtil.class) {
-                if(INSTANCE == null){
-        	        INSTANCE = new RoleUtil();
+    public static RoleUtil getInstance()
+    {
+        if(sINSTANCE == null)
+        {
+            synchronized (RoleUtil.class)
+            {
+                if(sINSTANCE == null)
+                {
+        	        sINSTANCE = new RoleUtil();
                 }
             }
         }
-        return INSTANCE;
+        return sINSTANCE;
     }
     
     public RoleUtil(){

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d22fc1bb/src/main/java/org/apache/directory/fortress/core/impl/SDUtil.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/impl/SDUtil.java b/src/main/java/org/apache/directory/fortress/core/impl/SDUtil.java
index 793153c..430de9b 100755
--- a/src/main/java/org/apache/directory/fortress/core/impl/SDUtil.java
+++ b/src/main/java/org/apache/directory/fortress/core/impl/SDUtil.java
@@ -60,17 +60,21 @@ final class SDUtil
     private static final String EMPTY_ELEMENT = "empty";
     private static final String CONTEXT_ID = "contextId";
 
-    private static volatile SDUtil INSTANCE = null; 
+    private static volatile SDUtil sINSTANCE = null;
 
-    public static SDUtil getInstance() {
-        if(INSTANCE == null) {
-            synchronized (SDUtil.class) {
-                if(INSTANCE == null){
-        	        INSTANCE = new SDUtil();
+    public static SDUtil getInstance()
+    {
+        if(sINSTANCE == null)
+        {
+            synchronized (SDUtil.class)
+            {
+                if(sINSTANCE == null)
+                {
+        	        sINSTANCE = new SDUtil();
                 }
             }
         }
-        return INSTANCE;
+        return sINSTANCE;
     }
     
     private void init()

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d22fc1bb/src/main/java/org/apache/directory/fortress/core/impl/UsoUtil.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/impl/UsoUtil.java b/src/main/java/org/apache/directory/fortress/core/impl/UsoUtil.java
index 557c096..ac125f8 100755
--- a/src/main/java/org/apache/directory/fortress/core/impl/UsoUtil.java
+++ b/src/main/java/org/apache/directory/fortress/core/impl/UsoUtil.java
@@ -67,17 +67,21 @@ final class UsoUtil
     private static final String CLS_NM = UsoUtil.class.getName();
     private static final Logger LOG = LoggerFactory.getLogger( CLS_NM );
 
-    private static volatile UsoUtil INSTANCE = null; 
+    private static volatile UsoUtil sINSTANCE = null;
 
-    public static UsoUtil getInstance() {
-        if(INSTANCE == null) {
-            synchronized (UsoUtil.class) {
-                if(INSTANCE == null){
-        	        INSTANCE = new UsoUtil();
+    public static UsoUtil getInstance()
+    {
+        if(sINSTANCE == null)
+        {
+            synchronized (UsoUtil.class)
+            {
+                if(sINSTANCE == null)
+                {
+        	        sINSTANCE = new UsoUtil();
                 }
             }
         }
-        return INSTANCE;
+        return sINSTANCE;
     }
     
     

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d22fc1bb/src/main/java/org/apache/directory/fortress/core/ldap/LdapConnectionProvider.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/ldap/LdapConnectionProvider.java
b/src/main/java/org/apache/directory/fortress/core/ldap/LdapConnectionProvider.java
index caf7d90..b9204af 100644
--- a/src/main/java/org/apache/directory/fortress/core/ldap/LdapConnectionProvider.java
+++ b/src/main/java/org/apache/directory/fortress/core/ldap/LdapConnectionProvider.java
@@ -87,7 +87,7 @@ public class LdapConnectionProvider
      */
     private static LdapConnectionPool userPool;
 
-    private static volatile LdapConnectionProvider INSTANCE = null;
+    private static volatile LdapConnectionProvider sINSTANCE = null;
 
     /**
      * Synchronized getter guards access to reference to self which is a singleton and only
be created the first time invoked.
@@ -96,17 +96,17 @@ public class LdapConnectionProvider
      */
     public static LdapConnectionProvider getInstance()
     {
-        if ( INSTANCE == null )
+        if ( sINSTANCE == null )
         {
             synchronized ( LdapConnectionProvider.class )
             {
-                if ( INSTANCE == null )
+                if ( sINSTANCE == null )
                 {
-                    INSTANCE = new LdapConnectionProvider();
+                    sINSTANCE = new LdapConnectionProvider();
                 }
             }
         }
-        return INSTANCE;
+        return sINSTANCE;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d22fc1bb/src/main/java/org/apache/directory/fortress/core/rest/RestUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/rest/RestUtils.java b/src/main/java/org/apache/directory/fortress/core/rest/RestUtils.java
index 4ebe7ad..7daa4f1 100644
--- a/src/main/java/org/apache/directory/fortress/core/rest/RestUtils.java
+++ b/src/main/java/org/apache/directory/fortress/core/rest/RestUtils.java
@@ -95,17 +95,21 @@ public class RestUtils
     private static String SET_TRUST_STORE_PROP = "trust.store.set.prop";
     private boolean IS_SET_TRUST_STORE_PROP;
 
-    private static volatile RestUtils INSTANCE = null; 
+    private static volatile RestUtils sINSTANCE = null;
 
-    public static RestUtils getInstance() {
-        if(INSTANCE == null) {
-            synchronized (RestUtils.class) {
-                if(INSTANCE == null){
-        	        INSTANCE = new RestUtils();
+    public static RestUtils getInstance()
+    {
+        if(sINSTANCE == null)
+        {
+            synchronized (RestUtils.class)
+            {
+                if(sINSTANCE == null)
+                {
+        	        sINSTANCE = new RestUtils();
                 }
             }
         }
-        return INSTANCE;
+        return sINSTANCE;
     }
     
     private void init()

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d22fc1bb/src/main/java/org/apache/directory/fortress/core/util/Config.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/util/Config.java b/src/main/java/org/apache/directory/fortress/core/util/Config.java
index fa3159e..2a50822 100755
--- a/src/main/java/org/apache/directory/fortress/core/util/Config.java
+++ b/src/main/java/org/apache/directory/fortress/core/util/Config.java
@@ -51,7 +51,7 @@ import org.slf4j.LoggerFactory;
  */
 public final class Config
 {
-    private static PropertiesConfiguration config;
+    private static PropertiesConfiguration config = new PropertiesConfiguration();
     private static final String CLS_NM = Config.class.getName();
     private static final Logger LOG = LoggerFactory.getLogger( CLS_NM );
 
@@ -90,17 +90,21 @@ public final class Config
     private String delimiter;    
     
     
-    private static volatile Config INSTANCE = null;    
+    private static volatile Config sINSTANCE = null;
     
-    public static Config getInstance() {
-        if(INSTANCE == null) {
-            synchronized (Config.class) {
-                if(INSTANCE == null){
-                    INSTANCE = new Config();
+    public static Config getInstance()
+    {
+        if(sINSTANCE == null)
+        {
+            synchronized (Config.class)
+            {
+                if(sINSTANCE == null)
+                {
+                    sINSTANCE = new Config();
                 }
             }
         }
-        return INSTANCE;
+        return sINSTANCE;
     }
     
     private void loadLocalConfig()
@@ -109,7 +113,7 @@ public final class Config
         {
             // Load the system config file.
             URL fUrl = Config.class.getClassLoader().getResource( PROP_FILE );
-            config = new PropertiesConfiguration();
+            //config = new PropertiesConfiguration();
             config.setDelimiterParsingDisabled( true );
             if ( fUrl == null )
             {

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d22fc1bb/src/main/java/org/apache/directory/fortress/core/util/EncryptUtil.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/util/EncryptUtil.java b/src/main/java/org/apache/directory/fortress/core/util/EncryptUtil.java
index a26aa5c..c44a6e6 100755
--- a/src/main/java/org/apache/directory/fortress/core/util/EncryptUtil.java
+++ b/src/main/java/org/apache/directory/fortress/core/util/EncryptUtil.java
@@ -31,17 +31,21 @@ public final class EncryptUtil
     private BasicTextEncryptor textEncryptor;
     private static final String CRYPTO_PROP = "crypto.prop";
     
-    private static volatile EncryptUtil INSTANCE = null; 
+    private static volatile EncryptUtil sINSTANCE = null;
     
-    public static EncryptUtil getInstance() {
-        if(INSTANCE == null) {
-            synchronized (EncryptUtil.class) {
-                if(INSTANCE == null){
-        	        INSTANCE = new EncryptUtil();
+    public static EncryptUtil getInstance()
+    {
+        if(sINSTANCE == null)
+        {
+            synchronized (EncryptUtil.class)
+            {
+                if(sINSTANCE == null)
+                {
+        	        sINSTANCE = new EncryptUtil();
                 }
             }
         }
-        return INSTANCE;
+        return sINSTANCE;
     }
     
     private void init()

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d22fc1bb/src/main/java/org/apache/directory/fortress/core/util/LdapUtil.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/util/LdapUtil.java b/src/main/java/org/apache/directory/fortress/core/util/LdapUtil.java
index 9950fd2..646f362 100644
--- a/src/main/java/org/apache/directory/fortress/core/util/LdapUtil.java
+++ b/src/main/java/org/apache/directory/fortress/core/util/LdapUtil.java
@@ -36,7 +36,7 @@ public class LdapUtil
     private char[] ldapMetaChars;
     private String[] ldapReplVals;
 
-    private static volatile LdapUtil INSTANCE = null;
+    private static volatile LdapUtil sINSTANCE = null;
 
     /**
      * Provided synchronized access to this.
@@ -45,17 +45,17 @@ public class LdapUtil
      */
     public static LdapUtil getInstance()
     {
-        if ( INSTANCE == null )
+        if ( sINSTANCE == null )
         {
             synchronized ( LdapUtil.class )
             {
-                if ( INSTANCE == null )
+                if ( sINSTANCE == null )
                 {
-                    INSTANCE = new LdapUtil();
+                    sINSTANCE = new LdapUtil();
                 }
             }
         }
-        return INSTANCE;
+        return sINSTANCE;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d22fc1bb/src/main/java/org/apache/directory/fortress/core/util/RegExUtil.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/util/RegExUtil.java b/src/main/java/org/apache/directory/fortress/core/util/RegExUtil.java
index a4f0a65..8ef432c 100755
--- a/src/main/java/org/apache/directory/fortress/core/util/RegExUtil.java
+++ b/src/main/java/org/apache/directory/fortress/core/util/RegExUtil.java
@@ -44,17 +44,20 @@ final class RegExUtil
     private String SAFE_TEXT_PATTERN_STRING;
     private static Pattern safeTextPattern;
     
-    private static volatile RegExUtil INSTANCE = null; 
+    private static volatile RegExUtil sINSTANCE = null;
 
-    public static RegExUtil getInstance() {
-        if(INSTANCE == null) {
-            synchronized (RegExUtil.class) {
-                if(INSTANCE == null){
-        	        INSTANCE = new RegExUtil();
+    public static RegExUtil getInstance()
+    {
+        if(sINSTANCE == null)
+        {
+            synchronized (RegExUtil.class)
+            {
+                if(sINSTANCE == null){
+        	        sINSTANCE = new RegExUtil();
                 }
             }
         }
-        return INSTANCE;
+        return sINSTANCE;
     }
     
     private void init() 

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d22fc1bb/src/main/java/org/apache/directory/fortress/core/util/VUtil.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/util/VUtil.java b/src/main/java/org/apache/directory/fortress/core/util/VUtil.java
index 34135d9..4399d5a 100755
--- a/src/main/java/org/apache/directory/fortress/core/util/VUtil.java
+++ b/src/main/java/org/apache/directory/fortress/core/util/VUtil.java
@@ -85,20 +85,24 @@ public final class VUtil implements ConstraintValidator
     private static final String DATE_FORMAT = "yyyyMMdd";
     private static final char SUNDAY = '1';
     private static final char SATURDAY = '7';
-    private static final SimpleDateFormat TIME_FORMATER = new SimpleDateFormat( TIME_FORMAT
);
-    private static final SimpleDateFormat DATE_FORMATER = new SimpleDateFormat( DATE_FORMAT
);
+    private static final SimpleDateFormat TIME_FORMATER = getLenientFormat( TIME_FORMAT );
+    private static final SimpleDateFormat DATE_FORMATER = getLenientFormat( DATE_FORMAT );
 
-    private static volatile VUtil INSTANCE = null; 
+    private static volatile VUtil sINSTANCE = null;
 
-    public static VUtil getInstance() {
-        if(INSTANCE == null) {
-            synchronized (VUtil.class) {
-                if(INSTANCE == null){
-        	        INSTANCE = new VUtil();
+    public static VUtil getInstance()
+    {
+        if(sINSTANCE == null)
+        {
+            synchronized (VUtil.class)
+            {
+                if(sINSTANCE == null)
+                {
+        	        sINSTANCE = new VUtil();
                 }
             }
         }
-        return INSTANCE;
+        return sINSTANCE;
     }
     
     /**
@@ -122,8 +126,6 @@ public final class VUtil implements ConstraintValidator
         {
             maximumFieldLen = Integer.parseInt( lengthProp );
         }
-        TIME_FORMATER.setLenient( false );
-        DATE_FORMATER.setLenient( false );
     }
 
     /**
@@ -801,5 +803,17 @@ public final class VUtil implements ConstraintValidator
             return group.getName();
         }
     }
-    
+
+    /**
+     * Return a simple date formatter that is lenient.
+     *
+     * @param format
+     * @return
+     */
+    private static SimpleDateFormat getLenientFormat(String format)
+    {
+        SimpleDateFormat tformatter = new SimpleDateFormat( format );
+        tformatter.setLenient( false );
+        return tformatter;
+    }
 }

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d22fc1bb/src/main/java/org/apache/directory/fortress/core/util/cache/CacheMgr.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/util/cache/CacheMgr.java b/src/main/java/org/apache/directory/fortress/core/util/cache/CacheMgr.java
index 32bfd2e..c253617 100644
--- a/src/main/java/org/apache/directory/fortress/core/util/cache/CacheMgr.java
+++ b/src/main/java/org/apache/directory/fortress/core/util/cache/CacheMgr.java
@@ -44,21 +44,24 @@ public final class CacheMgr
     private static final String EHCACHE_CONFIG_FILE = "ehcache.config.file";
     private CacheManager mEhCacheImpl;
     
-    private static volatile CacheMgr INSTANCE = null; 
+    private static volatile CacheMgr sINSTANCE = null;
     
     /**
      * Create or return the fortress cache manager reference.
      * @return handle to the cache manager in effect for process.
      */
-    public static CacheMgr getInstance() {
-        if(INSTANCE == null) {
-            synchronized (CacheMgr.class) {
-                if(INSTANCE == null){
-        	        INSTANCE = new CacheMgr();
+    public static CacheMgr getInstance()
+    {
+        if( sINSTANCE == null)
+        {
+            synchronized (CacheMgr.class)
+            {
+                if( sINSTANCE == null){
+        	        sINSTANCE = new CacheMgr();
                 }
             }
         }
-        return INSTANCE;
+        return sINSTANCE;
     }
     
     private void init()
@@ -85,7 +88,6 @@ public final class CacheMgr
     /**
      * Private constructor.
      *
-     * @param cacheMangerImpl contains a reference to cache implementation manager.
      */
     private CacheMgr()
     {
@@ -101,10 +103,12 @@ public final class CacheMgr
     public Cache getCache( String cacheName )
     {    	
         Ehcache cache = mEhCacheImpl.getEhcache( cacheName );
-        if(cache != null){
+        if(cache != null)
+        {
     	    return new EhCacheImpl( cacheName, new BlockingCache(cache) );
         }
-        else{
+        else
+        {
     	    return CacheFactory.createInstance( cacheName, mEhCacheImpl );
         }
     }


Mime
View raw message