You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/java/com/bettercloud/vault/VaultConfig.java
+9-5Lines changed: 9 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -43,15 +43,19 @@ public class VaultConfig implements Serializable {
43
43
* <p>The code used to load environment variables is encapsulated here, so that a mock version of that environment
44
44
* loader can be used by unit tests.</p>
45
45
*
46
-
* <p>This method is used by unit tests, to inject a mock environment variable when constructing a
47
-
* <code>VaultConfig</code> instance using the builder pattern approach rather than the convenience constructor.
48
-
* There really shouldn't ever be a need to call this method outside of a unit test context (hence the
49
-
* <code>protected</code> access level).</p>
46
+
* <p>This method is primarily intended for use by unit tests, to inject a mock environment variable when
47
+
* constructing a <code>VaultConfig</code> instance using the builder pattern approach rather than the convenience
48
+
* constructor. This method's access level was therefore originally set to <code>protected</code>, but was bumped
49
+
* up to <code>public</code> due to community request for the ability to disable environment loading altogether
50
+
* (see https://github.com/BetterCloud/vault-java-driver/issues/77).
51
+
*
52
+
* Note that if you do override this, however, then obviously all of the environment checking discussed in the
53
+
* documentation becomes disabled.
50
54
*
51
55
* @param environmentLoader An environment variable loader implementation (presumably a mock)
52
56
* @return This object, with environmentLoader populated, ready for additional builder-pattern method calls or else finalization with the build() method
0 commit comments