[exo-jcr-commits] exo-jcr SVN: r5504 - core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Jan 24 07:17:41 EST 2012


Author: andrew.plotnikov
Date: 2012-01-24 07:17:40 -0500 (Tue, 24 Jan 2012)
New Revision: 5504

Modified:
   core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/ConversationRegistry.java
   core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/IdentityRegistry.java
Log:
EXOJCR-1725: Fixed the Blocker/Critical violations and the easiest Major ones raised by eXo Quality Level 1.2

Modified: core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/ConversationRegistry.java
===================================================================
--- core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/ConversationRegistry.java	2012-01-24 12:14:04 UTC (rev 5503)
+++ core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/ConversationRegistry.java	2012-01-24 12:17:40 UTC (rev 5504)
@@ -82,15 +82,17 @@
    {
       try
       {
-         ValueParam concurrencyLevel = ip.getValueParam(INIT_PARAM_CONCURRENCY_LEVEL);
-         if (concurrencyLevel != null)
+         if (ip != null)
          {
-            return Integer.valueOf(concurrencyLevel.getValue());
+            ValueParam concurrencyLevel = ip.getValueParam(INIT_PARAM_CONCURRENCY_LEVEL);
+
+            if (concurrencyLevel != null)
+            {
+               return Integer.valueOf(concurrencyLevel.getValue());
+            }
          }
-         else
-         {
-            return DEFAULT_CONCURRENCY_LEVEL;
-         }
+
+         return DEFAULT_CONCURRENCY_LEVEL;
       }
       catch (Exception e)
       {

Modified: core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/IdentityRegistry.java
===================================================================
--- core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/IdentityRegistry.java	2012-01-24 12:14:04 UTC (rev 5503)
+++ core/trunk/exo.core.component.security.core/src/main/java/org/exoplatform/services/security/IdentityRegistry.java	2012-01-24 12:17:40 UTC (rev 5504)
@@ -70,15 +70,17 @@
    {
       try
       {
-         ValueParam concurrencyLevel = params.getValueParam(INIT_PARAM_CONCURRENCY_LEVEL);
-         if (concurrencyLevel != null)
+         if (params != null)
          {
-            return Integer.valueOf(concurrencyLevel.getValue());
+            ValueParam concurrencyLevel = params.getValueParam(INIT_PARAM_CONCURRENCY_LEVEL);
+
+            if (concurrencyLevel != null)
+            {
+               return Integer.valueOf(concurrencyLevel.getValue());
+            }
          }
-         else
-         {
-            return DEFAULT_CONCURRENCY_LEVEL;
-         }
+
+         return DEFAULT_CONCURRENCY_LEVEL;
       }
       catch (Exception e)
       {



More information about the exo-jcr-commits mailing list