Skip to content

Commit 0f3ebc5

Browse files
committed
Fix Javadoc warnings (Java 21)
1 parent 54a7003 commit 0f3ebc5

31 files changed

+121
-32
lines changed

commons-vfs2/src/main/java/org/apache/commons/vfs2/FileObject.java

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public interface FileObject extends Comparable<FileObject>, Iterable<FileObject>
224224
void findFiles(FileSelector selector, boolean depthwise, List<FileObject> selected) throws FileSystemException;
225225

226226
/**
227-
* Returns a child of this file. Note that this method returns {@code null} when the child does not exist. This
227+
* Gets a child of this file. Note that this method returns {@code null} when the child does not exist. This
228228
* differs from {@link #resolveFile(String, NameScope)} which never returns null.
229229
*
230230
* @param name The name of the child.
@@ -235,7 +235,7 @@ public interface FileObject extends Comparable<FileObject>, Iterable<FileObject>
235235
FileObject getChild(String name) throws FileSystemException;
236236

237237
/**
238-
* Lists the children of this file.
238+
* Gets a lists of children of this file.
239239
*
240240
* @return An array containing the children of this file. The array is unordered. If the file does not have any
241241
* children, a zero-length array is returned. This method never returns null.
@@ -245,7 +245,7 @@ public interface FileObject extends Comparable<FileObject>, Iterable<FileObject>
245245
FileObject[] getChildren() throws FileSystemException;
246246

247247
/**
248-
* Returns this file's content. The {@link FileContent} returned by this method can be used to read and write the
248+
* Gets this file's content. The {@link FileContent} returned by this method can be used to read and write the
249249
* content of the file.
250250
*
251251
* <p>
@@ -259,35 +259,37 @@ public interface FileObject extends Comparable<FileObject>, Iterable<FileObject>
259259
FileContent getContent() throws FileSystemException;
260260

261261
/**
262+
* Gets this instance's FileOperations.
263+
*
262264
* @return FileOperations interface that provides access to the operations API.
263265
* @throws FileSystemException if an error occurs.
264266
*/
265267
FileOperations getFileOperations() throws FileSystemException;
266268

267269
/**
268-
* Returns the file system that contains this file.
270+
* Gets the file system that contains this file.
269271
*
270272
* @return The file system.
271273
*/
272274
FileSystem getFileSystem();
273275

274276
/**
275-
* Returns the name of this file.
277+
* Gets the name of this file.
276278
*
277279
* @return the FileName.
278280
*/
279281
FileName getName();
280282

281283
/**
282-
* Returns the folder that contains this file.
284+
* Gets the folder that contains this file.
283285
*
284286
* @return The folder that contains this file. Returns null if this file is the root of a file system.
285287
* @throws FileSystemException On error finding the file's parent.
286288
*/
287289
FileObject getParent() throws FileSystemException;
288290

289291
/**
290-
* Returns a Path representing this file.
292+
* Gets a Path representing this file.
291293
*
292294
* @return the Path for the file.
293295
* @since 2.7.0
@@ -297,22 +299,22 @@ default Path getPath() {
297299
}
298300

299301
/**
300-
* Returns the receiver as a URI String for public display, like, without a password.
302+
* Gets the receiver as a URI String for public display, like, without a password.
301303
*
302304
* @return A URI String without a password, never {@code null}.
303305
*/
304306
String getPublicURIString();
305307

306308
/**
307-
* Returns this file's type.
309+
* Gets this file's type.
308310
*
309311
* @return One of the {@link FileType} constants. Never returns null.
310312
* @throws FileSystemException On error determining the file's type.
311313
*/
312314
FileType getType() throws FileSystemException;
313315

314316
/**
315-
* Returns a URI representing this file.
317+
* Gets a URI representing this file.
316318
*
317319
* @return the URI for the file.
318320
* @since 2.7.0
@@ -322,7 +324,7 @@ default URI getURI() {
322324
}
323325

324326
/**
325-
* Returns a URL representing this file.
327+
* Gets a URL representing this file.
326328
*
327329
* @return the URL for the file.
328330
* @throws FileSystemException if an error occurs.

commons-vfs2/src/main/java/org/apache/commons/vfs2/FileSystemManager.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ public interface FileSystemManager extends AutoCloseable {
6666
void addOperationProvider(String scheme, FileOperationProvider operationProvider) throws FileSystemException;
6767

6868
/**
69+
* Adds an operation provider.
70+
*
6971
* @see FileSystemManager#addOperationProvider(String, org.apache.commons.vfs2.operations.FileOperationProvider)
7072
* @param schemes The schemes that will be associated with the provider.
7173
* @param operationProvider The FileOperationProvider to add.

commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultFileSystemConfigBuilder.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,11 @@ protected Class<? extends FileSystem> getConfigClass() {
5757
}
5858

5959
/**
60+
* Gets the UserAuthenticator parameter.
61+
*
6062
* @see #setUserAuthenticator
6163
* @param opts The FileSystemOptions.
62-
* @return The UserAuthenticator.
64+
* @return The UserAuthenticator parameter..
6365
*/
6466
public UserAuthenticator getUserAuthenticator(final FileSystemOptions opts) {
6567
return getParam(opts, "userAuthenticator");

commons-vfs2/src/main/java/org/apache/commons/vfs2/operations/AbstractFileOperation.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import org.apache.commons.vfs2.FileObject;
2020

2121
/**
22+
* Abstracts implementations of {@link FileOperation}.
2223
*
2324
* @since 0.1
2425
*/
@@ -39,7 +40,9 @@ public AbstractFileOperation(final FileObject file) {
3940
}
4041

4142
/**
42-
* @return an instance of FileObject which this FileOperation is operated on.
43+
* Gets the instance of FileObject for this FileOperation.
44+
*
45+
* @return the instance of FileObject for this FileOperation.
4346
*/
4447
protected FileObject getFileObject() {
4548
return fileObject;

commons-vfs2/src/main/java/org/apache/commons/vfs2/operations/AbstractFileOperationProvider.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import org.apache.commons.vfs2.FileSystemException;
2424

2525
/**
26+
* Abstracts implementations of {@link FileOperationProvider}.
2627
*
2728
* @since 0.1
2829
*/

commons-vfs2/src/main/java/org/apache/commons/vfs2/operations/DefaultFileOperations.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@
2525
import org.apache.commons.vfs2.FileSystemManager;
2626

2727
/**
28+
* The default implementations for {@link FileOperations}.
2829
*
2930
* @since 0.1
3031
*/
3132
public class DefaultFileOperations implements FileOperations {
33+
3234
/**
3335
*/
3436
private final FileSystemManager fsmanager;
@@ -38,6 +40,7 @@ public class DefaultFileOperations implements FileOperations {
3840
private final FileObject fileObject;
3941

4042
/**
43+
* Constructs a new instance.
4144
*
4245
* @param file The file.
4346
*/

commons-vfs2/src/main/java/org/apache/commons/vfs2/operations/FileOperations.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,29 @@
2525
* @since 0.1
2626
*/
2727
public interface FileOperations {
28+
2829
/**
30+
* Gets the file operation for the given class.
31+
*
2932
* @param operationClass the operation Class.
30-
* @return an operation implementing the given {@code operationClass}
33+
* @return an operation implementing the given {@code operationClass}.
3134
* @throws FileSystemException if an error occurs.
3235
*/
3336
FileOperation getOperation(Class<? extends FileOperation> operationClass) throws FileSystemException;
3437

3538
/**
36-
* @return all operations associated with the fileObject
39+
* Gets all operations associated with this instance.
40+
*
41+
* @return all operations associated with this instance.
3742
* @throws FileSystemException if an error occurs.
3843
*/
3944
Class<? extends FileOperation>[] getOperations() throws FileSystemException;
4045

4146
/**
47+
* Tests @return whether an operation {@code operationClass} is available.
48+
*
4249
* @param operationClass the operation Class.
43-
* @return if an operation {@code operationClass} is available
50+
* @return whether an operation {@code operationClass} is available.
4451
* @throws FileSystemException if an error occurs.
4552
*/
4653
boolean hasOperation(Class<? extends FileOperation> operationClass) throws FileSystemException;

commons-vfs2/src/main/java/org/apache/commons/vfs2/operations/vcs/VcsAdd.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,14 @@
2626
public interface VcsAdd extends FileOperation {
2727

2828
/**
29+
* Sets whether directories should be created.
2930
*
3031
* @param makedir true if directories should be created, false otherwise.
3132
*/
3233
void setMakedir(boolean makedir);
3334

3435
/**
36+
* Sets whether subdirectories should be processed.
3537
*
3638
* @param recursive true if subdirectories should be processed.
3739
*/

commons-vfs2/src/main/java/org/apache/commons/vfs2/operations/vcs/VcsCheckout.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,29 @@
2727
public interface VcsCheckout extends FileOperation {
2828

2929
/**
30-
* @param export if true, administrative .svn directories will not be created on the retrieved tree. The checkout
31-
* operation in this case is equivalent to export function.
30+
* Sets whether administrative .svn directories will not be created on the retrieved tree. The checkout operation in this case is equivalent to export
31+
* function.
32+
*
33+
* @param export if true, administrative .svn directories will not be created on the retrieved tree.
3234
*/
3335
void setExport(boolean export);
3436

3537
/**
38+
* Sets whether directories should be traversed.
3639
*
3740
* @param recursive true if directories should be traversed.
3841
*/
3942
void setRecursive(boolean recursive);
4043

4144
/**
45+
* Sets the revision number.
4246
*
4347
* @param revision The revision number.
4448
*/
4549
void setRevision(long revision);
4650

4751
/**
52+
* Sets directory under which retrieved files should be placed.
4853
*
4954
* @param targetDir directory under which retrieved files should be placed.
5055
*/

commons-vfs2/src/main/java/org/apache/commons/vfs2/operations/vcs/VcsCommit.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,28 @@
2626
public interface VcsCommit extends FileOperation {
2727

2828
/**
29+
* Sets the listener that is given control when a commit occurs.
2930
*
3031
* @param listener Listener that is given control when a commit occurs.
3132
*/
3233
void addCommitListener(VcsCommitListener listener);
3334

3435
/**
36+
* Removes the listener that is given control when a commit occurs.
3537
*
3638
* @param listener The Listener.
3739
*/
3840
void removeCommitListener(VcsCommitListener listener);
3941

4042
/**
43+
* Sets the message.
4144
*
4245
* @param message The message.
4346
*/
4447
void setMessage(String message);
4548

4649
/**
50+
* Sets whether directories should be traversed.
4751
*
4852
* @param isRecursive true if directories should be traversed.
4953
*/

0 commit comments

Comments
 (0)