You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by la...@apache.org on 2015/04/30 08:16:57 UTC
[08/12] stratos git commit: Fix messaging , CC, Kubs client formatting
Fix messaging , CC, Kubs client formatting
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/8d4dcd22
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/8d4dcd22
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/8d4dcd22
Branch: refs/heads/master
Commit: 8d4dcd224f487f83a62edc553aaabeb6f5c72ad2
Parents: 36b1f8f
Author: Lahiru Sandaruwan <la...@apache.org>
Authored: Wed Apr 29 23:31:28 2015 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Wed Apr 29 23:31:28 2015 +0530
----------------------------------------------------------------------
.../controller/domain/NetworkPartition.java | 4 +--
.../kubernetes/client/rest/RestClient.java | 4 +--
components/org.apache.stratos.messaging/pom.xml | 3 +-
.../broker/connect/amqp/AmqpTopicPublisher.java | 6 ++--
.../messaging/domain/topology/Topology.java | 8 ++---
.../lifecycle/LifeCycleStateManager.java | 2 +-
.../CompleteTopologyMessageProcessor.java | 4 +--
.../messaging/test/AmqpSubscriberTest.java | 4 +--
.../messaging/test/MessageFilterTest.java | 38 ++++++++++----------
9 files changed, 37 insertions(+), 36 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/8d4dcd22/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/NetworkPartition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/NetworkPartition.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/NetworkPartition.java
index bec12b7..85b6179 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/NetworkPartition.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/NetworkPartition.java
@@ -19,11 +19,11 @@
package org.apache.stratos.cloud.controller.domain;
+import org.apache.stratos.common.Properties;
+
import java.io.Serializable;
import java.util.Arrays;
-import org.apache.stratos.common.Properties;
-
/**
* The model class for NetworkPartition definition.
http://git-wip-us.apache.org/repos/asf/stratos/blob/8d4dcd22/components/org.apache.stratos.kubernetes.client/src/main/java/org/apache/stratos/kubernetes/client/rest/RestClient.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.kubernetes.client/src/main/java/org/apache/stratos/kubernetes/client/rest/RestClient.java b/components/org.apache.stratos.kubernetes.client/src/main/java/org/apache/stratos/kubernetes/client/rest/RestClient.java
index 6de8a1f..271f38c 100644
--- a/components/org.apache.stratos.kubernetes.client/src/main/java/org/apache/stratos/kubernetes/client/rest/RestClient.java
+++ b/components/org.apache.stratos.kubernetes.client/src/main/java/org/apache/stratos/kubernetes/client/rest/RestClient.java
@@ -42,7 +42,7 @@ public class RestClient {
/**
* Handle http post request. Return String
*
- * @param resourcePath This should be REST endpoint
+ * @param resourcePath This should be REST endpoint
* @param jsonParamString The json string which should be executed from the post request
* @return The HttpResponse
* @throws Exception if any errors occur when executing the request
@@ -68,7 +68,7 @@ public class RestClient {
* @param resourcePath This should be REST endpoint
* @return The HttpResponse
* @throws org.apache.http.client.ClientProtocolException and IOException
- * if any errors occur when executing the request
+ * if any errors occur when executing the request
*/
public HttpResponse doGet(URI resourcePath) throws Exception {
HttpGet getRequest = null;
http://git-wip-us.apache.org/repos/asf/stratos/blob/8d4dcd22/components/org.apache.stratos.messaging/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/pom.xml b/components/org.apache.stratos.messaging/pom.xml
index 7f9c244..f75f11c 100644
--- a/components/org.apache.stratos.messaging/pom.xml
+++ b/components/org.apache.stratos.messaging/pom.xml
@@ -17,7 +17,8 @@
~ specific language governing permissions and limitations
~ under the License.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.apache.stratos</groupId>
http://git-wip-us.apache.org/repos/asf/stratos/blob/8d4dcd22/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/broker/connect/amqp/AmqpTopicPublisher.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/broker/connect/amqp/AmqpTopicPublisher.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/broker/connect/amqp/AmqpTopicPublisher.java
index 3f75096..370dcf2 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/broker/connect/amqp/AmqpTopicPublisher.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/broker/connect/amqp/AmqpTopicPublisher.java
@@ -95,9 +95,9 @@ public class AmqpTopicPublisher extends AmqpTopicConnector implements TopicPubli
}
// Try to reconnect
reconnect();
- }finally {
+ } finally {
- try{
+ try {
if (topicSession != null) {
topicSession.close();
}
@@ -105,7 +105,7 @@ public class AmqpTopicPublisher extends AmqpTopicConnector implements TopicPubli
topicPublisher.close();
}
- }catch (JMSException e) {
+ } catch (JMSException e) {
message = "Error cleaning up pubisher";
log.error(message, e);
throw new MessagingException(message, e);
http://git-wip-us.apache.org/repos/asf/stratos/blob/8d4dcd22/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Topology.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Topology.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Topology.java
index 3923d0e..2f929bf 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Topology.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Topology.java
@@ -77,19 +77,19 @@ public class Topology implements Serializable {
return this.serviceMap.containsKey(serviceName);
}
- public void addToCluterMap(Cluster cluster){
+ public void addToCluterMap(Cluster cluster) {
this.clusterMap.put(cluster.getClusterId(), cluster);
}
- public void removeFromClusterMap(String cluserId){
+ public void removeFromClusterMap(String cluserId) {
clusterMap.remove(cluserId);
}
- public Cluster getCluster(String clusterId){
+ public Cluster getCluster(String clusterId) {
return this.clusterMap.get(clusterId);
}
- public boolean clusterExist(String clusterId){
+ public boolean clusterExist(String clusterId) {
return clusterMap.get(clusterId) != null;
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/8d4dcd22/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/lifecycle/LifeCycleStateManager.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/lifecycle/LifeCycleStateManager.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/lifecycle/LifeCycleStateManager.java
index fd09de5..40cff06 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/lifecycle/LifeCycleStateManager.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/lifecycle/LifeCycleStateManager.java
@@ -128,7 +128,7 @@ public class LifeCycleStateManager<T extends LifeCycleState> implements Serializ
*/
public T getPreviousState() {
int index = stateStack.size() - 2;
- if((index >= 0) && (index < stateStack.size())) {
+ if ((index >= 0) && (index < stateStack.size())) {
return stateStack.get(index);
}
return null;
http://git-wip-us.apache.org/repos/asf/stratos/blob/8d4dcd22/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/CompleteTopologyMessageProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/CompleteTopologyMessageProcessor.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/CompleteTopologyMessageProcessor.java
index 6d60350..0317378 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/CompleteTopologyMessageProcessor.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/CompleteTopologyMessageProcessor.java
@@ -94,9 +94,9 @@ public class CompleteTopologyMessageProcessor extends MessageProcessor {
for (Cluster cluster : service.getClusters()) {
if (TopologyClusterFilter.apply(cluster.getClusterId())) {
clustersToRemove.add(cluster);
- }else{
+ } else {
// Add non filtered clusters to clusterId-cluster map
- if(!topology.clusterExist(cluster.getClusterId())){
+ if (!topology.clusterExist(cluster.getClusterId())) {
topology.addToCluterMap(cluster);
}
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/8d4dcd22/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/test/AmqpSubscriberTest.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/test/AmqpSubscriberTest.java b/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/test/AmqpSubscriberTest.java
index 3f69b9f..e9ab86d 100644
--- a/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/test/AmqpSubscriberTest.java
+++ b/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/test/AmqpSubscriberTest.java
@@ -49,7 +49,7 @@ public class AmqpSubscriberTest {
private BrokerService broker;
@BeforeClass
- public static void setUp(){
+ public static void setUp() {
// Set jndi.properties.dir system property for initializing event receivers
System.setProperty("jndi.properties.dir", getResourcesFolderPath());
}
@@ -75,7 +75,7 @@ public class AmqpSubscriberTest {
long time1 = System.currentTimeMillis();
broker.start();
long time2 = System.currentTimeMillis();
- log.info(String.format("ActiveMQ started in %d sec", (time2 - time1)/1000));
+ log.info(String.format("ActiveMQ started in %d sec", (time2 - time1) / 1000));
} catch (Exception e) {
throw new RuntimeException("Could not start ActiveMQ", e);
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/8d4dcd22/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/test/MessageFilterTest.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/test/MessageFilterTest.java b/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/test/MessageFilterTest.java
index 579bf5a..2ee08df 100755
--- a/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/test/MessageFilterTest.java
+++ b/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/test/MessageFilterTest.java
@@ -1,20 +1,20 @@
/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
-
- * http://www.apache.org/licenses/LICENSE-2.0
-
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.stratos.messaging.test;
@@ -42,7 +42,7 @@ public class MessageFilterTest {
public final void testFilterIncluded() {
String filterName = "filter1";
String validationError = "MessageFilter.included() method failed";
- System.setProperty(filterName, "property1=value1,value2|property2=value3,value4");
+ System.setProperty(filterName, "property1=value1,value2|property2=value3,value4");
MessageFilter messageFilter = new MessageFilter(filterName);
assertTrue(validationError, messageFilter.included("property1", "value1"));
assertTrue(validationError, messageFilter.included("property1", "value2"));
@@ -55,7 +55,7 @@ public class MessageFilterTest {
public final void testFilterExcluded() {
String filterName = "filter2";
String validationError = "MessageFilter.excluded() method failed";
- System.setProperty(filterName, "property1=value1,value2|property2=value3,value4");
+ System.setProperty(filterName, "property1=value1,value2|property2=value3,value4");
MessageFilter messageFilter = new MessageFilter(filterName);
assertFalse(validationError, messageFilter.excluded("property1", "value1"));
assertFalse(validationError, messageFilter.excluded("property1", "value2"));
@@ -68,7 +68,7 @@ public class MessageFilterTest {
public final void testFilterGetAllPropertyValues() {
String filterName = "filter2";
String validationError = "MessageFilter.getIncludedPropertyValues() method failed";
- System.setProperty(filterName, "property1=value1,value2|property2=value3,value4");
+ System.setProperty(filterName, "property1=value1,value2|property2=value3,value4");
MessageFilter messageFilter = new MessageFilter(filterName);
Collection<String> property1Values = messageFilter.getIncludedPropertyValues("property1");