You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ni...@apache.org on 2014/10/09 15:37:33 UTC

[3/6] git commit: Fixing a minor sonar issue - using all-caps for static final variables.

Fixing a minor sonar issue - using all-caps for static final variables.


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/be7e36bb
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/be7e36bb
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/be7e36bb

Branch: refs/heads/container-autoscaling
Commit: be7e36bba1ac41b3d5f2a1ed5c77dec044fc05fe
Parents: 2cffe78
Author: Nirmal Fernando <ni...@gmail.com>
Authored: Thu Oct 9 18:57:35 2014 +0530
Committer: Nirmal Fernando <ni...@gmail.com>
Committed: Thu Oct 9 19:07:04 2014 +0530

----------------------------------------------------------------------
 .../internal/CloudControllerDSComponent.java    | 30 +++++++++-----------
 1 file changed, 13 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/be7e36bb/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/internal/CloudControllerDSComponent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/internal/CloudControllerDSComponent.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/internal/CloudControllerDSComponent.java
index 24ca75c..934788f 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/internal/CloudControllerDSComponent.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/internal/CloudControllerDSComponent.java
@@ -59,7 +59,7 @@ import org.wso2.carbon.utils.ConfigurationContextService;
  */
 public class CloudControllerDSComponent {
 
-	private static final Log log = LogFactory
+	private static final Log LOG = LogFactory
 			.getLog(CloudControllerDSComponent.class);
 
 	protected void activate(ComponentContext context) {
@@ -84,37 +84,35 @@ public class CloudControllerDSComponent {
 			bundleContext.registerService(CloudControllerService.class.getName(),
 			                              new CloudControllerServiceImpl(), null);
 
-			if (log.isInfoEnabled()) {
-				log.info("Scheduling tasks");
+			if (LOG.isInfoEnabled()) {
+				LOG.info("Scheduling tasks");
 			}
 
 			TopologySynchronizerTaskScheduler.schedule(ServiceReferenceHolder
 					                                           .getInstance().getTaskService());
 
 		} catch (Throwable e) {
-			log.error(
-					"******* Cloud Controller Service bundle is failed to activate ****",
-					e);
+			LOG.error("Cloud Controller Service bundle is failed to activate.", e);
 		}
 	}
 
 	protected void setTaskService(TaskService taskService) {
-		if (log.isDebugEnabled()) {
-			log.debug("Setting the Task Service");
+		if (LOG.isDebugEnabled()) {
+			LOG.debug("Setting the Task Service");
 		}
 		ServiceReferenceHolder.getInstance().setTaskService(taskService);
 	}
 
 	protected void unsetTaskService(TaskService taskService) {
-		if (log.isDebugEnabled()) {
-			log.debug("Unsetting the Task Service");
+		if (LOG.isDebugEnabled()) {
+			LOG.debug("Unsetting the Task Service");
 		}
 		ServiceReferenceHolder.getInstance().setTaskService(null);
 	}
 
 	protected void setRegistryService(RegistryService registryService) {
-		if (log.isDebugEnabled()) {
-			log.debug("Setting the Registry Service");
+		if (LOG.isDebugEnabled()) {
+			LOG.debug("Setting the Registry Service");
 		}
 
 		try {
@@ -123,14 +121,14 @@ public class CloudControllerDSComponent {
 			ServiceReferenceHolder.getInstance().setRegistry(registry);
 		} catch (RegistryException e) {
 			String msg = "Failed when retrieving Governance System Registry.";
-			log.error(msg, e);
+			LOG.error(msg, e);
 			throw new CloudControllerException(msg, e);
 		}
 	}
 
 	protected void unsetRegistryService(RegistryService registryService) {
-		if (log.isDebugEnabled()) {
-			log.debug("Unsetting the Registry Service");
+		if (LOG.isDebugEnabled()) {
+			LOG.debug("Unsetting the Registry Service");
 		}
 		ServiceReferenceHolder.getInstance().setRegistry(null);
 	}
@@ -147,8 +145,6 @@ public class CloudControllerDSComponent {
 	}
 
 	protected void deactivate(ComponentContext ctx) {
-		// Close event publisher connections to message broker
-		// EventPublisherPool.close(Constants.TOPOLOGY_TOPIC);
 	}
 
 }