Skip to content

Commit

Permalink
All override methods must be added @OverRide (netty#9285)
Browse files Browse the repository at this point in the history
Motivation:

Some methods that either override others or are implemented as part of implementation an interface did miss the `@Override` annotation

Modifications:

Add missing `@Override`s

Result:

Code cleanup
  • Loading branch information
slievrly authored and normanmaurer committed Jun 27, 2019
1 parent 9621a5b commit 856f118
Show file tree
Hide file tree
Showing 10 changed files with 165 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ protected UnpooledUnsafeDirectByteBuf(ByteBufAllocator alloc, ByteBuffer initial
super(alloc, initialBuffer, maxCapacity, doFree, false);
}

@Override
final void setByteBuffer(ByteBuffer buffer, boolean tryFree) {
super.setByteBuffer(buffer, tryFree);
memoryAddress = PlatformDependent.directBufferAddress(buffer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,13 +271,15 @@ public static ThreadLocalRandom current() {
*
* @throws UnsupportedOperationException always
*/
@Override
public void setSeed(long seed) {
if (initialized) {
throw new UnsupportedOperationException();
}
rnd = (seed ^ multiplier) & mask;
}

@Override
protected int next(int bits) {
rnd = (rnd * multiplier + addend) & mask;
return (int) (rnd >>> (48 - bits));
Expand Down
Loading

0 comments on commit 856f118

Please sign in to comment.