#1 Base64 encoding is used improperly

closed
Colin Crist
None
5
2004-10-25
2004-09-17
Elias Ross
No

File: ./hermes/impl/DefaultXMLHelper.java

The method:

org.apache.commons.codec.binary.Base64.encode

returns a byte array, and so calling toString on it
does not work.

This probably works:

347:
bytesRval.writeUTF(base64Encoder.decode(bytesMessage.getBytes().getBytes()).toString())
;

but not this:

objectRval.setObject(base64Encoder.encode(bostream.toByteArray()).toString())
;

The output appears like this:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<content>
<entry type="3">
<objectMessage JMSPriority="4"
JMSRedelivered="false" JMSTimestamp="1095405886250"
JMSDeliveryMode="2" JMSExpiration="0"
JMSDestination="EJOE" JMSMessageID="ID:36-10954058862503">
<object>[B@1b939d3</object>
</objectMessage>
</entry>
</content>

Discussion

  • Colin Crist
    Colin Crist
    2004-10-13

    • assigned_to: nobody --> colincrist
     
  • Colin Crist
    Colin Crist
    2004-10-25

    Logged In: YES
    user_id=66833

    Fixed in 1.7

     
  • Colin Crist
    Colin Crist
    2004-10-25

    • status: open --> closed