You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by or...@apache.org on 2018/02/26 16:41:12 UTC
[2/2] qpid-broker-j git commit: QPID-8110: Minor tidy-up
QPID-8110: Minor tidy-up
(cherry picked from commit 51472013e85fc66ff99d59c80e402261f5775ac5)
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/f57f6deb
Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/f57f6deb
Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/f57f6deb
Branch: refs/heads/7.0.x
Commit: f57f6deb190066a76a6a3e6ed449b88471b07d0d
Parents: 3bbf01a
Author: Keith Wall <kw...@apache.org>
Authored: Fri Feb 23 18:14:49 2018 +0000
Committer: Alex Rudyy <or...@apache.org>
Committed: Mon Feb 26 16:39:01 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/f57f6deb/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<X extends Broker<X>> extends ConfiguredObject<X>, 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/f57f6deb/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 42a83c1..9eac92f 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
@@ -281,7 +281,7 @@ public class BrokerImpl extends AbstractContainer<BrokerImpl> implements Broker<
String value = context.get(BROKER_FAIL_STARTUP_WITH_ERRORED_CHILD_SCOPE);
try
{
- DescendantType.valueOf(value);
+ DescendantScope.valueOf(value);
}
catch (Exception e)
{
@@ -289,7 +289,7 @@ public class BrokerImpl extends AbstractContainer<BrokerImpl> 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)));
}
}
}
@@ -382,8 +382,8 @@ public class BrokerImpl extends AbstractContainer<BrokerImpl> 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<ConfiguredObject<?>> failedChildren = getChildrenInState(this, State.ERRORED, descendantScope);
if (!failedChildren.isEmpty())
@@ -438,7 +438,7 @@ public class BrokerImpl extends AbstractContainer<BrokerImpl> implements Broker<
private List<ConfiguredObject<?>> getChildrenInState(final ConfiguredObject<?> configuredObject,
final State state,
- final DescendantType descendantScope)
+ final DescendantScope descendantScope)
{
List<ConfiguredObject<?>> foundChildren = new ArrayList<>();
Class<? extends ConfiguredObject> categoryClass = configuredObject.getCategoryClass();
@@ -451,7 +451,7 @@ public class BrokerImpl extends AbstractContainer<BrokerImpl> 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/f57f6deb/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/f57f6deb/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