Skip to content

Commit 4b24d19

Browse files
authored
Updating docs: "non-empty" to "present" Optional
1 parent e6aa0ff commit 4b24d19

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
import org.checkerframework.framework.qual.PostconditionAnnotation;
1010

1111
/**
12-
* Indicates that the expression evaluates to a non-empty Optional, if the method terminates
12+
* Indicates that the expression evaluates to a present Optional, if the method terminates
1313
* successfully.
1414
*
15-
* <p>This postcondition annotation is useful for methods that construct a non-empty Optional:
15+
* <p>This postcondition annotation is useful for methods that construct a present Optional:
1616
*
1717
* <pre><code>
1818
* {@literal @}EnsuresPresent("optStr")

docs/manual/optional-checker.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@
179179
Optional<T> wrapWithOptional(...) { ... }
180180
181181
void myMethod() {
182-
@SuppressWarnings("optional") // with argument x, wrapWithOptional always returns a non-empty Optional
182+
@SuppressWarnings("optional") // with argument x, wrapWithOptional always returns a present Optional
183183
@Present Optional<T> optX = wrapWithOptional(x);
184184
}
185185
\end{Verbatim}
@@ -214,7 +214,7 @@
214214
It is useful if you wish to suppress a warning within an expression.
215215

216216
The Optional Checker considers both the return value, and also the
217-
argument, to be an instance of a non-empty Optional after the \<castPresent>
217+
argument, to be an instance of a present Optional after the \<castPresent>
218218
method call.
219219
The Optional Checker issues no warnings in any of the following
220220
code:

0 commit comments

Comments
 (0)