New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sometimes this library returns a ByteArrayLongString #109

Closed
andrewvc opened this Issue Jan 13, 2017 · 4 comments

Comments

Projects
None yet
2 participants
@andrewvc
Contributor

andrewvc commented Jan 13, 2017

We've received reports from the field that sometimes this lib returns a com.rabbitmq.client.impl.LongStringHelper$ByteArrayLongString. A lot of JRuby code doesn't know how to handle this since it doesn't extend String or any other common object.

I think the correct thing to do is to convert this to a RubyString. @michaelklishin what do you think?

@michaelklishin

This comment has been minimized.

Show comment
Hide comment
@michaelklishin

michaelklishin Jan 13, 2017

Member

Long strings are a protocol "feature" and they are used in property tables (e.g. optional message headers). Sometimes those values are never exposed to March Hare, in others it'd have to coerce arbitrarily nested arguments.

ByteArrayLongString can be easily converted to a java.lang.String. If someone wants to submit a PR, I would consider it.

Member

michaelklishin commented Jan 13, 2017

Long strings are a protocol "feature" and they are used in property tables (e.g. optional message headers). Sometimes those values are never exposed to March Hare, in others it'd have to coerce arbitrarily nested arguments.

ByteArrayLongString can be easily converted to a java.lang.String. If someone wants to submit a PR, I would consider it.

@andrewvc

This comment has been minimized.

Show comment
Hide comment
@andrewvc

andrewvc Jan 13, 2017

Contributor

@michaelklishin I'd much prefer the patch be done here, and am glad to submit a PR for that. The tricky thing from a user perspective is that ruby users are not expecting that object necessarily (which is my case).

Contributor

andrewvc commented Jan 13, 2017

@michaelklishin I'd much prefer the patch be done here, and am glad to submit a PR for that. The tricky thing from a user perspective is that ruby users are not expecting that object necessarily (which is my case).

@michaelklishin

This comment has been minimized.

Show comment
Hide comment
@michaelklishin

michaelklishin Jan 13, 2017

Member

@andrewvc feel free to look into it. Normalizing message headers should be enough for just about everyone.

Member

michaelklishin commented Jan 13, 2017

@andrewvc feel free to look into it. Normalizing message headers should be enough for just about everyone.

@michaelklishin

This comment has been minimized.

Show comment
Hide comment
@michaelklishin

michaelklishin Jan 13, 2017

Member

@andrewvc I agree that March Hare is the right place to address this. Just pointed out that it's easy to convert that "string-ish" object into a java.lang.String.

Member

michaelklishin commented Jan 13, 2017

@andrewvc I agree that March Hare is the right place to address this. Just pointed out that it's easy to convert that "string-ish" object into a java.lang.String.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment