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/14 14:11:52 UTC

[jira] Created: (AMQ-1978) ActiveMQTextMessage toString() method to call getText()

ActiveMQTextMessage toString() method to call getText()
-------------------------------------------------------

                 Key: AMQ-1978
                 URL: https://issues.apache.org/activemq/browse/AMQ-1978
             Project: ActiveMQ
          Issue Type: Improvement
          Components: Broker
    Affects Versions: 5.2.0
            Reporter: Dejan Bosanac
            Assignee: Dejan Bosanac
            Priority: Minor
             Fix For: 5.3.0


Currently toString on newly consumed message shows text field has the null value, because getText is never called.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (AMQ-1978) ActiveMQTextMessage toString() method to call getText()

Posted by "Dejan Bosanac (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1978?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dejan Bosanac closed AMQ-1978.
------------------------------

    Resolution: Fixed

Fixed in SVN revision 704508

> ActiveMQTextMessage toString() method to call getText()
> -------------------------------------------------------
>
>                 Key: AMQ-1978
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1978
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: Broker
>    Affects Versions: 5.2.0
>            Reporter: Dejan Bosanac
>            Assignee: Dejan Bosanac
>            Priority: Minor
>             Fix For: 5.3.0
>
>
> Currently toString on newly consumed message shows text field has the null value, because getText is never called.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQ-1978) ActiveMQTextMessage toString() method to call getText()

Posted by "Dejan Bosanac (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-1978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46472#action_46472 ] 

Dejan Bosanac commented on AMQ-1978:
------------------------------------

Yes, makes sense. I've already implemented abc...xyz output in the web console for elements where tool tips don't work (page title, select boxes, etc.).

> ActiveMQTextMessage toString() method to call getText()
> -------------------------------------------------------
>
>                 Key: AMQ-1978
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1978
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: Broker
>    Affects Versions: 5.2.0
>            Reporter: Dejan Bosanac
>            Assignee: Dejan Bosanac
>            Priority: Minor
>             Fix For: 5.3.0
>
>
> Currently toString on newly consumed message shows text field has the null value, because getText is never called.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (AMQ-1978) ActiveMQTextMessage toString() method to call getText()

Posted by "Dejan Bosanac (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1978?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dejan Bosanac resolved AMQ-1978.
--------------------------------

    Resolution: Fixed

Fixed in SVN revision 706299. I've added ability to pass a map of overridden fields to IntrospectionSupport, so I can pass modified text value. All tests look fine.

> ActiveMQTextMessage toString() method to call getText()
> -------------------------------------------------------
>
>                 Key: AMQ-1978
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1978
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: Broker
>    Affects Versions: 5.2.0
>            Reporter: Dejan Bosanac
>            Assignee: Dejan Bosanac
>            Priority: Minor
>             Fix For: 5.3.0
>
>
> Currently toString on newly consumed message shows text field has the null value, because getText is never called.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQ-1978) ActiveMQTextMessage toString() method to call getText()

Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-1978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46468#action_46468 ] 

Gary Tully commented on AMQ-1978:
---------------------------------

A hard limit of 60 could be good, better may be something of the form "abc....xyz" so the beginning and the end of the text are visible.

need for a limit seems to be reflected in the tests, I see a bunch TextMessage related failures like :

-------------------------------------------------------------------------------
Test set: org.apache.activemq.openwire.v1.ActiveMQTextMessageTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.046 sec <<< FAILURE!
testGenerateAndReParsingIsTheSame(org.apache.activemq.openwire.v1.ActiveMQTextMessageTest)  Time elapsed: 0.02 sec  <<< ERROR!
java.lang.OutOfMemoryError: Requested array size exceeds VM limit
        at java.lang.AbstractStringBuilder.<init>(AbstractStringBuilder.java:44)
        at java.lang.StringBuffer.<init>(StringBuffer.java:92)
        at org.apache.activemq.util.MarshallingSupport.readUTF8(MarshallingSupport.java:320)
        at org.apache.activemq.command.ActiveMQTextMessage.getText(ActiveMQTextMessage.java:85)
        at org.apache.activemq.command.ActiveMQTextMessage.toString(ActiveMQTextMessage.java:152)
        at java.lang.String.valueOf(String.java:2615)
        at java.lang.StringBuilder.append(StringBuilder.java:116)
        at org.apache.activemq.openwire.DataFileGeneratorTestSupport.testGenerateAndReParsingIsTheSame(DataFileGeneratorTestSupport.java:97)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at junit.framework.TestCase.runTest(TestCase.java:154)
        at junit.framework.TestCase.runBare(TestCase.java:127)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:118)
        at junit.framework.TestSuite.runTest(TestSuite.java:208)
        at junit.framework.TestSuite.run(TestSuite.java:203)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:210)
        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:135)
        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:160)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:81)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)


> ActiveMQTextMessage toString() method to call getText()
> -------------------------------------------------------
>
>                 Key: AMQ-1978
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1978
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: Broker
>    Affects Versions: 5.2.0
>            Reporter: Dejan Bosanac
>            Assignee: Dejan Bosanac
>            Priority: Minor
>             Fix For: 5.3.0
>
>
> Currently toString on newly consumed message shows text field has the null value, because getText is never called.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQ-1978) ActiveMQTextMessage toString() method to call getText()

Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-1978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46548#action_46548 ] 

Gary Tully commented on AMQ-1978:
---------------------------------

Hi Dejan,
test do indeed look better now.  
I will be cutting 5.2 RC3 early next week but I will hold off till the limits on toString() are implemented if that is ok with you.

> ActiveMQTextMessage toString() method to call getText()
> -------------------------------------------------------
>
>                 Key: AMQ-1978
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1978
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: Broker
>    Affects Versions: 5.2.0
>            Reporter: Dejan Bosanac
>            Assignee: Dejan Bosanac
>            Priority: Minor
>             Fix For: 5.3.0
>
>
> Currently toString on newly consumed message shows text field has the null value, because getText is never called.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (AMQ-1978) ActiveMQTextMessage toString() method to call getText()

Posted by "Hans Bausewein (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1978?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hans Bausewein reopened AMQ-1978:
---------------------------------


But do you really want to have the full text in a toString() value?

I'd limit it to 60 chars or so.

> ActiveMQTextMessage toString() method to call getText()
> -------------------------------------------------------
>
>                 Key: AMQ-1978
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1978
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: Broker
>    Affects Versions: 5.2.0
>            Reporter: Dejan Bosanac
>            Assignee: Dejan Bosanac
>            Priority: Minor
>             Fix For: 5.3.0
>
>
> Currently toString on newly consumed message shows text field has the null value, because getText is never called.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQ-1978) ActiveMQTextMessage toString() method to call getText()

Posted by "Dejan Bosanac (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-1978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46545#action_46545 ] 

Dejan Bosanac commented on AMQ-1978:
------------------------------------

Hi Gary,

this issue is not related to the size of the message but the fact that test set it as regular (instead of utf8) text. I've tackled this in another issue (https://issues.apache.org/activemq/browse/AMQ-1981). Please confirm if these test passes now. I'm still to implement text limit for toString().



> ActiveMQTextMessage toString() method to call getText()
> -------------------------------------------------------
>
>                 Key: AMQ-1978
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1978
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: Broker
>    Affects Versions: 5.2.0
>            Reporter: Dejan Bosanac
>            Assignee: Dejan Bosanac
>            Priority: Minor
>             Fix For: 5.3.0
>
>
> Currently toString on newly consumed message shows text field has the null value, because getText is never called.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQ-1978) ActiveMQTextMessage toString() method to call getText()

Posted by "Dejan Bosanac (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-1978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46550#action_46550 ] 

Dejan Bosanac commented on AMQ-1978:
------------------------------------

No problem Gary. I hope I'll manage to implement it on Monday.

> ActiveMQTextMessage toString() method to call getText()
> -------------------------------------------------------
>
>                 Key: AMQ-1978
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1978
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: Broker
>    Affects Versions: 5.2.0
>            Reporter: Dejan Bosanac
>            Assignee: Dejan Bosanac
>            Priority: Minor
>             Fix For: 5.3.0
>
>
> Currently toString on newly consumed message shows text field has the null value, because getText is never called.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.