You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kw...@apache.org on 2018/02/23 18:15:10 UTC

qpid-broker-j git commit: QPID-8110: Minor tidy-up

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 <kw...@apache.org>
Authored: Fri Feb 23 18:14:49 2018 +0000
Committer: Keith Wall <kw...@apache.org>
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<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/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<BrokerImpl> 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<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)));
                 }
             }
         }
@@ -385,8 +385,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())
@@ -441,7 +441,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();
@@ -454,7 +454,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/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