mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-18 10:14:58 +00:00
Config import: add support for environment variables
This commit is contained in:
1 parent
df4501a648
commit
0e583c0122
8 files changed
+61
-10
No files matched your search
@@ -0,0 +1 @@
|
||||
lombok.accessors.prefix += x_
|
||||
@@ -1,6 +1,9 @@
|
||||
import missing
|
||||
import import1.config
|
||||
import ../d111/import1.config
|
||||
import ../../../archives/a1.jar
|
||||
lombok.accessors.prefix += z_
|
||||
import missing
|
||||
import import1.config
|
||||
import ../d111/import1.config
|
||||
import ../../../archives/a1.jar
|
||||
import directory
|
||||
import <env>/environment.config
|
||||
import ~/home.config
|
||||
lombok.accessors.prefix += z_
|
||||
lombok.accessors.prefix += f
|
||||
@@ -0,0 +1 @@
|
||||
lombok.accessors.prefix += e_
|
||||
@@ -1,4 +1,5 @@
|
||||
Problems in the configuration files:
|
||||
- Imported file does not exist: import missing (BASE/d1/d11/d111/import1.config:1)
|
||||
- Imported file does not exist: import directory (BASE/d1/d11/d111/import1.config:5)
|
||||
- Import is not valid: import /illegal (BASE/archives/a1.jar!lombok.config:2)
|
||||
- Imported file does not exist: import nonexisting (BASE/archives/a1.jar!d1/include.config:2)
|
||||
@@ -0,0 +1 @@
|
||||
lombok.accessors.prefix += h_
|
||||
@@ -51,15 +51,23 @@ clear lombok.accessors.chain
|
||||
# 3: clear lombok.accessors.chain
|
||||
|
||||
# Strip this field prefix, like 'f' or 'm_', from the names of generated getters and setters.
|
||||
lombok.accessors.prefix += e_
|
||||
lombok.accessors.prefix += h_
|
||||
lombok.accessors.prefix += z_
|
||||
lombok.accessors.prefix += f
|
||||
lombok.accessors.prefix += m_
|
||||
# BASE/d1/d11/lombok.config (stopped bubbling):
|
||||
# 5: lombok.accessors.prefix += f
|
||||
#
|
||||
# BASE/e1/environment.config (imported from BASE/d1/d11/d111/import1.config:6):
|
||||
# 1: lombok.accessors.prefix += e_
|
||||
#
|
||||
# BASE/home/home.config (imported from BASE/d1/d11/d111/import1.config:7):
|
||||
# 1: lombok.accessors.prefix += h_
|
||||
#
|
||||
# BASE/d1/d11/d111/import1.config (imported from BASE/d1/d11/d111/lombok.config:1):
|
||||
# 5: lombok.accessors.prefix += z_
|
||||
# 6: lombok.accessors.prefix += f
|
||||
# 8: lombok.accessors.prefix += z_
|
||||
# 9: lombok.accessors.prefix += f
|
||||
#
|
||||
# BASE/d1/d11/d111/lombok.config:
|
||||
# 4: lombok.accessors.prefix += m_
|
||||
|
||||
@@ -52,7 +52,15 @@ public class TestConfiguration {
|
||||
PrintStream outStream = new PrintStream(rawOut);
|
||||
PrintStream errStream = new PrintStream(rawErr);
|
||||
|
||||
int result = new ConfigurationApp().redirectOutput(outStream, errStream).display(keys, true, paths, true, false);
|
||||
ConfigurationFile.setEnvironment("env", normalizedName + "/e1");
|
||||
String userHome = System.getProperty("user.home");
|
||||
int result = -1;
|
||||
try {
|
||||
System.setProperty("user.home", normalizedName + "/home");
|
||||
result = new ConfigurationApp().redirectOutput(outStream, errStream).display(keys, true, paths, true, false);
|
||||
} finally {
|
||||
System.setProperty("user.home", userHome);
|
||||
}
|
||||
|
||||
outStream.flush();
|
||||
errStream.flush();
|
||||
|
||||
Reference in new issue
Block a user