diff options
author | Andrew Donald Kennedy <grkvlt@apache.org> | 2010-07-26 14:09:03 +0000 |
---|---|---|
committer | Andrew Donald Kennedy <grkvlt@apache.org> | 2010-07-26 14:09:03 +0000 |
commit | 56cb59d88b24662168d8988d3fac5ef0557149fa (patch) | |
tree | 94ca800e9b8f0f1b1ff6b17eef3392d3b451d213 /java | |
parent | 21e65d042a46778a6494b8fb2acf7ac980e25622 (diff) | |
download | qpid-python-56cb59d88b24662168d8988d3fac5ef0557149fa.tar.gz |
QPID-2660: Remove AMQFrameDecodingException
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@979291 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java')
-rw-r--r-- | java/common/src/main/java/org/apache/qpid/framing/FieldTable.java | 4 | ||||
-rw-r--r-- | java/common/src/test/java/org/apache/qpid/framing/PropertyFieldTableTest.java | 35 |
2 files changed, 14 insertions, 25 deletions
diff --git a/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java b/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java index 4237ab9bd6..b268d03c3c 100644 --- a/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java +++ b/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java @@ -62,10 +62,8 @@ public class FieldTable * * @param buffer the buffer from which to read data. The length byte must be read already * @param length the length of the field table. Must be > 0. - * - * @throws AMQFrameDecodingException if there is an error decoding the table */ - public FieldTable(ByteBuffer buffer, long length) throws AMQFrameDecodingException + public FieldTable(ByteBuffer buffer, long length) { this(); ByteBuffer encodedForm = buffer.slice(); diff --git a/java/common/src/test/java/org/apache/qpid/framing/PropertyFieldTableTest.java b/java/common/src/test/java/org/apache/qpid/framing/PropertyFieldTableTest.java index 66ca43c145..179d371b1b 100644 --- a/java/common/src/test/java/org/apache/qpid/framing/PropertyFieldTableTest.java +++ b/java/common/src/test/java/org/apache/qpid/framing/PropertyFieldTableTest.java @@ -583,28 +583,19 @@ public class PropertyFieldTableTest extends TestCase long length = buffer.getUnsignedInt(); - try - { - FieldTable table2 = new FieldTable(buffer, length); - - Assert.assertEquals((Boolean) true, table2.getBoolean("bool")); - Assert.assertEquals((Byte) Byte.MAX_VALUE, table2.getByte("byte")); - assertBytesEqual(bytes, table2.getBytes("bytes")); - Assert.assertEquals((Character) 'c', table2.getCharacter("char")); - Assert.assertEquals(Double.MAX_VALUE, table2.getDouble("double")); - Assert.assertEquals(Float.MAX_VALUE, table2.getFloat("float")); - Assert.assertEquals((Integer) Integer.MAX_VALUE, table2.getInteger("int")); - Assert.assertEquals((Long) Long.MAX_VALUE, table2.getLong("long")); - Assert.assertEquals((Short) Short.MAX_VALUE, table2.getShort("short")); - Assert.assertEquals("hello", table2.getString("string")); - Assert.assertEquals(null, table2.getString("null-string")); - - } - catch (AMQFrameDecodingException e) - { - e.printStackTrace(); - fail("PFT should be instantiated from bytes." + e.getCause()); - } + FieldTable table2 = new FieldTable(buffer, length); + + Assert.assertEquals((Boolean) true, table2.getBoolean("bool")); + Assert.assertEquals((Byte) Byte.MAX_VALUE, table2.getByte("byte")); + assertBytesEqual(bytes, table2.getBytes("bytes")); + Assert.assertEquals((Character) 'c', table2.getCharacter("char")); + Assert.assertEquals(Double.MAX_VALUE, table2.getDouble("double")); + Assert.assertEquals(Float.MAX_VALUE, table2.getFloat("float")); + Assert.assertEquals((Integer) Integer.MAX_VALUE, table2.getInteger("int")); + Assert.assertEquals((Long) Long.MAX_VALUE, table2.getLong("long")); + Assert.assertEquals((Short) Short.MAX_VALUE, table2.getShort("short")); + Assert.assertEquals("hello", table2.getString("string")); + Assert.assertEquals(null, table2.getString("null-string")); } public void testEncodingSize() |