Skip to content

Commit

Permalink
Remove methods and classes that have been deprecated for more than on…
Browse files Browse the repository at this point in the history
…e year (#4974)
  • Loading branch information
mernst authored Dec 3, 2021
1 parent 001c45c commit 9fe76ef
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 1,716 deletions.
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
package org.checkerframework.dataflow.cfg.block;

import java.util.List;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.checkerframework.dataflow.cfg.node.Node;
import org.checkerframework.dataflow.qual.Pure;

/** A regular basic block that contains a sequence of {@link Node}s. */
public interface RegularBlock extends SingleSuccessorBlock {

/**
* Returns the unmodifiable sequence of {@link Node}s.
*
* @return the unmodifiable sequence of {@link Node}s
* @deprecated use {@link #getNodes} instead
*/
@Deprecated // 2020-08-05
@Pure
List<Node> getContents();

/**
* Returns the regular successor block.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,6 @@ public void addNodes(List<? extends Node> ts) {
}
}

@SuppressWarnings("deprecation") // implementation of deprecated method in interface
@Override
public List<Node> getContents() {
return getNodes();
}

/**
* {@inheritDoc}
*
Expand Down
11 changes: 9 additions & 2 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
Version 3.1?.? (December 1, 2021)
-------------------------------
Version 3.20.0 (December 1, 2021)
---------------------------------

**User-visible changes:**

**Implementation details:**

Removed methods and classes that have been deprecated for more than one year:
* Old way of constructing qualifier hierarchies
* `@SuppressWarningsKeys`
* `RegularBlock.getContents()`
* `TestUtilities.testBooleanProperty()`
* `CFAbstractTransfer.getValueWithSameAnnotations()`

**Closed issues:**


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -468,34 +468,6 @@ public static void ensureDirectoryExists(String dir) {
}
}

/**
* Return true if the system property is set to "true". Return false if the system property is not
* set or is set to "false". Otherwise, errs.
*
* @param key system property to check
* @return true if the system property is set to "true". Return false if the system property is
* not set or is set to "false". Otherwise, errs.
* @deprecated Use {@link SystemUtil#getBooleanSystemProperty(String)} instead.
*/
@Deprecated // 2020-04-30
public static boolean testBooleanProperty(String key) {
return testBooleanProperty(key, false);
}

/**
* If the system property is set, return its boolean value; otherwise return {@code defaultValue}.
* Errs if the system property is set to a non-boolean value.
*
* @param key system property to check
* @param defaultValue value to use if the property is not set
* @return the boolean value of {@code key} or {@code defaultValue} if {@code key} is not set
* @deprecated Use {@link SystemUtil#getBooleanSystemProperty(String, boolean)} instead.
*/
@Deprecated // 2020-04-30
public static boolean testBooleanProperty(String key, boolean defaultValue) {
return SystemUtil.getBooleanSystemProperty(key, defaultValue);
}

/**
* Returns the value of system property "emit.test.debug".
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,24 +205,6 @@ protected V getValueFromFactory(Tree tree, Node node) {
return analysis.createAbstractValue(at);
}

/**
* Returns an abstract value with the given {@code type} and the annotations from {@code
* annotatedValue}.
*
* @param type the type to return
* @param annotatedValue the annotations to return
* @return an abstract value with the given {@code type} and the annotations from {@code
* annotatedValue}
* @deprecated use {@link #getWidenedValue} or {@link #getNarrowedValue}
*/
@Deprecated // 2020-10-02
protected V getValueWithSameAnnotations(TypeMirror type, V annotatedValue) {
if (annotatedValue == null) {
return null;
}
return analysis.createAbstractValue(annotatedValue.getAnnotations(), type);
}

/** The fixed initial store. */
private S fixedInitialStore = null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2328,15 +2328,6 @@ protected final NavigableSet<String> getStandardSuppressWarningsPrefixes() {
return prefixes;
}

@SuppressWarnings("deprecation") // SuppressWarningsKeys was renamed to SuppressWarningsPrefix
SuppressWarningsKeys annotation = this.getClass().getAnnotation(SuppressWarningsKeys.class);
if (annotation != null) {
for (String prefix : annotation.value()) {
prefixes.add(prefix);
}
return prefixes;
}

// No @SuppressWarningsPrefixes annotation, by default infer key from class name.
String defaultPrefix = getDefaultSuppressWarningsPrefix();
prefixes.add(defaultPrefix);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -943,28 +943,6 @@ public final QualifierHierarchy getQualifierHierarchy() {
return qualHierarchy;
}

/**
* To continue to use a subclass of {@link
* org.checkerframework.framework.util.MultiGraphQualifierHierarchy} or {@link
* org.checkerframework.framework.util.GraphQualifierHierarchy}, override this method so that it
* returns a new instance of the subclass. Then override {@link #createQualifierHierarchy()} so
* that it returns the result of a call to {@link
* org.checkerframework.framework.util.MultiGraphQualifierHierarchy#createMultiGraphQualifierHierarchy(AnnotatedTypeFactory)}.
*
* @param factory MultiGraphFactory
* @return QualifierHierarchy
* @deprecated Use either {@link ElementQualifierHierarchy}, {@link NoElementQualifierHierarchy},
* or {@link MostlyNoElementQualifierHierarchy} instead. This method will be removed in a
* future release.
*/
@Deprecated // 2020-09-10
public QualifierHierarchy createQualifierHierarchyWithMultiGraphFactory(
org.checkerframework.framework.util.MultiGraphQualifierHierarchy.MultiGraphFactory factory) {
throw new TypeSystemError(
"Checker must override AnnotatedTypeFactory#createQualifierHierarchyWithMultiGraphFactory"
+ " when using AnnotatedTypeFactory#createMultiGraphQualifierHierarchy.");
}

/**
* Creates the type hierarchy to be used by this factory.
*
Expand Down
Loading

0 comments on commit 9fe76ef

Please sign in to comment.