8340082: Use inline return tag in java.base
Reviewed-by: iris, prappo, lancea, djelinski, naoto, liach
This commit is contained in:
parent
1a0a53883f
commit
89c172ac47
@ -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() {
|
||||||
|
@ -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();
|
||||||
|
@ -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();
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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];
|
||||||
|
@ -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];
|
||||||
|
@ -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());
|
||||||
|
@ -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());
|
||||||
|
@ -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;
|
||||||
|
@ -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());
|
||||||
|
@ -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;
|
||||||
|
@ -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());
|
||||||
|
@ -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;
|
||||||
|
@ -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());
|
||||||
|
@ -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());
|
||||||
|
@ -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;
|
||||||
|
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
@ -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;
|
||||||
|
@ -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() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user