@@ -34,7 +34,7 @@ public boolean getBoolean(String name) throws JMSException {
3434 if (o == null )
3535 return false ;
3636 else if (o instanceof Boolean )
37- return (( Boolean ) o ). booleanValue () ;
37+ return (Boolean ) o ;
3838 else if (o instanceof String )
3939 return Boolean .parseBoolean ((String ) o );
4040 else
@@ -47,7 +47,7 @@ public byte getByte(String name) throws JMSException {
4747 if (o == null )
4848 throw new NumberFormatException (String .format (UNABLE_TO_CAST , o , "byte" ));
4949 else if (o instanceof Byte )
50- return (( Byte ) o ). byteValue () ;
50+ return (Byte ) o ;
5151 else if (o instanceof String )
5252 return Byte .parseByte ((String ) o );
5353 else
@@ -60,9 +60,9 @@ public short getShort(String name) throws JMSException {
6060 if (o == null )
6161 throw new NumberFormatException (String .format (UNABLE_TO_CAST , o , "short" ));
6262 else if (o instanceof Byte )
63- return (( Byte ) o ). byteValue () ;
63+ return (Byte ) o ;
6464 else if (o instanceof Short )
65- return (( Short ) o ). shortValue () ;
65+ return (Short ) o ;
6666 else if (o instanceof String )
6767 return Short .parseShort ((String ) o );
6868 else
@@ -75,7 +75,7 @@ public char getChar(String name) throws JMSException {
7575 if (o == null )
7676 throw new NumberFormatException (String .format (UNABLE_TO_CAST , o , "char" ));
7777 else if (o instanceof Character )
78- return (( Character ) o ). charValue () ;
78+ return (Character ) o ;
7979 else
8080 throw new MessageFormatException (String .format (UNABLE_TO_CAST , o , "char" ));
8181 }
@@ -86,11 +86,11 @@ public int getInt(String name) throws JMSException {
8686 if (o == null )
8787 throw new NumberFormatException (String .format (UNABLE_TO_CAST , o , "int" ));
8888 else if (o instanceof Byte )
89- return (( Byte ) o ). byteValue () ;
89+ return (Byte ) o ;
9090 else if (o instanceof Short )
91- return (( Short ) o ). shortValue () ;
91+ return (Short ) o ;
9292 else if (o instanceof Integer )
93- return (( Integer ) o ). intValue () ;
93+ return (Integer ) o ;
9494 else if (o instanceof String )
9595 return Integer .parseInt ((String ) o );
9696 else
@@ -103,13 +103,13 @@ public long getLong(String name) throws JMSException {
103103 if (o == null )
104104 throw new NumberFormatException (String .format (UNABLE_TO_CAST , o , "long" ));
105105 else if (o instanceof Byte )
106- return (( Byte ) o ). byteValue () ;
106+ return (Byte ) o ;
107107 else if (o instanceof Short )
108- return (( Short ) o ). shortValue () ;
108+ return (Short ) o ;
109109 else if (o instanceof Integer )
110- return (( Integer ) o ). intValue () ;
110+ return (Integer ) o ;
111111 else if (o instanceof Long )
112- return (( Long ) o ). longValue () ;
112+ return (Long ) o ;
113113 else if (o instanceof String )
114114 return Long .parseLong ((String ) o );
115115 else
@@ -122,7 +122,7 @@ public float getFloat(String name) throws JMSException {
122122 if (o == null )
123123 throw new NumberFormatException (String .format (UNABLE_TO_CAST , o , "float" ));
124124 else if (o instanceof Float ) {
125- return (( Float ) o ). floatValue () ;
125+ return (Float ) o ;
126126 } else if (o instanceof String )
127127 return Float .parseFloat ((String ) o );
128128 else
@@ -135,9 +135,9 @@ public double getDouble(String name) throws JMSException {
135135 if (o == null )
136136 throw new NumberFormatException (String .format (UNABLE_TO_CAST , o , "double" ));
137137 else if (o instanceof Float )
138- return (( Float ) o ). floatValue () ;
138+ return (Float ) o ;
139139 else if (o instanceof Double ) {
140- return (( Double ) o ). doubleValue () ;
140+ return (Double ) o ;
141141 } else if (o instanceof String )
142142 return Double .parseDouble ((String ) o );
143143 else
@@ -263,8 +263,8 @@ public void setBytes(String name, byte[] value, int offset, int length) throws J
263263 @ Override
264264 public void setObject (String name , Object value ) throws JMSException {
265265 checkNotReadonlyBody ();
266- if (name == null && value == null ) {
267- } else if (value == null ) {
266+ if (name == null && value == null ) {
267+ } else if (value == null ) {
268268 this .data .remove (name );
269269 } else if (!(value instanceof Serializable )) {
270270 throw new MessageFormatException (String .format (UNABLE_TO_CAST , value , Serializable .class .getName ()));
@@ -335,25 +335,23 @@ private void writePrimitiveData(Object s, ObjectOutput out, boolean allowSeriali
335335 if (s ==null ) {
336336 throw new NullPointerException ();
337337 } else if (s instanceof Boolean ) {
338- out .writeBoolean ((( Boolean ) s ). booleanValue () );
338+ out .writeBoolean ((Boolean ) s );
339339 } else if (s instanceof Byte ) {
340- out .writeByte ((( Byte ) s ). byteValue () );
340+ out .writeByte ((Byte ) s );
341341 } else if (s instanceof Short ) {
342- out .writeShort (((( Short ) s ). shortValue () ));
342+ out .writeShort (((Short ) s ));
343343 } else if (s instanceof Integer ) {
344- out .writeInt ((( Integer ) s ). intValue () );
344+ out .writeInt ((Integer ) s );
345345 } else if (s instanceof Long ) {
346- out .writeLong ((( Long ) s ). longValue () );
346+ out .writeLong ((Long ) s );
347347 } else if (s instanceof Float ) {
348- out .writeFloat ((( Float ) s ). floatValue () );
348+ out .writeFloat ((Float ) s );
349349 } else if (s instanceof Double ) {
350- out .writeDouble ((( Double ) s ). doubleValue () );
350+ out .writeDouble ((Double ) s );
351351 } else if (s instanceof String ) {
352352 out .writeUTF ((String ) s );
353353 } else if (s instanceof Character ) {
354- out .writeChar (((Character ) s ).charValue ());
355- } else if (s instanceof Character ) {
356- out .writeChar (((Character ) s ).charValue ());
354+ out .writeChar ((Character ) s );
357355 } else if (allowSerializable && s instanceof Serializable ) {
358356 out .writeObject (s );
359357 } else if (s instanceof byte []) {
@@ -372,15 +370,15 @@ protected void writeAmqpBody(ByteArrayOutputStream out) throws IOException {
372370 throw new UnsupportedOperationException ();
373371 }
374372
375- public static final RMQMessage recreate (MapMessage msg ) throws JMSException {
373+ public static RMQMessage recreate (MapMessage msg ) throws JMSException {
376374 RMQMapMessage rmqMMsg = new RMQMapMessage ();
377375 RMQMessage .copyAttributes (rmqMMsg , msg );
378376
379377 copyMapObjects (rmqMMsg , msg );
380378 return rmqMMsg ;
381379 }
382380
383- private static final void copyMapObjects (RMQMapMessage rmqMsg , MapMessage msg ) throws JMSException {
381+ private static void copyMapObjects (RMQMapMessage rmqMsg , MapMessage msg ) throws JMSException {
384382 @ SuppressWarnings ("unchecked" )
385383 Enumeration <String > mapNames = (Enumeration <String >) msg .getMapNames ();
386384 while (mapNames .hasMoreElements ()) {
0 commit comments