Fix checkstyle so the build passes

This commit is contained in:
Chris Vest 2020-11-17 15:25:26 +01:00
parent 84e992c2c9
commit b3aff17f5a
8 changed files with 27 additions and 11 deletions

View File

@ -152,8 +152,8 @@ public interface Buf extends Rc<Buf>, BufAccessors {
*
* @param offset The writer offset to set.
* @return This Buf.
* @throws IndexOutOfBoundsException if the specified {@code offset} is less than the current {@link #readerOffset()}
* or greater than {@link #capacity()}.
* @throws IndexOutOfBoundsException if the specified {@code offset} is less than the current
* {@link #readerOffset()} or greater than {@link #capacity()}.
*/
Buf writerOffset(int offset);
@ -371,4 +371,4 @@ public interface Buf extends Rc<Buf>, BufAccessors {
* That is, if {@link #countBorrows()} is not {@code 0}.
*/
void ensureWritable(int size);
}
}

View File

@ -18,7 +18,8 @@ package io.netty.buffer.b2;
/**
* This interface is just the primitive data accessor methods that {@link Buf} exposes.
* It can be useful if you only need the data access methods, and perhaps wish to decorate or modify their behaviour.
* Usually, you'd use the {@link Buf} interface directly, since this lets you properly control the buffer reference count.
* Usually, you'd use the {@link Buf} interface directly, since this lets you properly control the buffer reference
* count.
*/
public interface BufAccessors {
// <editor-fold defaultstate="collapsed" desc="Primitive accessors interface.">
@ -610,4 +611,4 @@ public interface BufAccessors {
*/
Buf setDouble(int woff, double value);
// </editor-fold>
}
}

View File

@ -893,7 +893,7 @@ final class CompositeBuf extends RcSupport<Buf, CompositeBuf> implements Buf {
private int searchOffsets(int index) {
int i = Arrays.binarySearch(offsets, index);
return i < 0? -(i+2) : i;
return i < 0? -(i + 2) : i;
}
// <editor-fold defaultstate="collapsed" desc="Torn buffer access.">

View File

@ -853,4 +853,4 @@ class MemSegBuf extends RcSupport<Buf, MemSegBuf> implements Buf {
return new MemSegBuf(segment, drop, alloc);
}
}
}
}

View File

@ -77,7 +77,7 @@ public interface MemoryManager {
}
@SuppressWarnings("unchecked")
private static <T,R> Drop<R> convert(Drop<T> drop) {
private static <T, R> Drop<R> convert(Drop<T> drop) {
return (Drop<R>) drop;
}
}

View File

@ -24,7 +24,7 @@ import java.util.concurrent.atomic.LongAdder;
interface Statics {
Cleaner CLEANER = Cleaner.create();
LongAdder MEM_USAGE_NATIVE = new LongAdder();
ConcurrentHashMap<Long,Runnable> CLEANUP_ACTIONS = new ConcurrentHashMap<>();
ConcurrentHashMap<Long, Runnable> CLEANUP_ACTIONS = new ConcurrentHashMap<>();
Drop<Buf> NO_OP_DROP = buf -> {
};

View File

@ -3806,4 +3806,4 @@ public class BufTest {
actual, Double.doubleToRawLongBits(actual)));
}
}
}
}

View File

@ -1,3 +1,18 @@
/*
* Copyright 2020 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.buffer.b2;
import org.junit.Test;
@ -52,4 +67,4 @@ public class ScopeTest {
list.add(order);
}
}
}
}