Skip to content

Commit f737339

Browse files
authored
Oracle javadoc guidelines (#1582)
* Oracle javdoc guidelines * spotless
1 parent bcd3ede commit f737339

File tree

78 files changed

+546
-568
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+546
-568
lines changed

maven-resolver-util/src/main/java/org/eclipse/aether/util/ChecksumUtils.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
/**
3636
* A utility class to assist in the verification and generation of checksums.
3737
*
38-
* @deprecated The use of class should be avoided, see {@link StringDigestUtil} and file processor in SPI module.
38+
* @deprecated the use of class should be avoided, see {@link StringDigestUtil} and file processor in SPI module
3939
*/
4040
@Deprecated
4141
public final class ChecksumUtils {
@@ -47,10 +47,10 @@ private ChecksumUtils() {
4747
/**
4848
* Extracts the checksum from the specified file.
4949
*
50-
* @param checksumFile The path to the checksum file, must not be {@code null}.
51-
* @return The checksum stored in the file, never {@code null}.
52-
* @throws IOException If the checksum does not exist or could not be read for other reasons.
53-
* @deprecated Use SPI FileProcessor to read and write checksum files.
50+
* @param checksumFile the path to the checksum file, must not be {@code null}
51+
* @return the checksum stored in the file, never {@code null}
52+
* @throws IOException if the checksum does not exist or could not be read for other reasons
53+
* @deprecated use SPI FileProcessor to read and write checksum files
5454
*/
5555
@Deprecated
5656
public static String read(File checksumFile) throws IOException {
@@ -87,21 +87,21 @@ public static String read(File checksumFile) throws IOException {
8787
/**
8888
* Calculates checksums for the specified file.
8989
*
90-
* @param dataFile The file for which to calculate checksums, must not be {@code null}.
91-
* @param algos The names of checksum algorithms (cf. {@link MessageDigest#getInstance(String)} to use, must not be
90+
* @param dataFile the file for which to calculate checksums, must not be {@code null}
91+
* @param algos the names of checksum algorithms (cf. {@link MessageDigest#getInstance(String)} to use, must not be
9292
* {@code null}.
93-
* @return The calculated checksums, indexed by algorithm name, or the exception that occurred while trying to
94-
* calculate it, never {@code null}.
95-
* @throws IOException If the data file could not be read.
96-
* @deprecated Use SPI checksum selector instead.
93+
* @return the calculated checksums, indexed by algorithm name, or the exception that occurred while trying to
94+
* calculate it, never {@code null}
95+
* @throws IOException if the data file could not be read
96+
* @deprecated use SPI checksum selector instead
9797
*/
9898
@Deprecated
9999
public static Map<String, Object> calc(File dataFile, Collection<String> algos) throws IOException {
100100
return calc(new FileInputStream(dataFile), algos);
101101
}
102102

103103
/**
104-
* @deprecated Use SPI checksum selector instead.
104+
* @deprecated use SPI checksum selector instead
105105
*/
106106
@Deprecated
107107
public static Map<String, Object> calc(byte[] dataBytes, Collection<String> algos) throws IOException {
@@ -145,8 +145,8 @@ private static Map<String, Object> calc(InputStream data, Collection<String> alg
145145
* Creates a hexadecimal representation of the specified bytes. Each byte is converted into a two-digit hex number
146146
* and appended to the result with no separator between consecutive bytes.
147147
*
148-
* @param bytes The bytes to represent in hex notation, may be be {@code null}.
149-
* @return The hexadecimal representation of the input or {@code null} if the input was {@code null}.
148+
* @param bytes the bytes to represent in hex notation, may be be {@code null}
149+
* @return the hexadecimal representation of the input or {@code null} if the input was {@code null}
150150
*/
151151
public static String toHexString(byte[] bytes) {
152152
return StringDigestUtil.toHexString(bytes);
@@ -156,8 +156,8 @@ public static String toHexString(byte[] bytes) {
156156
* Creates a byte array out of hexadecimal representation of the specified bytes. If input string is {@code null},
157157
* {@code null} is returned. Input value must have even length (due hex encoding = 2 chars one byte).
158158
*
159-
* @param hexString The hexString to convert to byte array, may be {@code null}.
160-
* @return The byte array of the input or {@code null} if the input was {@code null}.
159+
* @param hexString the hexString to convert to byte array, may be {@code null}
160+
* @return the byte array of the input or {@code null} if the input was {@code null}
161161
* @since 1.8.0
162162
*/
163163
public static byte[] fromHexString(String hexString) {

maven-resolver-util/src/main/java/org/eclipse/aether/util/ConfigUtils.java

Lines changed: 74 additions & 74 deletions
Large diffs are not rendered by default.

maven-resolver-util/src/main/java/org/eclipse/aether/util/DirectoryUtils.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ private DirectoryUtils() {
5454
* Resulting path is being checked is a directory, and if not, it will be created if {@code mayCreate} is
5555
* {@code true}. If resulting path exist but is not a directory, this method will throw.
5656
*
57-
* @param name The name to create directory with, cannot be {@code null}.
58-
* @param base The base {@link Path} to resolve name, if it is relative path, cannot be {@code null}.
59-
* @param mayCreate If resulting path does not exist, should it create?
60-
* @return The {@link Path} instance that is resolved and backed by existing directory.
61-
* @throws IOException If some IO related errors happens.
57+
* @param name the name to create directory with, cannot be {@code null}
58+
* @param base the base {@link Path} to resolve name, if it is relative path, cannot be {@code null}
59+
* @param mayCreate if resulting path does not exist, should it create?
60+
* @return the {@link Path} instance that is resolved and backed by existing directory
61+
* @throws IOException if some IO related errors happens
6262
*/
6363
public static Path resolveDirectory(String name, Path base, boolean mayCreate) throws IOException {
6464
requireNonNull(name, "name is null");
@@ -88,12 +88,12 @@ public static Path resolveDirectory(String name, Path base, boolean mayCreate) t
8888
* For this method to work, {@link LocalRepository#getBasePath()} must return
8989
* non-{@code null} value, otherwise {@link NullPointerException} is thrown.
9090
*
91-
* @param session The session, may not be {@code null}.
92-
* @param defaultName The default value if not present in session configuration, may not be {@code null}.
93-
* @param nameKey The key to look up for in session configuration to obtain user set value.
94-
* @param mayCreate If resulting path does not exist, should it create?
95-
* @return The {@link Path} instance that is resolved and backed by existing directory.
96-
* @throws IOException If some IO related errors happens.
91+
* @param session the session, may not be {@code null}
92+
* @param defaultName the default value if not present in session configuration, may not be {@code null}
93+
* @param nameKey the key to look up for in session configuration to obtain user set value
94+
* @param mayCreate if resulting path does not exist, should it create?
95+
* @return the {@link Path} instance that is resolved and backed by existing directory
96+
* @throws IOException if some IO related errors happens
9797
* @see #resolveDirectory(String, Path, boolean)
9898
*/
9999
public static Path resolveDirectory(

maven-resolver-util/src/main/java/org/eclipse/aether/util/FileUtils.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,9 @@ public interface FileWriter {
171171
/**
172172
* Writes file without backup.
173173
*
174-
* @param target that is the target file (must be file, the path must have parent).
175-
* @param writer the writer that will accept a {@link Path} to write content to.
176-
* @throws IOException if at any step IO problem occurs.
174+
* @param target that is the target file (must be file, the path must have parent)
175+
* @param writer the writer that will accept a {@link Path} to write content to
176+
* @throws IOException if at any step IO problem occurs
177177
*/
178178
public static void writeFile(Path target, FileWriter writer) throws IOException {
179179
writeFile(target, writer, false);
@@ -182,9 +182,9 @@ public static void writeFile(Path target, FileWriter writer) throws IOException
182182
/**
183183
* Writes file with backup copy (appends ".bak" extension).
184184
*
185-
* @param target that is the target file (must be file, the path must have parent).
186-
* @param writer the writer that will accept a {@link Path} to write content to.
187-
* @throws IOException if at any step IO problem occurs.
185+
* @param target that is the target file (must be file, the path must have parent)
186+
* @param writer the writer that will accept a {@link Path} to write content to
187+
* @throws IOException if at any step IO problem occurs
188188
*/
189189
public static void writeFileWithBackup(Path target, FileWriter writer) throws IOException {
190190
writeFile(target, writer, true);
@@ -195,11 +195,11 @@ public static void writeFileWithBackup(Path target, FileWriter writer) throws IO
195195
* ensures that no other thread or process will be able to read not fully written files. Finally, this method
196196
* may create the needed parent directories, if the passed in target parents does not exist.
197197
*
198-
* @param target that is the target file (must be an existing or non-existing file, the path must have parent).
199-
* @param writer the writer that will accept a {@link Path} to write content to.
198+
* @param target that is the target file (must be an existing or non-existing file, the path must have parent)
199+
* @param writer the writer that will accept a {@link Path} to write content to
200200
* @param doBackup if {@code true}, and target file is about to be overwritten, a ".bak" file with old contents will
201-
* be created/overwritten.
202-
* @throws IOException if at any step IO problem occurs.
201+
* be created/overwritten
202+
* @throws IOException if at any step IO problem occurs
203203
*/
204204
private static void writeFile(Path target, FileWriter writer, boolean doBackup) throws IOException {
205205
requireNonNull(target, "target is null");

maven-resolver-util/src/main/java/org/eclipse/aether/util/StringDigestUtil.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ public static String sha1(final String string) {
8484
* Creates a hexadecimal representation of the specified bytes. Each byte is converted into a two-digit hex number
8585
* and appended to the result with no separator between consecutive bytes.
8686
*
87-
* @param bytes The bytes to represent in hex notation, may be {@code null}.
88-
* @return The hexadecimal representation of the input or {@code null} if the input was {@code null}.
87+
* @param bytes the bytes to represent in hex notation, may be {@code null}
88+
* @return the hexadecimal representation of the input or {@code null} if the input was {@code null}
8989
* @since 2.0.0
9090
*/
9191
public static String toHexString(byte[] bytes) {
@@ -110,8 +110,8 @@ public static String toHexString(byte[] bytes) {
110110
* Creates a byte array out of hexadecimal representation of the specified bytes. If input string is {@code null},
111111
* {@code null} is returned. Input value must have even length (due hex encoding = 2 chars one byte).
112112
*
113-
* @param hexString The hexString to convert to byte array, may be {@code null}.
114-
* @return The byte array of the input or {@code null} if the input was {@code null}.
113+
* @param hexString the hexString to convert to byte array, may be {@code null}
114+
* @return the byte array of the input or {@code null} if the input was {@code null}
115115
* @since 2.0.0
116116
*/
117117
public static byte[] fromHexString(String hexString) {

maven-resolver-util/src/main/java/org/eclipse/aether/util/artifact/ArtifactIdUtils.java

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ private ArtifactIdUtils() {
3636
/**
3737
* Creates an artifact identifier of the form {@code <groupId>:<artifactId>:<extension>[:<classifier>]:<version>}.
3838
*
39-
* @param artifact The artifact to create an identifer for, may be {@code null}.
40-
* @return The artifact identifier or {@code null} if the input was {@code null}.
39+
* @param artifact the artifact to create an identifer for, may be {@code null}
40+
* @return the artifact identifier or {@code null} if the input was {@code null}
4141
*/
4242
public static String toId(Artifact artifact) {
4343
String id = null;
@@ -55,12 +55,12 @@ public static String toId(Artifact artifact) {
5555
/**
5656
* Creates an artifact identifier of the form {@code <groupId>:<artifactId>:<extension>[:<classifier>]:<version>}.
5757
*
58-
* @param groupId The group id, may be {@code null}.
59-
* @param artifactId The artifact id, may be {@code null}.
60-
* @param extension The file extensiion, may be {@code null}.
61-
* @param classifier The classifier, may be {@code null}.
62-
* @param version The version, may be {@code null}.
63-
* @return The artifact identifier, never {@code null}.
58+
* @param groupId the group id, may be {@code null}
59+
* @param artifactId the artifact id, may be {@code null}
60+
* @param extension the file extensiion, may be {@code null}
61+
* @param classifier the classifier, may be {@code null}
62+
* @param version the version, may be {@code null}
63+
* @return the artifact identifier, never {@code null}
6464
*/
6565
public static String toId(String groupId, String artifactId, String extension, String classifier, String version) {
6666
StringBuilder buffer = concat(groupId, artifactId, extension, classifier);
@@ -75,8 +75,8 @@ public static String toId(String groupId, String artifactId, String extension, S
7575
* Creates an artifact identifier of the form
7676
* {@code <groupId>:<artifactId>:<extension>[:<classifier>]:<baseVersion>}.
7777
*
78-
* @param artifact The artifact to create an identifer for, may be {@code null}.
79-
* @return The artifact identifier or {@code null} if the input was {@code null}.
78+
* @param artifact the artifact to create an identifer for, may be {@code null}
79+
* @return the artifact identifier or {@code null} if the input was {@code null}
8080
*/
8181
public static String toBaseId(Artifact artifact) {
8282
String id = null;
@@ -94,8 +94,8 @@ public static String toBaseId(Artifact artifact) {
9494
/**
9595
* Creates an artifact identifier of the form {@code <groupId>:<artifactId>:<extension>[:<classifier>]}.
9696
*
97-
* @param artifact The artifact to create an identifer for, may be {@code null}.
98-
* @return The artifact identifier or {@code null} if the input was {@code null}.
97+
* @param artifact the artifact to create an identifer for, may be {@code null}
98+
* @return the artifact identifier or {@code null} if the input was {@code null}
9999
*/
100100
public static String toVersionlessId(Artifact artifact) {
101101
String id = null;
@@ -109,11 +109,11 @@ public static String toVersionlessId(Artifact artifact) {
109109
/**
110110
* Creates an artifact identifier of the form {@code <groupId>:<artifactId>:<extension>[:<classifier>]}.
111111
*
112-
* @param groupId The group id, may be {@code null}.
113-
* @param artifactId The artifact id, may be {@code null}.
114-
* @param extension The file extensiion, may be {@code null}.
115-
* @param classifier The classifier, may be {@code null}.
116-
* @return The artifact identifier, never {@code null}.
112+
* @param groupId the group id, may be {@code null}
113+
* @param artifactId the artifact id, may be {@code null}
114+
* @param extension the file extensiion, may be {@code null}
115+
* @param classifier the classifier, may be {@code null}
116+
* @return the artifact identifier, never {@code null}
117117
*/
118118
public static String toVersionlessId(String groupId, String artifactId, String extension, String classifier) {
119119
return concat(groupId, artifactId, extension, classifier).toString();
@@ -145,9 +145,9 @@ private static StringBuilder concat(String groupId, String artifactId, String ex
145145
* {@link String#equals(Object)} on the return values from {@link #toId(Artifact)} for the artifacts but does not
146146
* incur the overhead of creating temporary strings.
147147
*
148-
* @param artifact1 The first artifact, may be {@code null}.
149-
* @param artifact2 The second artifact, may be {@code null}.
150-
* @return {@code true} if both artifacts are not {@code null} and have equal ids, {@code false} otherwise.
148+
* @param artifact1 the first artifact, may be {@code null}
149+
* @param artifact2 the second artifact, may be {@code null}
150+
* @return {@code true} if both artifacts are not {@code null} and have equal ids, {@code false} otherwise
151151
*/
152152
public static boolean equalsId(Artifact artifact1, Artifact artifact2) {
153153
if (artifact1 == null || artifact2 == null) {
@@ -173,9 +173,9 @@ public static boolean equalsId(Artifact artifact1, Artifact artifact2) {
173173
* {@link String#equals(Object)} on the return values from {@link #toBaseId(Artifact)} for the artifacts but does
174174
* not incur the overhead of creating temporary strings.
175175
*
176-
* @param artifact1 The first artifact, may be {@code null}.
177-
* @param artifact2 The second artifact, may be {@code null}.
178-
* @return {@code true} if both artifacts are not {@code null} and have equal base ids, {@code false} otherwise.
176+
* @param artifact1 the first artifact, may be {@code null}
177+
* @param artifact2 the second artifact, may be {@code null}
178+
* @return {@code true} if both artifacts are not {@code null} and have equal base ids, {@code false} otherwise
179179
*/
180180
public static boolean equalsBaseId(Artifact artifact1, Artifact artifact2) {
181181
if (artifact1 == null || artifact2 == null) {
@@ -201,10 +201,10 @@ public static boolean equalsBaseId(Artifact artifact1, Artifact artifact2) {
201201
* {@link String#equals(Object)} on the return values from {@link #toVersionlessId(Artifact)} for the artifacts but
202202
* does not incur the overhead of creating temporary strings.
203203
*
204-
* @param artifact1 The first artifact, may be {@code null}.
205-
* @param artifact2 The second artifact, may be {@code null}.
204+
* @param artifact1 the first artifact, may be {@code null}
205+
* @param artifact2 the second artifact, may be {@code null}
206206
* @return {@code true} if both artifacts are not {@code null} and have equal versionless ids, {@code false}
207-
* otherwise.
207+
* otherwise
208208
*/
209209
public static boolean equalsVersionlessId(Artifact artifact1, Artifact artifact2) {
210210
if (artifact1 == null || artifact2 == null) {

maven-resolver-util/src/main/java/org/eclipse/aether/util/artifact/DefaultArtifactTypeRegistry.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ public DefaultArtifactTypeRegistry() {}
3434
/**
3535
* Adds the specified artifact type to the registry.
3636
*
37-
* @param type The artifact type to add, must not be {@code null}.
38-
* @return This registry for chaining, never {@code null}.
37+
* @param type the artifact type to add, must not be {@code null}
38+
* @return this registry for chaining, never {@code null}
3939
*/
4040
@Override
4141
public DefaultArtifactTypeRegistry add(ArtifactType type) {

maven-resolver-util/src/main/java/org/eclipse/aether/util/artifact/DelegatingArtifact.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public abstract class DelegatingArtifact extends AbstractArtifact {
3838
/**
3939
* Creates a new artifact instance that delegates to the specified artifact.
4040
*
41-
* @param delegate The artifact to delegate to, must not be {@code null}.
41+
* @param delegate the artifact to delegate to, must not be {@code null}
4242
*/
4343
protected DelegatingArtifact(Artifact delegate) {
4444
this.delegate = requireNonNull(delegate, "delegate artifact cannot be null");
@@ -48,8 +48,8 @@ protected DelegatingArtifact(Artifact delegate) {
4848
* Creates a new artifact instance that delegates to the specified artifact. Subclasses should use this hook to
4949
* instantiate themselves, taking along any data from the current instance that was added.
5050
*
51-
* @param delegate The artifact to delegate to, must not be {@code null}.
52-
* @return The new delegating artifact, never {@code null}.
51+
* @param delegate the artifact to delegate to, must not be {@code null}
52+
* @return the new delegating artifact, never {@code null}
5353
*/
5454
protected abstract DelegatingArtifact newInstance(Artifact delegate);
5555

maven-resolver-util/src/main/java/org/eclipse/aether/util/artifact/JavaScopes.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
* The dependency scopes used for Java dependencies.
2323
*
2424
* @see org.eclipse.aether.graph.Dependency#getScope()
25-
*
26-
* @deprecated Definition and semantics of the scopes should be defined by consumer project.
25+
* @deprecated definition and semantics of the scopes should be defined by consumer project
2726
*/
2827
@Deprecated
2928
public final class JavaScopes {

0 commit comments

Comments
 (0)