Our website uses cookies to enhance your browsing experience.
Accept
to the top
>
>
>
Examples of errors detected by the V606…

Examples of errors detected by the V6066 diagnostic

V6066. Passing objects of incompatible types to the method of collection.


Apache Flink

V6066 The type of object passed as argument is incompatible with the type of collection: String, ListStateDescriptor<NextTransactionalIdHint>. FlinkKafkaProducer.java(1083)


public interface OperatorStateStore
{
  Set<String> getRegisteredStateNames();
}
public class FlinkKafkaProducer<IN> extends ....
{
  ....
  private static final
  ListStateDescriptor<FlinkKafkaProducer.NextTransactionalIdHint>
  NEXT_TRANSACTIONAL_ID_HINT_DESCRIPTOR = ....;

  @Override
  public void initializeState(FunctionInitializationContext context)....
  {
    ....
    if (context.getOperatorStateStore()
               .getRegisteredStateNames()
               .contains(NEXT_TRANSACTIONAL_ID_HINT_DESCRIPTOR))    // <=
    {
       migrateNextTransactionalIdHindState(context);
    }
    ....
  }
}

NGB

V6066 The type of object passed as argument is incompatible with the type of collection: String, Allele. VcfGa4ghReader.java(535)


private static OrganismType determineHeterozygousGenotypeGA4GH(
    VariantGA4GH ga4GHEntity, List<Allele> alleles, int[] genotypeArray) {

    OrganismType organismType = null;
    for (int i = 0; i < genotypeArray.length; i++) {
        if (alleles.get(i).isReference()) {
            genotypeArray[i] = 0;
            organismType = OrganismType.HETEROZYGOUS;
        } else {
            if (organismType == null) {
                organismType = OrganismType.HETERO_VAR;
            }
            genotypeArray[i] = ga4GHEntity.getAlternateBases()
                                          .indexOf(alleles.get(i)) + 1; // <=
        }
    }

    return organismType;
}

Apache Kafka

V6066 The type of object passed as argument is incompatible with the type of collection: String, Uuid. MockAdminClient.java 569


private final Map<String, Uuid> topicIds = new HashMap();

private Map<String, KafkaFutureVoid> handleDeleteTopicsUsingNames(....) {
  ....
  Collection<String> topicNames = new ArrayList<>(topicNameCollection);

  for (final String topicName : topicNames) {
    KafkaFutureImpl<Void> future = new KafkaFutureImpl<>();

    if (allTopics.remove(topicName) == null) {
      ....
    } else {
      topicNames.remove(topicIds.remove(topicName));      // <=
      future.complete(null);
    }
    ....
  }
}

close form

Fill out the form in 2 simple steps below:

Your contact information:

Step 1
Congratulations! This is your promo code!

Desired license type:

Step 2
Team license
Enterprise license
** By clicking this button you agree to our Privacy Policy statement
close form
Request our prices
New License
License Renewal
--Select currency--
USD
EUR
* By clicking this button you agree to our Privacy Policy statement

close form
Free PVS‑Studio license for Microsoft MVP specialists
* By clicking this button you agree to our Privacy Policy statement

close form
To get the licence for your open-source project, please fill out this form
* By clicking this button you agree to our Privacy Policy statement

close form
I am interested to try it on the platforms:
* By clicking this button you agree to our Privacy Policy statement

close form
check circle
Message submitted.

Your message has been sent. We will email you at


If you do not see the email in your inbox, please check if it is filtered to one of the following folders:

  • Promotion
  • Updates
  • Spam