8340082: Use inline return tag in java.base

Reviewed-by: iris, prappo, lancea, djelinski, naoto, liach
This commit is contained in:
Joe Darcy 2024-09-13 16:49:28 +00:00
parent 1a0a53883f
commit 89c172ac47
21 changed files with 32 additions and 59 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -1218,8 +1218,7 @@ public interface ObjectInputFilter {
} }
/** /**
* Returns the pattern used to create this filter. * {@return the pattern used to create this filter}
* @return the pattern used to create this filter
*/ */
@Override @Override
public String toString() { public String toString() {

View File

@ -3859,8 +3859,7 @@ public class ObjectInputStream
} }
/** /**
* Returns the number of bytes read from the input stream. * {@return the number of bytes read from the input stream}
* @return the number of bytes read from the input stream
*/ */
long getBytesRead() { long getBytesRead() {
return in.getBytesRead(); return in.getBytesRead();

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -45,8 +45,7 @@ package java.lang.annotation;
@Target(ElementType.ANNOTATION_TYPE) @Target(ElementType.ANNOTATION_TYPE)
public @interface Retention { public @interface Retention {
/** /**
* Returns the retention policy. * {@return the retention policy}
* @return the retention policy
*/ */
RetentionPolicy value(); RetentionPolicy value();
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -56,16 +56,14 @@ public class MalformedInputException
} }
/** /**
* Returns the length of the input. * {@return the length of the input}
* @return the length of the input
*/ */
public int getInputLength() { public int getInputLength() {
return inputLength; return inputLength;
} }
/** /**
* Returns the message. * {@return the message}
* @return the message
*/ */
public String getMessage() { public String getMessage() {
return "Input length = " + inputLength; return "Input length = " + inputLength;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2001, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -56,16 +56,14 @@ public class UnmappableCharacterException
} }
/** /**
* Returns the length of the input. * {@return the length of the input}
* @return the length of the input
*/ */
public int getInputLength() { public int getInputLength() {
return inputLength; return inputLength;
} }
/** /**
* Returns the message. * {@return the message}
* @return the message
*/ */
public String getMessage() { public String getMessage() {
return "Input length = " + inputLength; return "Input length = " + inputLength;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -137,8 +137,7 @@ public enum TextStyle {
} }
/** /**
* Returns the stand-alone style with the same size. * {@return the stand-alone style with the same size}
* @return the stand-alone style with the same size
*/ */
public TextStyle asStandalone() { public TextStyle asStandalone() {
return TextStyle.values()[ordinal() | 1]; return TextStyle.values()[ordinal() | 1];

View File

@ -477,8 +477,7 @@ public class SynchronousQueue<E> extends AbstractQueue<E>
} }
/** /**
* Returns a zero-length array. * {@return a zero-length array}
* @return a zero-length array
*/ */
public Object[] toArray() { public Object[] toArray() {
return new Object[0]; return new Object[0];

View File

@ -176,8 +176,7 @@ public class AtomicBoolean implements java.io.Serializable {
} }
/** /**
* Returns the String representation of the current value. * {@return the String representation of the current value}
* @return the String representation of the current value
*/ */
public String toString() { public String toString() {
return Boolean.toString(get()); return Boolean.toString(get());

View File

@ -340,8 +340,7 @@ public class AtomicInteger extends Number implements java.io.Serializable {
} }
/** /**
* Returns the String representation of the current value. * {@return the String representation of the current value}
* @return the String representation of the current value
*/ */
public String toString() { public String toString() {
return Integer.toString(get()); return Integer.toString(get());

View File

@ -366,8 +366,7 @@ public class AtomicIntegerArray implements java.io.Serializable {
} }
/** /**
* Returns the String representation of the current values of array. * {@return the String representation of the current values of array}
* @return the String representation of the current values of array
*/ */
public String toString() { public String toString() {
int iMax = array.length - 1; int iMax = array.length - 1;

View File

@ -341,8 +341,7 @@ public class AtomicLong extends Number implements java.io.Serializable {
} }
/** /**
* Returns the String representation of the current value. * {@return the String representation of the current value}
* @return the String representation of the current value
*/ */
public String toString() { public String toString() {
return Long.toString(get()); return Long.toString(get());

View File

@ -366,8 +366,7 @@ public class AtomicLongArray implements java.io.Serializable {
} }
/** /**
* Returns the String representation of the current values of array. * {@return the String representation of the current values of array}
* @return the String representation of the current values of array
*/ */
public String toString() { public String toString() {
int iMax = array.length - 1; int iMax = array.length - 1;

View File

@ -269,8 +269,7 @@ public class AtomicReference<V> implements java.io.Serializable {
} }
/** /**
* Returns the String representation of the current value. * {@return the String representation of the current value}
* @return the String representation of the current value
*/ */
public String toString() { public String toString() {
return String.valueOf(get()); return String.valueOf(get());

View File

@ -297,8 +297,7 @@ public class AtomicReferenceArray<E> implements java.io.Serializable {
} }
/** /**
* Returns the String representation of the current values of array. * {@return the String representation of the current values of array}
* @return the String representation of the current values of array
*/ */
public String toString() { public String toString() {
int iMax = array.length - 1; int iMax = array.length - 1;

View File

@ -189,8 +189,7 @@ public class DoubleAccumulator extends Striped64 implements Serializable {
} }
/** /**
* Returns the String representation of the current value. * {@return the String representation of the current value}
* @return the String representation of the current value
*/ */
public String toString() { public String toString() {
return Double.toString(get()); return Double.toString(get());

View File

@ -183,8 +183,7 @@ public class LongAccumulator extends Striped64 implements Serializable {
} }
/** /**
* Returns the String representation of the current value. * {@return the String representation of the current value}
* @return the String representation of the current value
*/ */
public String toString() { public String toString() {
return Long.toString(get()); return Long.toString(get());

View File

@ -119,8 +119,7 @@ public class Manifest implements Cloneable {
} }
/** /**
* Returns the main Attributes for the Manifest. * {@return the main Attributes for the Manifest}
* @return the main Attributes for the Manifest
*/ */
public Attributes getMainAttributes() { public Attributes getMainAttributes() {
return attr; return attr;

View File

@ -782,8 +782,7 @@ public class Deflater {
} }
/** /**
* Returns the ADLER-32 value of the uncompressed data. * {@return the ADLER-32 value of the uncompressed data}
* @return the ADLER-32 value of the uncompressed data
*/ */
public int getAdler() { public int getAdler() {
synchronized (zsRef) { synchronized (zsRef) {

View File

@ -282,8 +282,7 @@ public class Inflater {
} }
/** /**
* Returns true if a preset dictionary is needed for decompression. * {@return true if a preset dictionary is needed for decompression}
* @return true if a preset dictionary is needed for decompression
* @see Inflater#setDictionary * @see Inflater#setDictionary
*/ */
public boolean needsDictionary() { public boolean needsDictionary() {
@ -293,10 +292,8 @@ public class Inflater {
} }
/** /**
* Returns true if the end of the compressed data stream has been * {@return true if the end of the compressed data stream has been
* reached. * reached}
* @return true if the end of the compressed data stream has been
* reached
*/ */
public boolean finished() { public boolean finished() {
synchronized (zsRef) { synchronized (zsRef) {
@ -602,8 +599,7 @@ public class Inflater {
} }
/** /**
* Returns the ADLER-32 value of the uncompressed data. * {@return the ADLER-32 value of the uncompressed data}
* @return the ADLER-32 value of the uncompressed data
*/ */
public int getAdler() { public int getAdler() {
synchronized (zsRef) { synchronized (zsRef) {

View File

@ -138,8 +138,7 @@ public class ZipEntry implements ZipConstants, Cloneable {
} }
/** /**
* Returns the name of the entry. * {@return the name of the entry}
* @return the name of the entry
*/ */
public String getName() { public String getName() {
return name; return name;

View File

@ -498,8 +498,7 @@ public class ZipFile implements ZipConstants, Closeable {
} }
/** /**
* Returns the path name of the ZIP file. * {@return the path name of the ZIP file}
* @return the path name of the ZIP file
*/ */
public String getName() { public String getName() {
return filePath; return filePath;
@ -560,8 +559,7 @@ public class ZipFile implements ZipConstants, Closeable {
} }
/** /**
* Returns an enumeration of the ZIP file entries. * {@return an enumeration of the ZIP file entries}
* @return an enumeration of the ZIP file entries
* @throws IllegalStateException if the ZIP file has been closed * @throws IllegalStateException if the ZIP file has been closed
*/ */
public Enumeration<? extends ZipEntry> entries() { public Enumeration<? extends ZipEntry> entries() {