You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2021/03/04 07:13:02 UTC

[GitHub] [zookeeper] eolivelli commented on a change in pull request #1620: ZOOKEEPER-4230: tmp is not configurable in zookeeper-contrib-rest

eolivelli commented on a change in pull request #1620:
URL: https://github.com/apache/zookeeper/pull/1620#discussion_r587207166



##########
File path: zookeeper-contrib/zookeeper-contrib-rest/src/main/java/org/apache/zookeeper/server/jersey/RestMain.java
##########
@@ -53,7 +53,7 @@ public void start() throws IOException {
        System.out.println("Starting grizzly ...");
 
        boolean useSSL = cfg.useSSL();
-       gws = new GrizzlyWebServer(cfg.getPort(), "/tmp/23cxv45345/2131xc2/", useSSL);
+       gws = new GrizzlyWebServer(cfg.getPort(), System.getProperty("java.io.tmpdir","/tmp") + "/23cxv45345/2131xc2/", useSSL);

Review comment:
       Can we use this utility function ?
   https://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html#createTempDirectory%28java.nio.file.Path,%20java.lang.String,%20java.nio.file.attribute.FileAttribute...%29




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org