Skip to content

Commit

Permalink
Annotate new Console APIs. (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpovirk authored Oct 6, 2024
1 parent 2ee84ae commit 88b8ffc
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/java.base/share/classes/java/io/Console.java
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public Reader reader() {
* @since 23
*/
@PreviewFeature(feature = PreviewFeature.Feature.IMPLICIT_CLASSES)
public Console println(Object obj) {
public Console println(@Nullable Object obj) {
throw newUnsupportedOperationException();
}

Expand All @@ -192,7 +192,7 @@ public Console println(Object obj) {
* @since 23
*/
@PreviewFeature(feature = PreviewFeature.Feature.IMPLICIT_CLASSES)
public Console print(Object obj) {
public Console print(@Nullable Object obj) {
throw newUnsupportedOperationException();
}

Expand All @@ -214,7 +214,7 @@ public Console print(Object obj) {
* @since 23
*/
@PreviewFeature(feature = PreviewFeature.Feature.IMPLICIT_CLASSES)
public String readln(String prompt) {
public String readln(@Nullable String prompt) {
throw newUnsupportedOperationException();
}

Expand Down Expand Up @@ -289,7 +289,7 @@ public Console format(String format, @Nullable Object ... args) {
* @return This console
* @since 23
*/
public Console format(Locale locale, String format, Object ... args) {
public Console format(@Nullable Locale locale, String format, @Nullable Object ... args) {
throw newUnsupportedOperationException();
}

Expand Down Expand Up @@ -369,7 +369,7 @@ public Console printf(String format, @Nullable Object ... args) {
* @return This console
* @since 23
*/
public Console printf(Locale locale, String format, Object ... args) {
public Console printf(@Nullable Locale locale, String format, @Nullable Object ... args) {
throw newUnsupportedOperationException();
}

Expand Down Expand Up @@ -453,7 +453,7 @@ public Console printf(Locale locale, String format, Object ... args) {
* if an end of stream has been reached.
* @since 23
*/
public String readLine(Locale locale, String format, Object ... args) {
public @Nullable String readLine(@Nullable Locale locale, String format, @Nullable Object ... args) {
throw newUnsupportedOperationException();
}

Expand Down Expand Up @@ -553,7 +553,7 @@ public String readLine(Locale locale, String format, Object ... args) {
* or {@code null} if an end of stream has been reached.
* @since 23
*/
public char[] readPassword(Locale locale, String format, Object ... args) {
public char @Nullable [] readPassword(@Nullable Locale locale, String format, @Nullable Object ... args) {
throw newUnsupportedOperationException();
}

Expand Down

0 comments on commit 88b8ffc

Please sign in to comment.