Skip to content

Commit 4e58dd2

Browse files
committed
update
1 parent d74f9a2 commit 4e58dd2

File tree

1 file changed

+5
-4
lines changed
  • databricks-sdk-java/src/main/java/com/databricks/sdk/core

1 file changed

+5
-4
lines changed

databricks-sdk-java/src/main/java/com/databricks/sdk/core/UserAgent.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,13 @@ private static List<CicdProvider> listCiCdProviders() {
160160
);
161161
}
162162

163-
// Volatile fields to ensure thread-safe lazy initialization
163+
// Volatile field to ensure thread-safe lazy initialization
164164
// The 'volatile' keyword ensures that changes to these variables
165165
// are immediately visible to all threads. It prevents instruction
166166
// reordering by the compiler.
167-
protected static volatile String cicdProvider = null;
168-
protected static volatile Environment env = null;
167+
private static volatile String cicdProvider = null;
168+
169+
protected static Environment env = null;
169170

170171
// Represents an environment variable with its name and expected value
171172
private static class EnvVar {
@@ -228,7 +229,7 @@ private static String cicdProvider() {
228229
return cicdProvider;
229230
}
230231

231-
protected static Environment env() {
232+
private static Environment env() {
232233
if (env == null) {
233234
env = new Environment(System.getenv(), System.getenv("PATH").split(File.pathSeparator), System.getProperty("os.name"));
234235
}

0 commit comments

Comments
 (0)