Skip to content

Commit 856f118

Browse files
slievrlynormanmaurer
authored andcommitted
All override methods must be added @OverRide (netty#9285)
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
1 parent 9621a5b commit 856f118

File tree

10 files changed

+165
-4
lines changed

10 files changed

+165
-4
lines changed

buffer/src/main/java/io/netty/buffer/UnpooledUnsafeDirectByteBuf.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ protected UnpooledUnsafeDirectByteBuf(ByteBufAllocator alloc, ByteBuffer initial
6363
super(alloc, initialBuffer, maxCapacity, doFree, false);
6464
}
6565

66+
@Override
6667
final void setByteBuffer(ByteBuffer buffer, boolean tryFree) {
6768
super.setByteBuffer(buffer, tryFree);
6869
memoryAddress = PlatformDependent.directBufferAddress(buffer);

common/src/main/java/io/netty/util/internal/ThreadLocalRandom.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,13 +271,15 @@ public static ThreadLocalRandom current() {
271271
*
272272
* @throws UnsupportedOperationException always
273273
*/
274+
@Override
274275
public void setSeed(long seed) {
275276
if (initialized) {
276277
throw new UnsupportedOperationException();
277278
}
278279
rnd = (seed ^ multiplier) & mask;
279280
}
280281

282+
@Override
281283
protected int next(int bits) {
282284
rnd = (rnd * multiplier + addend) & mask;
283285
return (int) (rnd >>> (48 - bits));

0 commit comments

Comments
 (0)