Examples of errors detected by the V6005 diagnostic


V6005. The 'x' variable is assigned to itself.


Huawei Cloud

V6005 The variable 'this.metricSchema' is assigned to itself. OpenTSDBSchema.java(72)


public class OpenTSDBSchema
{
  @JsonProperty("metric")
  private List<SchemaField> metricSchema;
  ....
  public void setMetricsSchema(List<SchemaField> metricsSchema)
  {
    this.metricSchema = metricSchema;           // <=
  }

  public void setMetricSchema(List<SchemaField> metricSchema)
  {
    this.metricSchema = metricSchema;
  }
  ....
}

Huawei Cloud

V6005 The variable 'suspend' is assigned to itself. SuspendTransferTaskRequest.java(77)


public class SuspendTransferTaskRequest
{
  ....
  private boolean suspend;
  ....
  public void setSuspend(boolean suspend)
  {
    suspend = suspend;
  }
  ....
}


Bugs Found

Checked Projects
367
Collected Errors
13 552