checkstyle fixed

pull/4369/head
Nikita Koksharov 3 years ago
parent 837abd93dd
commit 0b3c2820f9

@ -187,7 +187,58 @@
<property name="illegalClassNames" value=" java.lang.Throwable, java.lang.RuntimeException"/>
</module>
<module name="FallThrough"/>
<module name="UnnecessaryParentheses"/>
<module name="UnnecessaryParentheses">
<property name="tokens" value="IDENT"/>
<property name="tokens" value="NUM_DOUBLE"/>
<property name="tokens" value="NUM_FLOAT"/>
<property name="tokens" value="NUM_INT"/>
<property name="tokens" value="NUM_LONG"/>
<property name="tokens" value="STRING_LITERAL"/>
<property name="tokens" value="LITERAL_NULL"/>
<property name="tokens" value="LITERAL_FALSE"/>
<property name="tokens" value="LITERAL_TRUE"/>
<property name="tokens" value="ASSIGN"/>
<property name="tokens" value="BAND_ASSIGN"/>
<property name="tokens" value="BOR_ASSIGN"/>
<property name="tokens" value="BSR_ASSIGN"/>
<property name="tokens" value="BXOR_ASSIGN"/>
<property name="tokens" value="DIV_ASSIGN"/>
<property name="tokens" value="MINUS_ASSIGN"/>
<property name="tokens" value="MOD_ASSIGN"/>
<property name="tokens" value="PLUS_ASSIGN"/>
<property name="tokens" value="SL_ASSIGN"/>
<property name="tokens" value="SR_ASSIGN"/>
<property name="tokens" value="STAR_ASSIGN"/>
<property name="tokens" value="LAMBDA"/>
<property name="tokens" value="TEXT_BLOCK_LITERAL_BEGIN"/>
<property name="tokens" value="LOR"/>
<property name="tokens" value="LITERAL_INSTANCEOF"/>
<property name="tokens" value="GT"/>
<property name="tokens" value="LT"/>
<property name="tokens" value="GE"/>
<property name="tokens" value="LE"/>
<property name="tokens" value="EQUAL"/>
<property name="tokens" value="NOT_EQUAL"/>
<property name="tokens" value="UNARY_MINUS"/>
<property name="tokens" value="UNARY_PLUS"/>
<property name="tokens" value="INC"/>
<property name="tokens" value="DEC"/>
<property name="tokens" value="LNOT"/>
<property name="tokens" value="BNOT"/>
<property name="tokens" value="POST_INC"/>
<property name="tokens" value="POST_DEC"/>
<!--
<property name="tokens" value="LAND"/>
-->
</module>
<!--
<module name="UnnecessarySemicolonAfterOuterTypeDeclaration"/>
<module name="UnnecessarySemicolonAfterTypeMemberDeclaration"/>
<module name="UnnecessarySemicolonInEnumeration"/>
<module name="UnnecessarySemicolonInTryWithResources"/>
<module name="UnusedLocalVariable"/>
-->
<!--module name="FinalLocalVariable"/-->
<!-- Checks for class design -->

@ -431,7 +431,7 @@
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>[8.18,)</version>
<version>10.3</version>
</dependency>
</dependencies>
</plugin>

@ -339,7 +339,7 @@ public class RedissonExecutorService implements RScheduledExecutorService {
}
@Override
public void execute(Runnable...tasks) {
public void execute(Runnable... tasks) {
if (tasks.length == 0) {
throw new NullPointerException("Tasks are not defined");
}
@ -591,7 +591,7 @@ public class RedissonExecutorService implements RScheduledExecutorService {
}
@Override
public RExecutorBatchFuture submit(Callable<?>...tasks) {
public RExecutorBatchFuture submit(Callable<?>... tasks) {
if (tasks.length == 0) {
throw new NullPointerException("Tasks are not defined");
}
@ -630,7 +630,7 @@ public class RedissonExecutorService implements RScheduledExecutorService {
}
@Override
public RExecutorBatchFuture submitAsync(Callable<?>...tasks) {
public RExecutorBatchFuture submitAsync(Callable<?>... tasks) {
if (tasks.length == 0) {
throw new NullPointerException("Tasks are not defined");
}
@ -713,7 +713,7 @@ public class RedissonExecutorService implements RScheduledExecutorService {
}
@Override
public RExecutorBatchFuture submit(Runnable...tasks) {
public RExecutorBatchFuture submit(Runnable... tasks) {
if (tasks.length == 0) {
throw new NullPointerException("Tasks are not defined");
}
@ -740,7 +740,7 @@ public class RedissonExecutorService implements RScheduledExecutorService {
}
@Override
public RExecutorBatchFuture submitAsync(Runnable...tasks) {
public RExecutorBatchFuture submitAsync(Runnable... tasks) {
if (tasks.length == 0) {
throw new NullPointerException("Tasks are not defined");
}

@ -300,7 +300,7 @@ public class RedissonList<V> extends RedissonExpirable implements RList<V> {
return commandExecutor.readAsync(getRawName(), codec, LINDEX, getRawName(), index);
}
public List<V> get(int...indexes) {
public List<V> get(int... indexes) {
return get(getAsync(indexes));
}
@ -352,7 +352,7 @@ public class RedissonList<V> extends RedissonExpirable implements RList<V> {
Arrays.<Object>asList(getRawName(), iteratorName), count);
}
public RFuture<List<V>> getAsync(int...indexes) {
public RFuture<List<V>> getAsync(int... indexes) {
List<Integer> params = new ArrayList<Integer>();
for (Integer index : indexes) {
params.add(index);
@ -918,7 +918,7 @@ public class RedissonList<V> extends RedissonExpirable implements RList<V> {
return addListener("__keyevent@*:linsert", (ListInsertListener) listener, ListInsertListener::onListInsert);
}
return super.addListener(listener);
};
}
@Override
public RFuture<Integer> addListenerAsync(ObjectListener listener) {

@ -349,7 +349,7 @@ public class RedissonListMultimapValues<V> extends RedissonExpirable implements
}
@Override
public List<V> get(int...indexes) {
public List<V> get(int... indexes) {
return get(getAsync(indexes));
}
@ -412,7 +412,7 @@ public class RedissonListMultimapValues<V> extends RedissonExpirable implements
}
@Override
public RFuture<List<V>> getAsync(int...indexes) {
public RFuture<List<V>> getAsync(int... indexes) {
List<Object> params = new ArrayList<Object>();
params.add(System.currentTimeMillis());
params.add(encodeMapKey(key));

@ -403,7 +403,7 @@ public abstract class RedissonObject implements RObject {
return addListener("__keyevent@*:del", (DeletedObjectListener) listener, DeletedObjectListener::onDeleted);
}
throw new IllegalArgumentException();
};
}
@Override
public RFuture<Integer> addListenerAsync(ObjectListener listener) {

@ -65,7 +65,7 @@ public class RedissonPatternTopic implements RPatternTopic {
@Override
public int addListener(PatternStatusListener listener) {
return addListener(new PubSubPatternStatusListener(listener, name));
};
}
@Override
public <T> int addListener(Class<T> type, PatternMessageListener<T> listener) {

@ -272,7 +272,7 @@ public class RedissonPriorityQueue<V> extends RedissonList<V> implements RPriori
return wrapLockedAsync(() -> {
return commandExecutor.writeAsync(getRawName(), codec, command, params);
});
};
}
protected final <T, R> RFuture<R> wrapLockedAsync(Supplier<RFuture<R>> callable) {
long threadId = Thread.currentThread().getId();

@ -1829,7 +1829,7 @@ public class RedissonScoredSortedSet<V> extends RedissonExpirable implements RSc
return addListener("__keyevent@*:zadd", (ScoredSortedSetAddListener) listener, ScoredSortedSetAddListener::onAdd);
}
return super.addListener(listener);
};
}
@Override
public RFuture<Integer> addListenerAsync(ObjectListener listener) {

@ -102,7 +102,7 @@ public class RedissonTopic implements RTopic {
public int addListener(StatusListener listener) {
RFuture<Integer> future = addListenerAsync(listener);
return commandExecutor.get(future.toCompletableFuture());
};
}
@Override
public <M> int addListener(Class<M> type, MessageListener<? extends M> listener) {

@ -69,7 +69,7 @@ public interface RExecutorService extends ExecutorService, RExecutorServiceAsync
* @param tasks - tasks to execute
* @return Future object
*/
RExecutorBatchFuture submit(Callable<?>...tasks);
RExecutorBatchFuture submit(Callable<?>... tasks);
/**
* Synchronously submits a Runnable task for execution asynchronously
@ -116,7 +116,7 @@ public interface RExecutorService extends ExecutorService, RExecutorServiceAsync
* @param tasks - tasks to execute
* @return Future object
*/
RExecutorBatchFuture submit(Runnable...tasks);
RExecutorBatchFuture submit(Runnable... tasks);
/**
* Returns executor name
@ -200,6 +200,6 @@ public interface RExecutorService extends ExecutorService, RExecutorServiceAsync
*
* @param tasks - tasks to execute
*/
void execute(Runnable...tasks);
void execute(Runnable... tasks);
}

@ -98,7 +98,7 @@ public interface RExecutorServiceAsync {
* @param tasks - tasks to execute
* @return Future object
*/
RExecutorBatchFuture submitAsync(Callable<?>...tasks);
RExecutorBatchFuture submitAsync(Callable<?>... tasks);
/**
* Submits task for execution asynchronously
@ -128,6 +128,6 @@ public interface RExecutorServiceAsync {
* @param tasks - tasks to execute
* @return Future object
*/
RExecutorBatchFuture submitAsync(Runnable...tasks);
RExecutorBatchFuture submitAsync(Runnable... tasks);
}

@ -36,7 +36,7 @@ public interface RList<V> extends List<V>, RExpirable, RListAsync<V>, RSortable<
* @param indexes of elements
* @return list of elements
*/
List<V> get(int...indexes);
List<V> get(int... indexes);
/**
* Returns element iterator that can be shared across multiple applications.

@ -34,7 +34,7 @@ public interface RListAsync<V> extends RCollectionAsync<V>, RSortableAsync<List<
* @param indexes of elements
* @return elements
*/
RFuture<List<V>> getAsync(int...indexes);
RFuture<List<V>> getAsync(int... indexes);
/**
* Inserts <code>element</code> after <code>elementToFind</code>

@ -37,7 +37,7 @@ public interface RListReactive<V> extends RCollectionReactive<V>, RSortableReact
* @param indexes of elements
* @return elements
*/
Mono<List<V>> get(int...indexes);
Mono<List<V>> get(int... indexes);
/**
* Add <code>element</code> after <code>elementToFind</code>

@ -39,7 +39,7 @@ public interface RListRx<V> extends RCollectionRx<V>, RSortableRx<List<V>> {
* @param indexes of elements
* @return elements
*/
Single<List<V>> get(int...indexes);
Single<List<V>> get(int... indexes);
/**
* Add <code>element</code> after <code>elementToFind</code>

@ -190,7 +190,7 @@ public class RedisChannelInitializer extends ChannelInitializer<Channel> {
@Override
public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
if (!sslInitDone && (evt instanceof SslHandshakeCompletionEvent)) {
if (!sslInitDone && evt instanceof SslHandshakeCompletionEvent) {
SslHandshakeCompletionEvent e = (SslHandshakeCompletionEvent) evt;
if (e.isSuccess()) {
sslInitDone = true;

@ -161,7 +161,7 @@ public class JsonJacksonCodec extends BaseCodec {
}
// fall through
case OBJECT_AND_NON_CONCRETE:
return (t.getRawClass() == Object.class) || !t.isConcrete();
return t.getRawClass() == Object.class || !t.isConcrete();
case NON_FINAL:
while (t.isArrayType()) {
t = t.getContentType();

@ -65,7 +65,7 @@ public class RedissonMapRxIterator<K, V, M> {
nextValues();
completed = false;
}
};
}
protected void nextValues() {
map.scanIteratorAsync(map.getRawName(), client, nextIterPos, pattern, count).whenComplete((res, e) -> {

Loading…
Cancel
Save