From commits-return-43867-archive-asf-public=cust-asf.ponee.io@qpid.apache.org Fri Feb 23 19:15:12 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id C0080180652 for ; Fri, 23 Feb 2018 19:15:11 +0100 (CET) Received: (qmail 62991 invoked by uid 500); 23 Feb 2018 18:15:10 -0000 Mailing-List: contact commits-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@qpid.apache.org Delivered-To: mailing list commits@qpid.apache.org Received: (qmail 62982 invoked by uid 99); 23 Feb 2018 18:15:10 -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; Fri, 23 Feb 2018 18:15:10 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B02CBEB4C0; Fri, 23 Feb 2018 18:15:10 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: kwall@apache.org To: commits@qpid.apache.org Message-Id: <1f1386d09183481c84622d7a149903d4@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: qpid-broker-j git commit: QPID-8110: Minor tidy-up Date: Fri, 23 Feb 2018 18:15:10 +0000 (UTC) Repository: qpid-broker-j Updated Branches: refs/heads/master 20f47fec8 -> 51472013e QPID-8110: Minor tidy-up Project: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/commit/51472013 Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/51472013 Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/51472013 Branch: refs/heads/master Commit: 51472013e85fc66ff99d59c80e402261f5775ac5 Parents: 20f47fe Author: Keith Wall Authored: Fri Feb 23 18:14:49 2018 +0000 Committer: Keith Wall Committed: Fri Feb 23 18:14:49 2018 +0000 ---------------------------------------------------------------------- .../org/apache/qpid/server/model/Broker.java | 2 +- .../apache/qpid/server/model/BrokerImpl.java | 12 ++++----- .../qpid/server/model/DescendantScope.java | 27 ++++++++++++++++++++ .../qpid/server/model/DescendantType.java | 26 ------------------- 4 files changed, 34 insertions(+), 33 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/51472013/broker-core/src/main/java/org/apache/qpid/server/model/Broker.java ---------------------------------------------------------------------- diff --git a/broker-core/src/main/java/org/apache/qpid/server/model/Broker.java b/broker-core/src/main/java/org/apache/qpid/server/model/Broker.java index 3bb26d4..7978b1b 100644 --- a/broker-core/src/main/java/org/apache/qpid/server/model/Broker.java +++ b/broker-core/src/main/java/org/apache/qpid/server/model/Broker.java @@ -101,7 +101,7 @@ public interface Broker> extends ConfiguredObject, EventL boolean DEFAULT_BROKER_FAIL_STARTUP_WITH_ERRORED_CHILD = false; @ManagedContextDefault(name = BROKER_FAIL_STARTUP_WITH_ERRORED_CHILD_SCOPE) - DescendantType DEFAULT_BROKER_FAIL_STARTUP_WITH_ERRORED_CHILD_SCOPE = DescendantType.IMMEDIATE; + DescendantScope DEFAULT_BROKER_FAIL_STARTUP_WITH_ERRORED_CHILD_SCOPE = DescendantScope.IMMEDIATE; @ManagedContextDefault(name = BROKER_MSG_AUTH) boolean DEFAULT_BROKER_MSG_AUTH = false; http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/51472013/broker-core/src/main/java/org/apache/qpid/server/model/BrokerImpl.java ---------------------------------------------------------------------- diff --git a/broker-core/src/main/java/org/apache/qpid/server/model/BrokerImpl.java b/broker-core/src/main/java/org/apache/qpid/server/model/BrokerImpl.java index 62c71b9..fd80a55 100644 --- a/broker-core/src/main/java/org/apache/qpid/server/model/BrokerImpl.java +++ b/broker-core/src/main/java/org/apache/qpid/server/model/BrokerImpl.java @@ -284,7 +284,7 @@ public class BrokerImpl extends AbstractContainer implements Broker< String value = context.get(BROKER_FAIL_STARTUP_WITH_ERRORED_CHILD_SCOPE); try { - DescendantType.valueOf(value); + DescendantScope.valueOf(value); } catch (Exception e) { @@ -292,7 +292,7 @@ public class BrokerImpl extends AbstractContainer implements Broker< "Unsupported value '%s' is specified for context variable '%s'. Please, change it to any of supported : %s", value, BROKER_FAIL_STARTUP_WITH_ERRORED_CHILD_SCOPE, - EnumSet.allOf(DescendantType.class))); + EnumSet.allOf(DescendantScope.class))); } } } @@ -385,8 +385,8 @@ public class BrokerImpl extends AbstractContainer implements Broker< private void performActivation() { - final DescendantType descendantScope = getContextValue(DescendantType.class, - BROKER_FAIL_STARTUP_WITH_ERRORED_CHILD_SCOPE); + final DescendantScope descendantScope = getContextValue(DescendantScope.class, + BROKER_FAIL_STARTUP_WITH_ERRORED_CHILD_SCOPE); List> failedChildren = getChildrenInState(this, State.ERRORED, descendantScope); if (!failedChildren.isEmpty()) @@ -441,7 +441,7 @@ public class BrokerImpl extends AbstractContainer implements Broker< private List> getChildrenInState(final ConfiguredObject configuredObject, final State state, - final DescendantType descendantScope) + final DescendantScope descendantScope) { List> foundChildren = new ArrayList<>(); Class categoryClass = configuredObject.getCategoryClass(); @@ -454,7 +454,7 @@ public class BrokerImpl extends AbstractContainer implements Broker< { foundChildren.add(child); } - if (descendantScope == DescendantType.ALL) + if (descendantScope == DescendantScope.ALL) { foundChildren.addAll(getChildrenInState(child, state, descendantScope)); } http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/51472013/broker-core/src/main/java/org/apache/qpid/server/model/DescendantScope.java ---------------------------------------------------------------------- diff --git a/broker-core/src/main/java/org/apache/qpid/server/model/DescendantScope.java b/broker-core/src/main/java/org/apache/qpid/server/model/DescendantScope.java new file mode 100644 index 0000000..d749ea2 --- /dev/null +++ b/broker-core/src/main/java/org/apache/qpid/server/model/DescendantScope.java @@ -0,0 +1,27 @@ +/* + * + * 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.qpid.server.model; + +public enum DescendantScope +{ + IMMEDIATE, + ALL +} http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/51472013/broker-core/src/main/java/org/apache/qpid/server/model/DescendantType.java ---------------------------------------------------------------------- diff --git a/broker-core/src/main/java/org/apache/qpid/server/model/DescendantType.java b/broker-core/src/main/java/org/apache/qpid/server/model/DescendantType.java deleted file mode 100644 index 66d296a..0000000 --- a/broker-core/src/main/java/org/apache/qpid/server/model/DescendantType.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.apache.qpid.server.model;/* - * - * 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. - * - */ - -public enum DescendantType -{ - IMMEDIATE, - ALL -} --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org For additional commands, e-mail: commits-help@qpid.apache.org