Skip to content

Commit b9955b8

Browse files
Copilotslachiewicz
andcommitted
Update File-based method deprecations to reference Java NIO APIs directly
Co-authored-by: slachiewicz <[email protected]>
1 parent 13e715d commit b9955b8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/main/java/org/codehaus/plexus/components/io/attributes/AttributeUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public static PosixFileAttributes getPosixFileAttributes(@Nonnull Path path) thr
115115
}
116116

117117
/**
118-
* @deprecated Use {@link #getPosixFileAttributes(Path)} instead
118+
* @deprecated Use {@link Files#readAttributes(Path, Class, java.nio.file.LinkOption...)} directly
119119
*/
120120
@Deprecated
121121
@Nonnull
@@ -161,7 +161,7 @@ public static FileOwnerAttributeView getFileOwnershipInfo(@Nonnull Path path) th
161161
}
162162

163163
/**
164-
* @deprecated Use {@link #getFileOwnershipInfo(Path)} instead
164+
* @deprecated Use {@link Files#getFileAttributeView(Path, Class, java.nio.file.LinkOption...)} directly
165165
*/
166166
@Deprecated
167167
@Nullable

src/main/java/org/codehaus/plexus/components/io/attributes/SymlinkUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public class SymlinkUtils {
4646
* @param symlink A file that is a symlink
4747
* @return A file that is the target of the symlink
4848
* @throws java.io.IOException
49-
* @deprecated Use {@link #readSymbolicLink(Path)} instead
49+
* @deprecated Use {@link Files#readSymbolicLink(Path)} directly
5050
*/
5151
@Deprecated
5252
public static @Nonnull File readSymbolicLink(@Nonnull File symlink) throws IOException {
@@ -65,7 +65,7 @@ public class SymlinkUtils {
6565
}
6666

6767
/**
68-
* @deprecated Use {@link #createSymbolicLink(Path, Path)} instead
68+
* @deprecated Use {@link Files#createSymbolicLink(Path, Path, java.nio.file.attribute.FileAttribute[])} directly
6969
*/
7070
@Deprecated
7171
public static @Nonnull File createSymbolicLink(@Nonnull File symlink, File target) throws IOException {

0 commit comments

Comments
 (0)