Skip to content

Commit 35a74ee

Browse files
committed
clean up
1 parent 713c6cb commit 35a74ee

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

core/src/main/java/lucee/commons/io/res/type/file/FileResource.java

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,12 @@ public void copyTo(Resource res, boolean append) throws IOException {
131131
}
132132

133133
/**
134-
* LDEV-6095: after copy, ensure the owner can read/write the new file without altering group/other bits
135-
* (ModeUtil-based setReadable/setWritable would set all roles and break mode preservation).
134+
* LDEV-6095: after copy, ensure the owner can read/write the new file without altering group/other
135+
* bits (ModeUtil-based setReadable/setWritable would set all roles and break mode preservation).
136136
* When {@code attributeCopyUsed} is true, {@link StandardCopyOption#COPY_ATTRIBUTES} already copied
137137
* readonly/hidden/etc.; only add missing owner write when the POSIX mode lacks it (e.g. chmod 444).
138-
* Readonly set via {@link #setWritable(boolean)} is tracked with a user xattr so it can be distinguished
139-
* from a plain {@code fileSetAccessMode} change during copy.
138+
* Readonly set via {@link #setWritable(boolean)} is tracked with a user xattr so it can be
139+
* distinguished from a plain {@code fileSetAccessMode} change during copy.
140140
*/
141141
private static void applyPermissionsAfterCopy(Resource dest, Resource source, boolean attributeCopyUsed) {
142142
if (dest instanceof FileResource) {
@@ -278,7 +278,7 @@ private static boolean hasReadonlyAttribute(Path path) {
278278
try {
279279
UserDefinedFileAttributeView view = Files.getFileAttributeView(path, UserDefinedFileAttributeView.class);
280280
if (view == null || !view.list().contains(READONLY_ATTRIBUTE)) return false;
281-
int size = (int) view.size(READONLY_ATTRIBUTE);
281+
int size = view.size(READONLY_ATTRIBUTE);
282282
ByteBuffer buf = ByteBuffer.allocate(size);
283283
view.read(READONLY_ATTRIBUTE, buf);
284284
buf.flip();
@@ -663,8 +663,7 @@ public boolean renameTo(Resource dest) {
663663
moveTo(dest);
664664
return true;
665665
}
666-
catch (IOException e) {
667-
}
666+
catch (IOException e) {}
668667
return false;
669668
}
670669

@@ -880,8 +879,7 @@ public boolean exists() {
880879
try {
881880
provider.read(this);
882881
}
883-
catch (IOException e) {
884-
}
882+
catch (IOException e) {}
885883

886884
return super.exists();
887885
}

0 commit comments

Comments
 (0)