Skip to content

Commit

Permalink
Use ASCII letters only
Browse files Browse the repository at this point in the history
Otherwise, we get errors like this one:
src/java.base/share/classes/org/jspecify/annotations/Nullable.java:39: error: unmappable character (0x80) for encoding ascii
 * List<@nullable String> getList() { ��� }
  • Loading branch information
wmdietl committed Dec 16, 2024
1 parent 1c19f4a commit 00585ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@
* <pre>{@code
* // All the below is null-marked code
*
* class MyOptional<T> { }
* class MyOptional<T> { ... }
*
* interface MyList<E extends @Nullable Object> {
* // Returns the first non-null element, if such element exists.
* MyOptional<E> firstNonNull() { } // problem here!
* MyOptional<E> firstNonNull() { ... } // problem here!
* }
*
* MyList<@Nullable String> maybeNulls =
* MyList<String> nonNulls =
* MyList<@Nullable String> maybeNulls = ...
* MyList<String> nonNulls = ...
* }</pre>
*
* <p>Because {@code MyOptional} accepts only non-null type arguments, we need both {@code
Expand All @@ -70,7 +70,7 @@
*
* <pre>{@code
* // Returns the first non-null element, if such element exists.
* MyOptional<@NonNull E> firstNonNull() { } // problem fixed!
* MyOptional<@NonNull E> firstNonNull() { ... } // problem fixed!
* }</pre>
*
* <p>Here, {@code @NonNull E} selects the non-null form of the type argument, whether it was
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
*
* void setField(@Nullable String value) { field = value; }
*
* List<@Nullable String> getList() { }
* List<@Nullable String> getList() { ... }
* }</pre>
*
* <p>For a comprehensive introduction to JSpecify, please see <a
Expand Down

0 comments on commit 00585ac

Please sign in to comment.