Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compatibility with Java 8 for ByteBuffer #3545

Merged
merged 1 commit into from
Apr 9, 2021

Conversation

artembilan
Copy link
Member

When we build with Java 9+ and target for Java 8,
we get an incompatible bytecode around these method for ByteBuffer:

position(int)
limit(int)
mark()
reset()
clear()
flip()
rewind()

The recommendation is to cast to Buffer when we call these methods

  • Fix all the production code using ByteBuffer for recommended cast to Buffer

Related to https://build.spring.io/browse/INTEXT-AWS-306

See more info in this Jetty issue: jetty/jetty.project#3244

When we build with Java 9+ and target for Java 8,
we get an incompatible bytecode around these method for `ByteBuffer`:

```
position(int)
limit(int)
mark()
reset()
clear()
flip()
rewind()
```

The recommendation is to cast to `Buffer` when we call these methods

* Fix all the production code using `ByteBuffer` for recommended cast to `Buffer`

Related to https://build.spring.io/browse/INTEXT-AWS-306

See more info in this Jetty issue: jetty/jetty.project#3244
@garyrussell
Copy link
Contributor

Also #3470

We must not have any samples that hit any of these other classes 😦

@artembilan
Copy link
Member Author

Yeah... Doesn't matter. It's great to catch it sooner than later. Plus it is just in time for for upcoming RC 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants