Showing 88 of 114 total issues
Method addFieldByAttribute
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private void addFieldByAttribute(final Object pojo, final Field field, final boolean tag,
final String fieldName, final TypeMapper typeMapper) {
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 int replicationFactor, final boolean isDefault);
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 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 String records);
Method enableBatch
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public InfluxDB enableBatch(final int actions, final int flushDuration, final TimeUnit flushDurationTimeUnit,
final ThreadFactory threadFactory,
final BiConsumer<Iterable<Point>, Throwable> exceptionHandler) {
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 int replicationFactor, final boolean isDefault) {
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 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 new HintedHandOffQueueNotEmptyException(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 new AuthorizationFailedException(errorMessage);
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 new CacheMaxMemorySizeExceededException(errorMessage);
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 ((Double) value).intValue();
Avoid too many return
statements within this method. Open
Open
return true;