[GitHub] [httpcomponents-core] ufolr commented on issue #195: Fix CharArrayBuffer.subSequence(beganIndex, endIndex) to return right result.
ufolr commented on issue #195: Fix CharArrayBuffer.subSequence(beganIndex,endIndex) to return right result. URL: https://github.com/apache/httpcomponents-core/pull/195#issuecomment-615839174 > @ufolr I am sorry but this is too much so that "sub noodle could be a noodle". Let's just fix the bug and let the rest stay the same. @ok2c OK, I revert the changes about "sub noodle", just fix the wrong result value problem. "sub noodle could be a noodle" is just a suggestion, and does not have to be modified. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services - To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org
[GitHub] [httpcomponents-core] ufolr commented on issue #195: Fix CharArrayBuffer.subSequence(beganIndex, endIndex) to return right result.
ufolr commented on issue #195: Fix CharArrayBuffer.subSequence(beganIndex,endIndex) to return right result. URL: https://github.com/apache/httpcomponents-core/pull/195#issuecomment-615688514 @ok2c Yep. I saw that performance waste of performance. So I make **CharArrayBuffer** can reuse the existing char array by adding an offset pos tag. Now, if there is no write option, the **CharArrayBuffer** will not do allocation or array copy. Just like an **HeapCharBuffer** do. Too do this, I add an constructor `CharArrayBuffer(final char[] b, final int off, final int len)` to `CharArrayBuffer`. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services - To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org
[GitHub] [httpcomponents-core] ufolr commented on issue #195: Fix CharArrayBuffer.subSequence(beganIndex, endIndex) to return right result.
ufolr commented on issue #195: Fix CharArrayBuffer.subSequence(beganIndex,endIndex) to return right result. URL: https://github.com/apache/httpcomponents-core/pull/195#issuecomment-615417887 > > CharArrayBuffer's sub-sequence should return the result as same class of CharArrayBuffer. But' the old implementation use CharBuffer.wrap to make a result which instance of HeapCharBuffer. > > @ufolr Where is this requirement stated anywhere? I could not find any evidence of such requirement in `CharSequence` javadocs. @ok2c There is no specification. Just my suggestion. I think its return should be intuitive. Such as sub noodle is a noodle lol. There maybe some method which accept a **CharArrayBuffer** as parameter, but can't take the sub-sequence result of **CharArrayBuffer**. This will cause me confusion. Anyway, just my suggestion. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services - To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org