ari-ban / issue-test

0 stars 0 forks source link

InvalidMarkException: ByteBufferWrapper forget the mark() after a split() #1874

Closed arinban closed 7 years ago

arinban commented 7 years ago

Depending on how you see things this can be or not be considered as a bug (is this class strictly a Wrapper or some adaptation allowed ?). But this behavior is inconsistent with other Buffer implementations.

ByteBufferWrapper.mark() -> Call byteBuffer.mark(); ByteBufferWrapper.split() -> Call byteBuffer.slice() which clear the previously set mark() (see ByteBuffer javadoc) ByteBufferWrapper.reset() -> call byteBuffer.reset() which throws an InvalidMarkException because the mark has been cleared by the slice()

Affected Versions

[2.3.28]

arinban commented 6 years ago
arinban commented 7 years ago

@glassfishrobot Commented Reported by ylecaillez

arinban commented 7 years ago

@glassfishrobot Commented @rlubke said: Changes applied:

2.3.x: 662c9d5c5315e55db229f402e1ca76b52f7c3628 master: 1aa2b396680c885c7eeef6b5ace0e08a2cf7c05b

arinban commented 7 years ago

@glassfishrobot Commented This issue was imported from java.net JIRA GRIZZLY-1874

arinban commented 7 years ago

@glassfishrobot Commented Marked as fixed on Friday, January 6th 2017, 2:17:28 pm