Re: MessageImplde.decode(ByteBuffer)
On 2 July 2014 16:13, Clebert Suconic wrote: > > On Jul 2, 2014, at 9:09 AM, Robbie Gemmell wrote: > > > I have applied the patch via PROTON-628, but with the original > indentation restored to actually make the change appear as simple as it > really is. > > > > Robbie > > > > - Original Message - > > From: "Clebert Suconic" > > To: proton@qpid.apache.org > > Sent: Thursday, 26 June, 2014 1:13:03 AM > > Subject: MessageImplde.decode(ByteBuffer) > > > > > > > > I have a case where I have a ByteBuffer (which could be a native buffer > (ByteBuffer.allocateNative (whatever method name that is)), and using the > decode (byte[] ) would make me duplicate the byte region. > > > > > > Would be ok if someone merged this simple commit on qpid-proton-j? It's > a very simple change... current code still works. > > > > > > > https://github.com/clebertsuconic/qpid-proton/commit/2515b60ee69cb4d7ee240ff54d311cb8cf763f59 > > > > > > You could make the method as part of the interface if you like.. but I > would be happy on casting MessageImpl for now. > > > > Actually, wouldn't make sense to add this method to the interface as well? > I'm being forced to cast to MessageImpl to use this. I think it would make > sense to have it on the interface Message, but you could optionally add it > to ProtonJMessage I didnt add it at the time since you said you were happy without it for now :) I would possibly also change it first as well to return the count, even though you can figure it out yourself from the buffer, for consistency with the other methods. Robbie
Re: MessageImplde.decode(ByteBuffer)
On Jul 2, 2014, at 9:09 AM, Robbie Gemmell wrote: > I have applied the patch via PROTON-628, but with the original indentation > restored to actually make the change appear as simple as it really is. > > Robbie > > - Original Message - > From: "Clebert Suconic" > To: proton@qpid.apache.org > Sent: Thursday, 26 June, 2014 1:13:03 AM > Subject: MessageImplde.decode(ByteBuffer) > > > > I have a case where I have a ByteBuffer (which could be a native buffer > (ByteBuffer.allocateNative (whatever method name that is)), and using the > decode (byte[] ) would make me duplicate the byte region. > > > Would be ok if someone merged this simple commit on qpid-proton-j? It's a > very simple change... current code still works. > > > https://github.com/clebertsuconic/qpid-proton/commit/2515b60ee69cb4d7ee240ff54d311cb8cf763f59 > > > You could make the method as part of the interface if you like.. but I would > be happy on casting MessageImpl for now. Actually, wouldn't make sense to add this method to the interface as well? I'm being forced to cast to MessageImpl to use this. I think it would make sense to have it on the interface Message, but you could optionally add it to ProtonJMessage
Re: MessageImplde.decode(ByteBuffer)
I have applied the patch via PROTON-628, but with the original indentation restored to actually make the change appear as simple as it really is. Robbie - Original Message - From: "Clebert Suconic" To: proton@qpid.apache.org Sent: Thursday, 26 June, 2014 1:13:03 AM Subject: MessageImplde.decode(ByteBuffer) I have a case where I have a ByteBuffer (which could be a native buffer (ByteBuffer.allocateNative (whatever method name that is)), and using the decode (byte[] ) would make me duplicate the byte region. Would be ok if someone merged this simple commit on qpid-proton-j? It's a very simple change... current code still works. https://github.com/clebertsuconic/qpid-proton/commit/2515b60ee69cb4d7ee240ff54d311cb8cf763f59 You could make the method as part of the interface if you like.. but I would be happy on casting MessageImpl for now.
MessageImplde.decode(ByteBuffer)
I have a case where I have a ByteBuffer (which could be a native buffer (ByteBuffer.allocateNative (whatever method name that is)), and using the decode (byte[] ) would make me duplicate the byte region. Would be ok if someone merged this simple commit on qpid-proton-j? It's a very simple change... current code still works. https://github.com/clebertsuconic/qpid-proton/commit/2515b60ee69cb4d7ee240ff54d311cb8cf763f59 You could make the method as part of the interface if you like.. but I would be happy on casting MessageImpl for now.