activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From martyntay...@apache.org
Subject [13/17] activemq-artemis git commit: Fix formatting
Date Mon, 24 Oct 2016 13:35:19 GMT
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/c2d4f3ee
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/c2d4f3ee
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/c2d4f3ee

Branch: refs/heads/ARTEMIS-780
Commit: c2d4f3ee14741b6cbb06427bff259a2c21287612
Parents: d6e0e6a
Author: jbertram <jbertram@apache.com>
Authored: Fri Oct 21 11:25:07 2016 -0500
Committer: Martyn Taylor <mtaylor@redhat.com>
Committed: Mon Oct 24 14:33:53 2016 +0100

----------------------------------------------------------------------
 .../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/c2d4f3ee/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/c2d4f3ee/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);


Mime
View raw message