You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ma...@apache.org on 2016/11/01 10:21:50 UTC
[21/34] activemq-artemis git commit: Fix formatting
Fix formatting
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/853c5a41
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/853c5a41
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/853c5a41
Branch: refs/heads/ARTEMIS-780
Commit: 853c5a419499cc01f7488cb7a614f6947f378531
Parents: 43db287
Author: jbertram <jb...@apache.com>
Authored: Fri Oct 21 11:25:07 2016 -0500
Committer: Martyn Taylor <mt...@redhat.com>
Committed: Tue Nov 1 10:20:52 2016 +0000
----------------------------------------------------------------------
.../core/persistence/impl/RoutingType.java | 43 --------------------
.../config/XMLConfigurationMigration.java | 26 ++++--------
2 files changed, 8 insertions(+), 61 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/853c5a41/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/RoutingType.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/RoutingType.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/RoutingType.java
deleted file mode 100644
index 329d8e9..0000000
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/RoutingType.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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.
- */
-package org.apache.activemq.artemis.core.persistence.impl;
-
-public enum RoutingType {
- Multicast, Anycast;
-
- public byte getType() {
- switch (this) {
- case Multicast:
- return 0;
- case Anycast:
- return 1;
- default:
- return -1;
- }
- }
-
- public static RoutingType getType(byte type) {
- switch (type) {
- case 0:
- return Multicast;
- case 1:
- return Anycast;
- default:
- return null;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/853c5a41/artemis-tools/src/main/java/org/apache/activemq/artemis/tools/migrate/config/XMLConfigurationMigration.java
----------------------------------------------------------------------
diff --git a/artemis-tools/src/main/java/org/apache/activemq/artemis/tools/migrate/config/XMLConfigurationMigration.java b/artemis-tools/src/main/java/org/apache/activemq/artemis/tools/migrate/config/XMLConfigurationMigration.java
index 56833ea..90be53c 100644
--- a/artemis-tools/src/main/java/org/apache/activemq/artemis/tools/migrate/config/XMLConfigurationMigration.java
+++ b/artemis-tools/src/main/java/org/apache/activemq/artemis/tools/migrate/config/XMLConfigurationMigration.java
@@ -50,19 +50,16 @@ public class XMLConfigurationMigration {
if (args.length == 0) {
System.err.println("Invalid args");
printUsage();
- }
- else {
+ } else {
File input = new File(args[0]);
if (input.isDirectory()) {
System.out.println("Scanning directory: " + input.getAbsolutePath());
recursiveTransform(input);
- }
- else {
+ } else {
if (args.length != 2) {
System.err.println("Invalid args");
printUsage();
- }
- else {
+ } else {
transform(input, new File(args[1]));
}
}
@@ -70,13 +67,11 @@ public class XMLConfigurationMigration {
}
private static void recursiveTransform(File root) throws Exception {
- for ( File file : root.listFiles())
- {
+ for (File file : root.listFiles()) {
scanAndTransform(file);
}
}
-
public static void scanAndTransform(File pFile) throws Exception {
try {
for (File f : pFile.listFiles()) {
@@ -93,14 +88,12 @@ public class XMLConfigurationMigration {
file.renameTo(r);
}
}
- }
- catch (Exception e) {
+ } catch (Exception e) {
//continue
}
}
}
- }
- catch (NullPointerException e) {
+ } catch (NullPointerException e) {
System.out.println(pFile.getAbsoluteFile());
}
}
@@ -125,9 +118,7 @@ public class XMLConfigurationMigration {
migration.write(output, properties);
return true;
}
- }
- catch (Exception e)
- {
+ } catch (Exception e) {
System.err.println("Error tranforming document");
e.printStackTrace();
}
@@ -174,8 +165,7 @@ public class XMLConfigurationMigration {
if (addresses.containsKey(addressName)) {
address = addresses.get(addressName);
- }
- else {
+ } else {
address = new Address();
address.setName(addressName);
addresses.put(addressName, address);