Conversation
|
This will probably need to be rebased/changed a little bit after #635 is merged. |
|
Also #615 |
|
Squashed and rebased on top of current 3.0.x. |
|
|
||
| // Another way is to use relative getters. | ||
| while (buffer.hasRemaining()) { | ||
| assert buffer.get() == (byte) 0xFF; |
There was a problem hiding this comment.
If you don't have assertions enabled (-ea vm argument) this will tight loop since buffer.get() is not evaluated. Maybe we should change these to not use assertions? Either that or we could document that assertions are required.
There was a problem hiding this comment.
Alternatively we could call .get() every time and then assert on whatever it returns separately, i.e.:
while (buffer.hasRemaining()) {
byte b = buffer.get();
assert b == (byte) 0xFF;
}There was a problem hiding this comment.
Went ahead and adopted your suggestion in 2 places where there were risks of tight loops.
|
Looks great! The only thing I think that should be addressed before merge is my comment on asserts other than that this is good to merge! 👍 |
This commit renames the older 'driver-examples' submodule to 'driver-tests'. It contains substantial contributions by Olivier Michallat (@olim7t).
No description provided.