qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grk...@apache.org
Subject svn commit: r979291 - in /qpid/trunk/qpid/java/common/src: main/java/org/apache/qpid/framing/FieldTable.java test/java/org/apache/qpid/framing/PropertyFieldTableTest.java
Date Mon, 26 Jul 2010 14:09:03 GMT
Author: grkvlt
Date: Mon Jul 26 14:09:03 2010
New Revision: 979291

URL: http://svn.apache.org/viewvc?rev=979291&view=rev
Log:
QPID-2660: Remove AMQFrameDecodingException

Modified:
    qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java
    qpid/trunk/qpid/java/common/src/test/java/org/apache/qpid/framing/PropertyFieldTableTest.java

Modified: qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java?rev=979291&r1=979290&r2=979291&view=diff
==============================================================================
--- qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java (original)
+++ qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java Mon
Jul 26 14:09:03 2010
@@ -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();

Modified: qpid/trunk/qpid/java/common/src/test/java/org/apache/qpid/framing/PropertyFieldTableTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/common/src/test/java/org/apache/qpid/framing/PropertyFieldTableTest.java?rev=979291&r1=979290&r2=979291&view=diff
==============================================================================
--- qpid/trunk/qpid/java/common/src/test/java/org/apache/qpid/framing/PropertyFieldTableTest.java
(original)
+++ qpid/trunk/qpid/java/common/src/test/java/org/apache/qpid/framing/PropertyFieldTableTest.java
Mon Jul 26 14:09:03 2010
@@ -583,28 +583,19 @@ public class PropertyFieldTableTest exte
 
         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"));
+        FieldTable table2 = new FieldTable(buffer, length);
 
-        }
-        catch (AMQFrameDecodingException e)
-        {
-            e.printStackTrace();
-            fail("PFT should be instantiated from bytes." + e.getCause());
-        }
+        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()



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message