X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=src%2Flib%2Flttng-ust-java-agent%2Fjava%2Flttng-ust-agent-common%2Forg%2Flttng%2Fust%2Fagent%2Fclient%2FLttngTcpSessiondClient.java;h=cb84087af6a42fc81aa434dd7ec1018098c3e567;hb=8bc1125eb851b2c52d3263c2992e6806017e98e7;hp=2c44a0df98f5455c3eb15cc7c2f5a3bc05e85f1a;hpb=deffa838eb1b62a4576b66139a9a1cfafb42e4d5;p=lttng-ust.git diff --git a/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-common/org/lttng/ust/agent/client/LttngTcpSessiondClient.java b/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-common/org/lttng/ust/agent/client/LttngTcpSessiondClient.java index 2c44a0df..cb84087a 100644 --- a/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-common/org/lttng/ust/agent/client/LttngTcpSessiondClient.java +++ b/src/lib/lttng-ust-java-agent/java/lttng-ust-agent-common/org/lttng/ust/agent/client/LttngTcpSessiondClient.java @@ -197,29 +197,15 @@ public class LttngTcpSessiondClient implements Runnable { private static String getHomePath() { /* - * The environment variable LTTNG_UST_HOME overrides LTTNG_HOME - * if present. * The environment variable LTTNG_HOME overrides HOME if * defined. */ - String lttngUstHomePath = System.getenv("LTTNG_UST_HOME"); - String lttngHomePath = System.getenv("LTTNG_HOME"); - - if (lttngUstHomePath != null) { - /* - * LTTNG_UST_HOME has priority over LTTNG_HOME and user - * home directory. - */ - return lttngUstHomePath; - } + String homePath = System.getenv("LTTNG_HOME"); - if (lttngHomePath != null) { - /* LTTNG_HOME has priority over user home directory. */ - return lttngHomePath; + if (homePath == null) { + homePath = System.getProperty("user.home"); } - - /* Default to the user home directory. */ - return System.getProperty("user.home"); + return homePath; } /**