diff options
| author | Robert Godfrey <rgodfrey@apache.org> | 2014-04-24 17:25:16 +0000 |
|---|---|---|
| committer | Robert Godfrey <rgodfrey@apache.org> | 2014-04-24 17:25:16 +0000 |
| commit | 67f29e0685b4bfaa0721a25ae901c3b5e18c0db3 (patch) | |
| tree | 2c835283e855883f2675624288adc6039dea6e21 /qpid/java/broker-core/src | |
| parent | 05473bc92dedd111455f4238a65943951ca6d5ab (diff) | |
| download | qpid-python-67f29e0685b4bfaa0721a25ae901c3b5e18c0db3.tar.gz | |
QPID-5710 : Address review comments from Keith Wall and remove unnecessary classes
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1589801 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/broker-core/src')
2 files changed, 1 insertions, 39 deletions
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/ConfiguredObjectFinder.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/ConfiguredObjectFinder.java deleted file mode 100644 index 6a7d6f8f7b..0000000000 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/ConfiguredObjectFinder.java +++ /dev/null @@ -1,38 +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.qpid.server.model; - -import java.util.Collection; - -public class ConfiguredObjectFinder -{ - public static <C extends ConfiguredObject> C findConfiguredObjectByName(Collection<C> configuredObjects, String name) - { - for (C configuredObject : configuredObjects) - { - if (name.equals(configuredObject.getName())) - { - return configuredObject; - } - } - return null; - } -} diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/VirtualHostTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/VirtualHostTest.java index 26d54761cc..3f4c3e9842 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/VirtualHostTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/VirtualHostTest.java @@ -121,7 +121,7 @@ public class VirtualHostTest extends QpidTestCase host.createChild(Queue.class, arguments); - Queue<?> queue = (Queue<?>) ConfiguredObjectFinder.findConfiguredObjectByName(host.getQueues(), queueName); + Queue<?> queue = host.getChildByName(Queue.class, queueName); Object messageGroupKey = queue.getAttribute(Queue.MESSAGE_GROUP_KEY); assertEquals("Unexpected message group key attribute", "mykey", messageGroupKey); |
