Showing 88 of 114 total issues
Method query
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public void query(Query query, int chunkSize, BiConsumer<Cancellable, QueryResult> onNext, Runnable onComplete,
Consumer<Throwable> onFailure);
Method createRetentionPolicy
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public void createRetentionPolicy(final String rpName, final String database, final String duration,
final String shardDuration, final int replicationFactor) {
Method setFieldValue
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private static <T> void setFieldValue(final T object, final Field field, final Object value, final TimeUnit precision,
final TypeMapper typeMapper)
Method query
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public void query(final Query query, final int chunkSize, final BiConsumer<Cancellable, QueryResult> onNext,
final Runnable onComplete, final Consumer<Throwable> onFailure) {
Method write
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public void write(final String database, final String retentionPolicy,
final ConsistencyLevel consistency, final TimeUnit precision, final List<String> records);
Method write
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public void write(final String database, final String retentionPolicy, final ConsistencyLevel consistency,
final TimeUnit precision, final List<String> records) {
Method adaptValue
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private static Object adaptValue(final Class<?> fieldType, final Object value, final TimeUnit precision,
final String fieldName, final String className) {
Method writePoints
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public Call<ResponseBody> writePoints(@Query(DB) String database,
@Query(RP) String retentionPolicy, @Query(PRECISION) String precision,
@Query(CONSISTENCY) String consistency, @Body RequestBody batchPoints);
Method put
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
void put(final AbstractBatchEntry batchEntry) {
try {
if (this.dropActionsOnQueueExhaustion) {
if (!this.queue.offer(batchEntry)) {
this.droppedActionHandler.accept(batchEntry.getPoint());
- 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 field
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
@SuppressWarnings("checkstyle:finalparameters")
@Deprecated
public Builder field(final String field, Object value) {
if (value instanceof Number) {
if (value instanceof Byte) {
- 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
Avoid too many return
statements within this method. Open
Open
return Boolean.valueOf(String.valueOf(value));
Avoid too many return
statements within this method. Open
Open
return ((Double) value).longValue();
Avoid too many return
statements within this method. Open
Open
return false;
Avoid too many return
statements within this method. Open
Open
return false;
Avoid too many return
statements within this method. Open
Open
return Enum.valueOf((Class<Enum>) fieldType, String.valueOf(value));
Avoid too many return
statements within this method. Open
Open
return value;
Avoid too many return
statements within this method. Open
Open
return new AuthorizationFailedException(errorMessage);
Avoid too many return
statements within this method. Open
Open
return Instant.ofEpochMilli(toMillis(((Integer) value).longValue(), precision));
Avoid too many return
statements within this method. Open
Open
return false;
Avoid too many return
statements within this method. Open
Open
return true;