question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Netty 5] ByteBuf should be an interface

See original GitHub issue

ByteBuf is currently an abstract class with no state. CompositeByteBuf is a concrete class and could be made to have no state. Before java 1.8 this allowed for evolving the interface over time, but java 1.8 provides support for default methods on interfaces. Having both of these classes be interfaces would make it easier to mock/wrap these classes and ensure all required methods are being implemented.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

7reactions
ijumacommented, Nov 13, 2018

Also need to verify that performance doesn’t suffer from using invokeinterface instead of invokevirtual.

0reactions
ninja-commented, Nov 22, 2018

yeah, it was an interface before and the reason one of you changed it to be abstract class was performance…

Also need to verify that performance doesn’t suffer from using invokeinterface instead of invokevirtual.

Read more comments on GitHub >

github_iconTop Results From Across the Web

New and noteworthy in 5.0 - Netty.docs
New Buffer API replaces ByteBuf · Aliasing is no longer allowed. · Reference counting is effectively gone. · The send method and Send...
Read more >
Chapter 5. ByteBuf - Netty in Action - liveBook · Manning
Interface ByteBufHolder. We often find that we need to store a variety of property values in addition to the actual data payload. An...
Read more >
Found class io.netty.buffer.ByteBuf, but interface was expected
It is a runtime exception telling you that the code found at runtime is fundamentally different from the code that was provided at...
Read more >
netty-buffer 5.0.0.Alpha2 javadoc (io.netty)
You can also extend or wrap existing buffer type to add convenient accessors. The custom buffer type still implements ByteBuf interface rather than ......
Read more >
NettyDataBuffer (Spring Framework 6.0.2 API)
Implementation of the DataBuffer interface that wraps a Netty 4 ByteBuf . Typically constructed with NettyDataBufferFactory . Since: 5.0; Author: Arjen ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found