Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 78B4B200BB9 for ; Mon, 7 Nov 2016 17:36:26 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 77620160B16; Mon, 7 Nov 2016 16:36:26 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 41C3D160B17 for ; Mon, 7 Nov 2016 17:36:25 +0100 (CET) Received: (qmail 26344 invoked by uid 500); 7 Nov 2016 16:36:24 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 24218 invoked by uid 99); 7 Nov 2016 16:36:22 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Nov 2016 16:36:22 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 3074BF16B8; Mon, 7 Nov 2016 16:36:22 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: clebertsuconic@apache.org To: commits@activemq.apache.org Date: Mon, 07 Nov 2016 16:36:56 -0000 Message-Id: <2660ba270e294081afb5b0d1ee321f2b@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [36/50] [abbrv] activemq-artemis git commit: Fix formatting archived-at: Mon, 07 Nov 2016 16:36:26 -0000 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/bab49b86 Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/bab49b86 Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/bab49b86 Branch: refs/heads/ARTEMIS-780 Commit: bab49b864ea53538d2455689b3caa520e89fee0e Parents: b730828 Author: jbertram Authored: Fri Oct 21 11:25:07 2016 -0500 Committer: Clebert Suconic Committed: Mon Nov 7 11:28:07 2016 -0500 ---------------------------------------------------------------------- .../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/bab49b86/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/bab49b86/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);