Request for comment: Bug in arraylist iterator using OpenJDK 1.6 #185
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@joeferner This is one problem I have run into while working on promises support. It seems that there has been a latent bug with node-java on OpenJDK 1.6. This bug is demonstrated by calling Iterator.next() on an iterator returned from an ArrayList. A java.lang.InternalError exception is thrown. I coded it up with both Sync calls and Async calls. The async version provides an interesting clue. The async call to next() seems to execute without error, but the callback is called with val undefined. It is then when test.strictEqual(val, 'hello') is called that the exception is thrown.
This bug is not present when using Oracle 1.7 and 1.8 JDKs. We have no interest in support for 1.6, so we won't invest any time in trying to fix this bug. For promises support, I intend to disable affected tests at runtime by checking the system property java.version.