diff --git a/framework/src/test/java/org/checkerframework/framework/testchecker/util/FlowTestAnnotatedTypeFactory.java b/framework/src/test/java/org/checkerframework/framework/testchecker/util/FlowTestAnnotatedTypeFactory.java index ac8d0865b8b..a7497b84ef8 100644 --- a/framework/src/test/java/org/checkerframework/framework/testchecker/util/FlowTestAnnotatedTypeFactory.java +++ b/framework/src/test/java/org/checkerframework/framework/testchecker/util/FlowTestAnnotatedTypeFactory.java @@ -47,48 +47,10 @@ protected Set> createSupportedTypeQualifiers() { } @Override - @SuppressWarnings("deprecation") // TODO: REVERT: Just testing backward compatibility. - public QualifierHierarchy createQualifierHierarchy() { - return org.checkerframework.framework.util.MultiGraphQualifierHierarchy - .createMultiGraphQualifierHierarchy(this); + protected QualifierHierarchy createQualifierHierarchy() { + return new FlowQualifierHierarchy(this.getSupportedTypeQualifiers(), elements); } - @Override - @SuppressWarnings("deprecation") // TODO: REVERT: Just testing backward compatibility. - public QualifierHierarchy createQualifierHierarchyWithMultiGraphFactory( - org.checkerframework.framework.util.MultiGraphQualifierHierarchy.MultiGraphFactory factory) { - return new OldFlowQualifierHierarchy(factory, BOTTOM); - } - - @SuppressWarnings("deprecation") // TODO: REVERT: Just testing backward compatibility. - class OldFlowQualifierHierarchy - extends org.checkerframework.framework.util.GraphQualifierHierarchy { - - public OldFlowQualifierHierarchy(MultiGraphFactory f, AnnotationMirror bottom) { - super(f, bottom); - } - - @Override - public boolean isSubtype(AnnotationMirror subAnno, AnnotationMirror superAnno) { - if (AnnotationUtils.areSameByName(superAnno, VALUE) - && AnnotationUtils.areSameByName(subAnno, VALUE)) { - return AnnotationUtils.areSame(superAnno, subAnno); - } - if (AnnotationUtils.areSameByName(superAnno, VALUE)) { - superAnno = VALUE; - } - if (AnnotationUtils.areSameByName(subAnno, VALUE)) { - subAnno = VALUE; - } - return super.isSubtype(subAnno, superAnno); - } - } - - // @Override - // protected QualifierHierarchy createQualifierHierarchy() { - // return new FlowQualifierHierarchy(this.getSupportedTypeQualifiers(), elements); - // } - /** FlowQualifierHierarchy: {@code @Value(a) <: @Value(b) iff a == b} */ class FlowQualifierHierarchy extends MostlyNoElementQualifierHierarchy { final QualifierKind VALUE_KIND;