Skip to content

Commit 0aeb0a4

Browse files
jyoo980mernst
andauthored
Removing the @OptionalBottom type and annotation (#6772)
Co-authored-by: Michael Ernst <[email protected]>
1 parent 87f9d44 commit 0aeb0a4

File tree

5 files changed

+10
-104
lines changed

5 files changed

+10
-104
lines changed

checker-qual/src/main/java/org/checkerframework/checker/optional/qual/OptionalBottom.java

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,16 @@
11
import java.util.Optional;
22
import org.checkerframework.checker.optional.qual.MaybePresent;
3-
import org.checkerframework.checker.optional.qual.OptionalBottom;
43
import org.checkerframework.checker.optional.qual.Present;
54

65
/** Basic test of subtyping. */
76
public class SubtypeCheck {
87

98
@SuppressWarnings("optional.parameter")
10-
void foo(
11-
@MaybePresent Optional<String> mp,
12-
@Present Optional<String> p,
13-
@OptionalBottom Optional<String> ob) {
9+
void foo(@MaybePresent Optional<String> mp, @Present Optional<String> p) {
1410
@MaybePresent Optional<String> mp2 = mp;
1511
@MaybePresent Optional<String> mp3 = p;
16-
@MaybePresent Optional<String> mp4 = ob;
1712
// :: error: (assignment)
1813
@Present Optional<String> p2 = mp;
1914
@Present Optional<String> p3 = p;
20-
@Present Optional<String> p4 = ob;
21-
// :: error: (assignment)
22-
@OptionalBottom Optional<String> ob2 = mp;
23-
// :: error: (assignment)
24-
@OptionalBottom Optional<String> ob3 = p;
25-
@OptionalBottom Optional<String> ob4 = ob;
2615
}
2716
}

docs/CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
1-
Version 3.46.1 (September 3, 2024)
1+
Version 3.47.0 (September 3, 2024)
22
-----------------------------
33

44
**User-visible changes:**
55

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

9+
The Optional Checker no longer supports the `@OptionalBottom` annotation.
10+
911
**Implementation details:**
1012

13+
Removed annotations:
14+
* `@OptionalBottom`
15+
1116
**Closed issues:**
1217

1318

docs/manual/figures/optional-subtyping.svg

Lines changed: 3 additions & 67 deletions
Loading

docs/manual/optional-checker.tex

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,6 @@
7878
\item[\refqualclass{checker/optional/qual}{Present}]
7979
The annotated \<Optional> container definitely contains a (non-null) value.
8080

81-
\item[\refqualclass{checker/optional/qual}{OptionalBottom}]
82-
The annotated expression evaluates to \<null> rather than to an \<Optional> container.
83-
Programmers rarely write this annotation.
84-
8581
\item[\refqualclass{checker/optional/qual}{PolyPresent}]
8682
indicates qualifier polymorphism.
8783
For a description of qualifier polymorphism, see

0 commit comments

Comments
 (0)