Skip to content

Commit 529e993

Browse files
committed
in VFS.DeniedIOFS throw only exception without additional logging
1 parent 86aa0a7 commit 529e993

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

graalpython/org.graalvm.python.embedding/src/org/graalvm/python/embedding/utils/VirtualFileSystemImpl.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,52 +1187,52 @@ public Path parsePath(final String path) {
11871187

11881188
@Override
11891189
public void checkAccess(Path path, Set<? extends AccessMode> modes, LinkOption... linkOptions) {
1190-
throw securityException("VFS.checkAccess", String.format("filesystem without host IO: '%s'", path));
1190+
throw new SecurityException(String.format("filesystem without host IO: '%s'", path));
11911191
}
11921192

11931193
@Override
11941194
public void createDirectory(Path dir, FileAttribute<?>... attrs) {
1195-
throw securityException("VFS.createDirectory", String.format("filesystem without host IO: '%s'", dir));
1195+
throw new SecurityException(String.format("filesystem without host IO: '%s'", dir));
11961196
}
11971197

11981198
@Override
11991199
public void delete(Path path) {
1200-
throw securityException("VFS.delete", String.format("filesystem without host IO: '%s'", path));
1200+
throw new SecurityException(String.format("filesystem without host IO: '%s'", path));
12011201
}
12021202

12031203
@Override
12041204
public void copy(Path source, Path target, CopyOption... options) {
1205-
throw securityException("VFS.copy", String.format("filesystem without host IO: '%s', '%s'", source, target));
1205+
throw new SecurityException(String.format("filesystem without host IO: '%s', '%s'", source, target));
12061206
}
12071207

12081208
@Override
12091209
public void move(Path source, Path target, CopyOption... options) {
1210-
throw securityException("VFS.move", String.format("filesystem without host IO: '%s', '%s'", source, target));
1210+
throw new SecurityException(String.format("filesystem without host IO: '%s', '%s'", source, target));
12111211
}
12121212

12131213
@Override
12141214
public SeekableByteChannel newByteChannel(Path inPath, Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IOException {
1215-
throw securityException("VFS.newByteChannel", String.format("Filesystem without host IO: '%s'", inPath));
1215+
throw new SecurityException(String.format("Filesystem without host IO: '%s'", inPath));
12161216
}
12171217

12181218
@Override
12191219
public DirectoryStream<Path> newDirectoryStream(Path dir, DirectoryStream.Filter<? super Path> filter) throws IOException {
1220-
throw securityException("VFS.newDirectoryStream", String.format("filesystem without host IO: '%s'", dir));
1220+
throw new SecurityException(String.format("filesystem without host IO: '%s'", dir));
12211221
}
12221222

12231223
@Override
12241224
public Map<String, Object> readAttributes(Path path, String attributes, LinkOption... options) {
1225-
throw securityException("VFS.readAttributes", String.format("filesystem without host IO: '%s'", path));
1225+
throw new SecurityException(String.format("filesystem without host IO: '%s'", path));
12261226
}
12271227

12281228
@Override
12291229
public void setAttribute(Path path, String attribute, Object value, LinkOption... options) {
1230-
throw securityException("VFS.setAttribute", String.format("filesystem without host IO: '%s'", path));
1230+
throw new SecurityException(String.format("filesystem without host IO: '%s'", path));
12311231
}
12321232

12331233
@Override
12341234
public Path toAbsolutePath(Path path) {
1235-
throw securityException("VFS.toAbsolutePath", String.format("filesystem without host IO: '%s'", path));
1235+
throw new SecurityException(String.format("filesystem without host IO: '%s'", path));
12361236
}
12371237

12381238
@Override
@@ -1241,32 +1241,32 @@ public void setCurrentWorkingDirectory(Path currentWorkingDirectory) {
12411241

12421242
@Override
12431243
public Path toRealPath(Path path, LinkOption... linkOptions) {
1244-
throw securityException("VFS.toRealPath", String.format("filesystem without host IO: '%s'", path));
1244+
throw new SecurityException(String.format("filesystem without host IO: '%s'", path));
12451245
}
12461246

12471247
@Override
12481248
public Path getTempDirectory() {
1249-
throw securityException("VFS.getTempDirectory", String.format("filesystem without host IO"));
1249+
throw new SecurityException(String.format("filesystem without host IO"));
12501250
}
12511251

12521252
@Override
12531253
public void createLink(Path link, Path existing) {
1254-
throw securityException("VFS.createLink", String.format("filesystem without host IO: '%s'", link));
1254+
throw new SecurityException(String.format("filesystem without host IO: '%s'", link));
12551255
}
12561256

12571257
@Override
12581258
public void createSymbolicLink(Path link, Path target, FileAttribute<?>... attrs) {
1259-
throw securityException("VFS.createSymbolicLink", String.format("filesystem without host IO: '%s', '%s'", link, target));
1259+
throw new SecurityException(String.format("filesystem without host IO: '%s', '%s'", link, target));
12601260
}
12611261

12621262
@Override
12631263
public Path readSymbolicLink(Path link) {
1264-
throw securityException("VFS.readSymbolicLink", String.format("filesystem without host IO: '%s'", link));
1264+
throw new SecurityException(String.format("filesystem without host IO: '%s'", link));
12651265
}
12661266

12671267
@Override
12681268
public boolean isSameFile(Path path1, Path path2, LinkOption... options) {
1269-
throw securityException("VFS.isSameFile", String.format("filesystem without host IO: '%s', '%s'", path1, path2));
1269+
throw new SecurityException(String.format("filesystem without host IO: '%s', '%s'", path1, path2));
12701270
}
12711271
}
12721272

0 commit comments

Comments
 (0)