Skip to content

Commit

Permalink
Removing the @OptionalBottom type and annotation (#6772)
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Ernst <mernst@cs.washington.edu>
  • Loading branch information
jyoo980 and mernst authored Sep 4, 2024
1 parent 87f9d44 commit 0aeb0a4
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 104 deletions.

This file was deleted.

13 changes: 1 addition & 12 deletions checker/tests/optional/SubtypeCheck.java
Original file line number Diff line number Diff line change
@@ -1,27 +1,16 @@
import java.util.Optional;
import org.checkerframework.checker.optional.qual.MaybePresent;
import org.checkerframework.checker.optional.qual.OptionalBottom;
import org.checkerframework.checker.optional.qual.Present;

/** Basic test of subtyping. */
public class SubtypeCheck {

@SuppressWarnings("optional.parameter")
void foo(
@MaybePresent Optional<String> mp,
@Present Optional<String> p,
@OptionalBottom Optional<String> ob) {
void foo(@MaybePresent Optional<String> mp, @Present Optional<String> p) {
@MaybePresent Optional<String> mp2 = mp;
@MaybePresent Optional<String> mp3 = p;
@MaybePresent Optional<String> mp4 = ob;
// :: error: (assignment)
@Present Optional<String> p2 = mp;
@Present Optional<String> p3 = p;
@Present Optional<String> p4 = ob;
// :: error: (assignment)
@OptionalBottom Optional<String> ob2 = mp;
// :: error: (assignment)
@OptionalBottom Optional<String> ob3 = p;
@OptionalBottom Optional<String> ob4 = ob;
}
}
7 changes: 6 additions & 1 deletion docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
Version 3.46.1 (September 3, 2024)
Version 3.47.0 (September 3, 2024)
-----------------------------

**User-visible changes:**

The Checker Framework runs under JDK 22 -- that is, it runs on a version 22 JVM.
The Checker Framework runs under JDK 23 -- that is, it runs on a version 23 JVM.

The Optional Checker no longer supports the `@OptionalBottom` annotation.

**Implementation details:**

Removed annotations:
* `@OptionalBottom`

**Closed issues:**


Expand Down
70 changes: 3 additions & 67 deletions docs/manual/figures/optional-subtyping.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions docs/manual/optional-checker.tex
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@
\item[\refqualclass{checker/optional/qual}{Present}]
The annotated \<Optional> container definitely contains a (non-null) value.

\item[\refqualclass{checker/optional/qual}{OptionalBottom}]
The annotated expression evaluates to \<null> rather than to an \<Optional> container.
Programmers rarely write this annotation.

\item[\refqualclass{checker/optional/qual}{PolyPresent}]
indicates qualifier polymorphism.
For a description of qualifier polymorphism, see
Expand Down

0 comments on commit 0aeb0a4

Please sign in to comment.