Skip to content

Commit 88b8ffc

Browse files
authored
Annotate new Console APIs. (#81)
1 parent 2ee84ae commit 88b8ffc

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/java.base/share/classes/java/io/Console.java

+7-7
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ public Reader reader() {
172172
* @since 23
173173
*/
174174
@PreviewFeature(feature = PreviewFeature.Feature.IMPLICIT_CLASSES)
175-
public Console println(Object obj) {
175+
public Console println(@Nullable Object obj) {
176176
throw newUnsupportedOperationException();
177177
}
178178

@@ -192,7 +192,7 @@ public Console println(Object obj) {
192192
* @since 23
193193
*/
194194
@PreviewFeature(feature = PreviewFeature.Feature.IMPLICIT_CLASSES)
195-
public Console print(Object obj) {
195+
public Console print(@Nullable Object obj) {
196196
throw newUnsupportedOperationException();
197197
}
198198

@@ -214,7 +214,7 @@ public Console print(Object obj) {
214214
* @since 23
215215
*/
216216
@PreviewFeature(feature = PreviewFeature.Feature.IMPLICIT_CLASSES)
217-
public String readln(String prompt) {
217+
public String readln(@Nullable String prompt) {
218218
throw newUnsupportedOperationException();
219219
}
220220

@@ -289,7 +289,7 @@ public Console format(String format, @Nullable Object ... args) {
289289
* @return This console
290290
* @since 23
291291
*/
292-
public Console format(Locale locale, String format, Object ... args) {
292+
public Console format(@Nullable Locale locale, String format, @Nullable Object ... args) {
293293
throw newUnsupportedOperationException();
294294
}
295295

@@ -369,7 +369,7 @@ public Console printf(String format, @Nullable Object ... args) {
369369
* @return This console
370370
* @since 23
371371
*/
372-
public Console printf(Locale locale, String format, Object ... args) {
372+
public Console printf(@Nullable Locale locale, String format, @Nullable Object ... args) {
373373
throw newUnsupportedOperationException();
374374
}
375375

@@ -453,7 +453,7 @@ public Console printf(Locale locale, String format, Object ... args) {
453453
* if an end of stream has been reached.
454454
* @since 23
455455
*/
456-
public String readLine(Locale locale, String format, Object ... args) {
456+
public @Nullable String readLine(@Nullable Locale locale, String format, @Nullable Object ... args) {
457457
throw newUnsupportedOperationException();
458458
}
459459

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

0 commit comments

Comments
 (0)