Skip to content

Commit 1c1c86e

Browse files
committed
stop using deprecated allowHostAccess(true)
1 parent 2be079a commit 1c1c86e

File tree

1 file changed

+2
-1
lines changed
  • graalpython/graalpy-archetype-polyglot-app/src/main/resources/archetype-resources/src/main/java

1 file changed

+2
-1
lines changed

graalpython/graalpy-archetype-polyglot-app/src/main/resources/archetype-resources/src/main/java/GraalPy.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
import org.graalvm.polyglot.PolyglotException;
5050
import org.graalvm.polyglot.Source;
5151
import org.graalvm.polyglot.Value;
52+
import org.graalvm.polyglot.HostAccess;
5253
import org.graalvm.polyglot.io.IOAccess;
5354
import java.io.IOException;
5455
import org.graalvm.python.embedding.vfs.VirtualFileSystem;
@@ -71,7 +72,7 @@ public static Context getContext() {
7172
// setting false will deny all privileges unless configured below
7273
.allowAllAccess(false)
7374
// allows python to access the java language
74-
.allowHostAccess(true)
75+
.allowHostAccess(HostAccess.ALL)
7576
// allow access to the virtual and the host filesystem, as well as sockets
7677
.allowIO(IOAccess.newBuilder()
7778
.allowHostSocketAccess(true)

0 commit comments

Comments
 (0)