Showing 657 of 1,068 total issues
Method drain
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
void drain() {
boolean localInnerActive;
long localRequested;
Throwable localError;
synchronized (this) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method requestInner
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
void requestInner(long n) {
if (n < 0L) {
throw new IllegalArgumentException("n >= 0 required but it was " + n);
}
if (n == 0L) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
File OperatorWindowWithSize.java
has 369 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Copyright 2014 Netflix, Inc.
*
* Licensed 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
Actions
has 37 methods (exceeds 20 allowed). Consider refactoring. Open
public final class Actions {
@SuppressWarnings("rawtypes")
private static final EmptyAction EMPTY_ACTION = new EmptyAction();
private Actions() {
Method replay
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void replay(InnerProducer<T> output) {
synchronized (output) {
if (output.emitting) {
output.missed = true;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method call
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void call(final CompletableSubscriber s) {
final CompositeSubscription set = new CompositeSubscription();
s.onSubscribe(set);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method replay
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
void replay() {
synchronized (this) {
if (emitting) {
missed = true;
return;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
SpscLinkedArrayQueue
has 36 methods (exceeds 20 allowed). Consider refactoring. Open
public final class SpscLinkedArrayQueue<T> implements Queue<T> {
static final int MAX_LOOK_AHEAD_STEP = Integer.getInteger("jctools.spsc.max.lookahead.step", 4096);
final AtomicLong producerIndex;
int producerLookAheadStep;
long producerLookAhead;
Method postCompleteDrain
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
static <T, R> void postCompleteDrain(AtomicLong requested, Queue<T> queue, Subscriber<? super R> subscriber, Func1<? super T, ? extends R> exitTransform) {
long r = requested.get();
// Run on a fast-path if the downstream is unbounded
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
SpscUnboundedAtomicArrayQueue
has 35 methods (exceeds 20 allowed). Consider refactoring. Open
public final class SpscUnboundedAtomicArrayQueue<T> implements Queue<T> {
static final int MAX_LOOK_AHEAD_STEP = Integer.getInteger("jctools.spsc.max.lookahead.step", 4096);
final AtomicLong producerIndex;
int producerLookAheadStep;
long producerLookAhead;
AssertableSubscriberObservable
has 35 methods (exceeds 20 allowed). Consider refactoring. Open
public class AssertableSubscriberObservable<T> extends Subscriber<T> implements AssertableSubscriber<T> {
private final TestSubscriber<T> ts;
public AssertableSubscriberObservable(TestSubscriber<T> ts) {
Method drain
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
void drain() {
if (getAndIncrement() != 0) {
return;
}
int missed = 1;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method drain
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
void drain() {
if (getAndIncrement() != 0) {
return;
}
int missed = 1;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method call
has 106 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public void call(final CompletableSubscriber s) {
final CompositeSubscription set = new CompositeSubscription();
s.onSubscribe(set);
Method using
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static <R> Completable using(final Func0<R> resourceFunc0,
final Func1<? super R, ? extends Completable> completableFunc1,
final Action1<? super R> disposer,
final boolean eager) {
requireNonNull(resourceFunc0);
AssertableSubscriber
has 32 methods (exceeds 20 allowed). Consider refactoring. Open
public interface AssertableSubscriber<T> extends Observer<T>, Subscription {
/**
* Allows manually calling the {@code onStart} method of the underlying Subscriber.
*/
Method replay
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void replay() {
// make sure there is only a single thread emitting
synchronized (this) {
if (emitting) {
missed = true;
Method slowPath
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
void slowPath(long n) {
// backpressure is requested
final Subscriber<? super T> o = this.o;
final Iterator<? extends T> it = this.it;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method getPluginImplementationViaProperty
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
/* test */ static Object getPluginImplementationViaProperty(Class<?> pluginClass, Properties propsIn) {
// Make a defensive clone because traversal may fail with ConcurrentModificationException
// if the properties get changed by something outside RxJava.
Properties props = (Properties)propsIn.clone();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method call
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void call(final Subscriber<? super T> child) {
// when true is a marker to say we are ready to resubscribe to source
final AtomicBoolean resumeBoundary = new AtomicBoolean(true);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"