@@ -42,7 +42,7 @@ public class MountableFile implements Transferable {
4242 private static final int BASE_DIR_MODE = 0040000 ;
4343
4444 private final String path ;
45- private final int forcedFileMode ;
45+ private final Integer forcedFileMode ;
4646
4747 @ Getter (lazy = true )
4848 private final String resolvedPath = resolvePath ();
@@ -59,7 +59,7 @@ public class MountableFile implements Transferable {
5959 * @return a {@link MountableFile} that may be used to obtain a mountable path
6060 */
6161 public static MountableFile forClasspathResource (@ NotNull final String resourceName ) {
62- return forClasspathResource (resourceName , - 1 );
62+ return forClasspathResource (resourceName , null );
6363 }
6464
6565 /**
@@ -69,7 +69,7 @@ public static MountableFile forClasspathResource(@NotNull final String resourceN
6969 * @return a {@link MountableFile} that may be used to obtain a mountable path
7070 */
7171 public static MountableFile forHostPath (@ NotNull final String path ) {
72- return forHostPath (path , - 1 );
72+ return forHostPath (path , null );
7373 }
7474
7575 /**
@@ -79,7 +79,7 @@ public static MountableFile forHostPath(@NotNull final String path) {
7979 * @return a {@link MountableFile} that may be used to obtain a mountable path
8080 */
8181 public static MountableFile forHostPath (final Path path ) {
82- return forHostPath (path , - 1 );
82+ return forHostPath (path , null );
8383 }
8484
8585 /**
@@ -89,7 +89,7 @@ public static MountableFile forHostPath(final Path path) {
8989 * @param mode octal value of posix file mode (000..777)
9090 * @return a {@link MountableFile} that may be used to obtain a mountable path
9191 */
92- public static MountableFile forClasspathResource (@ NotNull final String resourceName , int mode ) {
92+ public static MountableFile forClasspathResource (@ NotNull final String resourceName , Integer mode ) {
9393 return new MountableFile (getClasspathResource (resourceName , new HashSet <>()).toString (), mode );
9494 }
9595
@@ -100,7 +100,7 @@ public static MountableFile forClasspathResource(@NotNull final String resourceN
100100 * @param mode octal value of posix file mode (000..777)
101101 * @return a {@link MountableFile} that may be used to obtain a mountable path
102102 */
103- public static MountableFile forHostPath (@ NotNull final String path , int mode ) {
103+ public static MountableFile forHostPath (@ NotNull final String path , Integer mode ) {
104104 return new MountableFile (new File (path ).toURI ().toString (), mode );
105105 }
106106
@@ -111,7 +111,7 @@ public static MountableFile forHostPath(@NotNull final String path, int mode) {
111111 * @param mode octal value of posix file mode (000..777)
112112 * @return a {@link MountableFile} that may be used to obtain a mountable path
113113 */
114- public static MountableFile forHostPath (final Path path , int mode ) {
114+ public static MountableFile forHostPath (final Path path , Integer mode ) {
115115 return new MountableFile (path .toAbsolutePath ().toString (), mode );
116116 }
117117
@@ -345,7 +345,7 @@ public int getFileMode() {
345345
346346 private int getUnixFileMode (final String pathAsString ) {
347347 final Path path = Paths .get (pathAsString );
348- if (this .forcedFileMode > - 1 ) {
348+ if (this .forcedFileMode != null ) {
349349 return this .getModeValue (path );
350350 }
351351
0 commit comments