staticMap = new HashMap<>();\r
localMap = new HashMap<>();\r
\r
- if(tag!=null) {\r
+ if (tag!=null) {\r
String tequals = tag + '=';\r
- for(String arg : args) {\r
- if(arg.startsWith(tequals) && !arg.equals(tequals)) { // needs to have something after =\r
+ for (String arg : args) {\r
+ if (arg.startsWith(tequals) && !arg.equals(tequals)) { // needs to have something after =\r
Properties props = new Properties();\r
- for(String f : Split.split(File.pathSeparatorChar,arg.substring(tequals.length()))) {\r
+ for (String f : Split.split(File.pathSeparatorChar,arg.substring(tequals.length()))) {\r
moreProps(new File(f),props);\r
}\r
- for(Entry<Object, Object> es : props.entrySet()) {\r
+ for (Entry<Object, Object> es : props.entrySet()) {\r
put(staticSlot(es.getKey().toString()),es.getValue());\r
}\r
}\r
staticMap = new HashMap<>();\r
localMap = new HashMap<>();\r
\r
- if(tag!=null) {\r
+ if (tag!=null) {\r
String fname = props.getProperty(tag);\r
- if(fname!=null) {\r
- for(String f : Split.split(File.pathSeparatorChar,fname)) {\r
- if(!moreProps(new File(f),props)) {\r
+ if (fname!=null) {\r
+ for (String f : Split.split(File.pathSeparatorChar,fname)) {\r
+ if (!moreProps(new File(f),props)) {\r
System.err.println("Unable to load Properties from " + f); \r
}\r
}\r
}\r
}\r
\r
- for(Entry<Object, Object> es : props.entrySet()) {\r
+ for (Entry<Object, Object> es : props.entrySet()) {\r
put(staticSlot(es.getKey().toString()),es.getValue());\r
}\r
}\r
\r
public void propsFromArgs(String tag, String[] args) {\r
- if(tag!=null) {\r
- for(String arg : args) {\r
+ if (tag!=null) {\r
+ for (String arg : args) {\r
String sarg[] = Split.split('=',arg);\r
- if(sarg.length==2) {\r
- if(tag.equals(sarg[0])) {\r
- for(String fname : Split.split(File.pathSeparatorChar,sarg[1])) {\r
+ if (sarg.length==2) {\r
+ if (tag.equals(sarg[0])) {\r
+ for (String fname : Split.split(File.pathSeparatorChar,sarg[1])) {\r
moreProps(new File(fname),null /* no target */);\r
}\r
}\r
}\r
\r
private boolean moreProps(File f, Properties target) {\r
- if(f.exists()) {\r
+ if (f.exists()) {\r
Properties props = new Properties();\r
try {\r
FileInputStream fis = new FileInputStream(f);\r
try {\r
props.load(fis);\r
- if(target!=null) {\r
+ if (target!=null) {\r
target.load(fis);\r
}\r
} finally {\r
fis.close();\r
}\r
- } catch(IOException e) {\r
+ } catch (IOException e) {\r
System.err.println(e);\r
}\r
- for(Entry<Object, Object> es : props.entrySet()) {\r
+ for (Entry<Object, Object> es : props.entrySet()) {\r
put(staticSlot(es.getKey().toString()),es.getValue());\r
}\r
return true;\r