You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Dejan Bosanac (JIRA)" <ji...@apache.org> on 2008/10/17 12:20:52 UTC
[jira] Created: (AMQ-1981) After adding getText and getProperties
in ActiveMQText.toString(), OpenWire ActiveMQTextMessageTests fail
After adding getText and getProperties in ActiveMQText.toString(), OpenWire ActiveMQTextMessageTests fail
---------------------------------------------------------------------------------------------------------
Key: AMQ-1981
URL: https://issues.apache.org/activemq/browse/AMQ-1981
Project: ActiveMQ
Issue Type: Bug
Reporter: Dejan Bosanac
Assignee: Dejan Bosanac
Fix For: 5.3.0
The problem is that MarshallingSupport.readUTF8() method does not work well when provided byte sequence does not contain UTF8 String. It tries to read size from first two characters and throws heap size exception.
So this will not work:
ActiveMQTextMessage msg = new ActiveMQTextMessage();
msg.setContent(new ByteSequence("test".getBytes()));
msg.getText();
and this is used in tests to set content and marshalled properties of the message.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (AMQ-1981) After adding getText and getProperties
in ActiveMQText.toString(), OpenWire ActiveMQTextMessageTests fail
Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-1981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46547#action_46547 ]
Gary Tully commented on AMQ-1981:
---------------------------------
great, I agree that the tests are at fault here. looks good.
> After adding getText and getProperties in ActiveMQText.toString(), OpenWire ActiveMQTextMessageTests fail
> ---------------------------------------------------------------------------------------------------------
>
> Key: AMQ-1981
> URL: https://issues.apache.org/activemq/browse/AMQ-1981
> Project: ActiveMQ
> Issue Type: Bug
> Reporter: Dejan Bosanac
> Assignee: Dejan Bosanac
> Fix For: 5.3.0
>
>
> The problem is that MarshallingSupport.readUTF8() method does not work well when provided byte sequence does not contain UTF8 String. It tries to read size from first two characters and throws heap size exception.
> So this will not work:
> ActiveMQTextMessage msg = new ActiveMQTextMessage();
> msg.setContent(new ByteSequence("test".getBytes()));
> msg.getText();
> and this is used in tests to set content and marshalled properties of the message.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (AMQ-1981) After adding getText and getProperties
in ActiveMQText.toString(), OpenWire ActiveMQTextMessageTests fail
Posted by "Dejan Bosanac (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-1981?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dejan Bosanac resolved AMQ-1981.
--------------------------------
Resolution: Fixed
Fixed in SVN revision 705547 by changing tests to set utf8 values for content and marshalled properties. All additional reviews and comments are more than welcomed.
> After adding getText and getProperties in ActiveMQText.toString(), OpenWire ActiveMQTextMessageTests fail
> ---------------------------------------------------------------------------------------------------------
>
> Key: AMQ-1981
> URL: https://issues.apache.org/activemq/browse/AMQ-1981
> Project: ActiveMQ
> Issue Type: Bug
> Reporter: Dejan Bosanac
> Assignee: Dejan Bosanac
> Fix For: 5.3.0
>
>
> The problem is that MarshallingSupport.readUTF8() method does not work well when provided byte sequence does not contain UTF8 String. It tries to read size from first two characters and throws heap size exception.
> So this will not work:
> ActiveMQTextMessage msg = new ActiveMQTextMessage();
> msg.setContent(new ByteSequence("test".getBytes()));
> msg.getText();
> and this is used in tests to set content and marshalled properties of the message.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.