* Java9 ByteBuffer API: desugaring plugin removed, added Api from Java9 #728
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.
Reason for removal
Recent reports in gitter about issues related to desugaring not working in case of subclasses of ByteBuffer. In particular
DirectByteBuffer
. Issue caused in not proper VTable for subclass in particular, methods injected into ByteBuffer during desugaring were not available in subclass. This caused wrong method to be invoked (likeDirectByteBuffer.load()
instead ofByteBuffer.clear()
). The reason of this is the way how VTable is build: soot classes are used as source for methods. But these don't include injected/synthetic method (especially if class was build in previous session). ReworkingVTable
to useclassinfo
instead of soot class is possible but already looks as overcomplicated thing if comparing to override methods.The fix
RoboVM's runtime
ByteBuffer
class was extended with API from Java9, no need in desugaring in this case:Update 6th July
Added covariant Api to following classes