You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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] ^
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.
Actually, neither of the default constructors is used by jpf-core itself (internally).
However, some of the other projects may use it.
I would consider removing the default constructor, but we should give extension writers time to adapt.
Therefore, I'd mark both constructors (PermutationCG and ChoiceGeneratorBase) with @Deprecated(forRemoval=true)
and would also insert an annotation that suppresses this warning in the constructor of PermutationCG.
gayanW
added a commit
to gayanW/jpf-core
that referenced
this issue
Jun 5, 2018
Both constructors PermutationCG#PermutationCG(PermutationGenerator),
ChoiceGeneratorBase#ChoiceGeneratorBase() is marked for removal.
PermutationCG is annotated with @SuppressWarnings("removal") to suppress
the warning
[javac] src/main/gov/nasa/jpf/vm/choice/PermutationCG.java:35:
warning: [deprecation] ChoiceGeneratorBase() in ChoiceGeneratorBase has been deprecated
[javac] public PermutationCG (PermutationGenerator pg){
[javac] ^
Fixes: javapathfinder#72
Compiler warning "[deprecation] ChoiceGeneratorBase() in ChoiceGeneratorBase has been deprecated" when build with JDK 9 and later.
jpf-core/src/main/gov/nasa/jpf/vm/choice/PermutationCG.java
Lines 30 to 43 in 18a0c42
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.
jpf-core/src/main/gov/nasa/jpf/vm/ChoiceGeneratorBase.java
Lines 99 to 110 in 18a0c42
Travis log:
https://travis-ci.org/javapathfinder/jpf-core/builds/385707808#L2425-L2427
The text was updated successfully, but these errors were encountered: