Skip to content

warning: ChoiceGeneratorBase() in ChoiceGeneratorBase has been deprecated #72

@gayanW

Description

@gayanW

Compiler warning "[deprecation] ChoiceGeneratorBase() in ChoiceGeneratorBase has been deprecated" when build with JDK 9 and later.

[javac] /home/travis/build/javapathfinder/jpf-core/src/main/gov/nasa/jpf/vm/choice/PermutationCG.java:35: warning: [deprecation] ChoiceGeneratorBase() in ChoiceGeneratorBase has been deprecated
[javac]   public PermutationCG (PermutationGenerator pg){
[javac]                                                 ^

public class PermutationCG extends ChoiceGeneratorBase<int[]>{
protected PermutationGenerator pg;
protected int[] permutation;
public PermutationCG (PermutationGenerator pg){
this.pg = pg;
}
public PermutationCG (String id, PermutationGenerator pg){
super(id);
this.pg = pg;
}

Default constructor of the super class 'gov.nasa.jpf.vm.ChoiceGeneratorBase' is marked deprecated, but the constructor PermutationCG (PermutationGenerator) is not, thus resulting in the warning.

/**
* don't use this since it is not safe for cascaded ChoiceGenerators
* (we need the 'id' to be as context specific as possible)
*/
@Deprecated
protected ChoiceGeneratorBase() {
id = "?";
}
protected ChoiceGeneratorBase(String id) {
this.id = id;
}

Travis log:
https://travis-ci.org/javapathfinder/jpf-core/builds/385707808#L2425-L2427

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions