Fix checkstyle so the build passes
This commit is contained in:
parent
84e992c2c9
commit
b3aff17f5a
@ -152,8 +152,8 @@ public interface Buf extends Rc<Buf>, BufAccessors {
|
|||||||
*
|
*
|
||||||
* @param offset The writer offset to set.
|
* @param offset The writer offset to set.
|
||||||
* @return This Buf.
|
* @return This Buf.
|
||||||
* @throws IndexOutOfBoundsException if the specified {@code offset} is less than the current {@link #readerOffset()}
|
* @throws IndexOutOfBoundsException if the specified {@code offset} is less than the current
|
||||||
* or greater than {@link #capacity()}.
|
* {@link #readerOffset()} or greater than {@link #capacity()}.
|
||||||
*/
|
*/
|
||||||
Buf writerOffset(int offset);
|
Buf writerOffset(int offset);
|
||||||
|
|
||||||
@ -371,4 +371,4 @@ public interface Buf extends Rc<Buf>, BufAccessors {
|
|||||||
* That is, if {@link #countBorrows()} is not {@code 0}.
|
* That is, if {@link #countBorrows()} is not {@code 0}.
|
||||||
*/
|
*/
|
||||||
void ensureWritable(int size);
|
void ensureWritable(int size);
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,8 @@ package io.netty.buffer.b2;
|
|||||||
/**
|
/**
|
||||||
* This interface is just the primitive data accessor methods that {@link Buf} exposes.
|
* 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.
|
* 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 {
|
public interface BufAccessors {
|
||||||
// <editor-fold defaultstate="collapsed" desc="Primitive accessors interface.">
|
// <editor-fold defaultstate="collapsed" desc="Primitive accessors interface.">
|
||||||
@ -610,4 +611,4 @@ public interface BufAccessors {
|
|||||||
*/
|
*/
|
||||||
Buf setDouble(int woff, double value);
|
Buf setDouble(int woff, double value);
|
||||||
// </editor-fold>
|
// </editor-fold>
|
||||||
}
|
}
|
||||||
|
@ -893,7 +893,7 @@ final class CompositeBuf extends RcSupport<Buf, CompositeBuf> implements Buf {
|
|||||||
|
|
||||||
private int searchOffsets(int index) {
|
private int searchOffsets(int index) {
|
||||||
int i = Arrays.binarySearch(offsets, 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.">
|
// <editor-fold defaultstate="collapsed" desc="Torn buffer access.">
|
||||||
|
@ -853,4 +853,4 @@ class MemSegBuf extends RcSupport<Buf, MemSegBuf> implements Buf {
|
|||||||
return new MemSegBuf(segment, drop, alloc);
|
return new MemSegBuf(segment, drop, alloc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -77,7 +77,7 @@ public interface MemoryManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@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;
|
return (Drop<R>) drop;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ import java.util.concurrent.atomic.LongAdder;
|
|||||||
interface Statics {
|
interface Statics {
|
||||||
Cleaner CLEANER = Cleaner.create();
|
Cleaner CLEANER = Cleaner.create();
|
||||||
LongAdder MEM_USAGE_NATIVE = new LongAdder();
|
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 -> {
|
Drop<Buf> NO_OP_DROP = buf -> {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -3806,4 +3806,4 @@ public class BufTest {
|
|||||||
actual, Double.doubleToRawLongBits(actual)));
|
actual, Double.doubleToRawLongBits(actual)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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;
|
package io.netty.buffer.b2;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
@ -52,4 +67,4 @@ public class ScopeTest {
|
|||||||
list.add(order);
|
list.add(order);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user