From 28f390f7fc5e0d271b467bbf8c7bd94c02659562 Mon Sep 17 00:00:00 2001 From: Andrew Donald Kennedy Date: Fri, 13 Aug 2010 16:16:16 +0000 Subject: Tidy up various badly named tests git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@985259 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/qpid/client/AMQSession_0_10.java | 4 +- .../apache/qpid/client/AMQTestConnection_0_10.java | 36 -------------- .../qpid/client/message/FieldTableSupport.java | 54 +++++++++++++++++++++ .../qpid/client/message/FiledTableSupport.java | 56 ---------------------- 4 files changed, 56 insertions(+), 94 deletions(-) delete mode 100644 java/client/src/main/java/org/apache/qpid/client/AMQTestConnection_0_10.java create mode 100644 java/client/src/main/java/org/apache/qpid/client/message/FieldTableSupport.java delete mode 100644 java/client/src/main/java/org/apache/qpid/client/message/FiledTableSupport.java (limited to 'java/client') diff --git a/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java b/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java index 74cd0c8b78..d24ad46512 100644 --- a/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java +++ b/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java @@ -47,7 +47,7 @@ import org.apache.qpid.client.failover.FailoverException; import org.apache.qpid.client.failover.FailoverNoopSupport; import org.apache.qpid.client.failover.FailoverProtectedOperation; import org.apache.qpid.client.message.AMQMessageDelegateFactory; -import org.apache.qpid.client.message.FiledTableSupport; +import org.apache.qpid.client.message.FieldTableSupport; import org.apache.qpid.client.message.MessageFactoryRegistry; import org.apache.qpid.client.message.UnprocessedMessage_0_10; import org.apache.qpid.client.messaging.address.Node.ExchangeNode; @@ -320,7 +320,7 @@ public class AMQSession_0_10 extends AMQSession props) + { + FieldTable ft = new FieldTable(); + if (props != null) + { + for (String key : props.keySet()) + { + ft.setObject(key, props.get(key)); + } + } + return ft; + } + + public static Map convertToMap(FieldTable ft) + { + Map map = new HashMap(); + for (AMQShortString key: ft.keySet() ) + { + map.put(key.asString(), ft.getObject(key)); + } + + return map; + } +} diff --git a/java/client/src/main/java/org/apache/qpid/client/message/FiledTableSupport.java b/java/client/src/main/java/org/apache/qpid/client/message/FiledTableSupport.java deleted file mode 100644 index 5b8a4ce878..0000000000 --- a/java/client/src/main/java/org/apache/qpid/client/message/FiledTableSupport.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.apache.qpid.client.message; -/* - * - * 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. - * - */ - - -import java.util.Enumeration; -import java.util.HashMap; -import java.util.Map; - -import org.apache.qpid.framing.AMQShortString; -import org.apache.qpid.framing.FieldTable; - -public class FiledTableSupport -{ - public static FieldTable convertToFieldTable(Map props) - { - FieldTable ft = new FieldTable(); - if (props != null) - { - for (String key : props.keySet()) - { - ft.setObject(key, props.get(key)); - } - } - return ft; - } - - public static Map convertToMap(FieldTable ft) - { - Map map = new HashMap(); - for (AMQShortString key: ft.keySet() ) - { - map.put(key.asString(), ft.getObject(key)); - } - - return map; - } -} -- cgit v1.2.1