/** * Load the file returning the property map. * @param p an existing property map to load into. * @param fileName the name of the properties file to load. */ public static PropertyMap load(PropertyMap p, String fileName){ InputStream is = findInputStream(fileName); if (is == null){ logger.severe(fileName+" not found"); return p; } else { return load(p, is); } }
/** * Load the file returning the property map. * * @param p an existing property map to load into. * @param fileName the name of the properties file to load. */ public static PropertyMap load(PropertyMap p, String fileName) { InputStream is = findInputStream(fileName); if (is == null) { return p; } else { return load(p, is); } }
/** * Load the file returning the property map. * * @param p * an existing property map to load into. * @param fileName * the name of the properties file to load. */ public static PropertyMap load(PropertyMap p, String fileName) { InputStream is = findInputStream(fileName); if (is == null) { logger.severe(fileName + " not found"); return p; } else { return load(p, is); } }
public static PropertyMap load(PropertyMap p, Properties props) { if (p == null) { p = new PropertyMap(); } // put values in initially without any evaluation for (Map.Entry<Object, Object> entry : props.entrySet()) { String key = ((String) entry.getKey()).toLowerCase(); String val = ((String) entry.getValue()); if (val != null) { val = val.trim(); } p.put(key, val); } p.evaluateProperties(); String otherProps = p.remove("load.properties"); if (otherProps == null) { otherProps = p.remove("load.properties.override"); } if (otherProps != null) { otherProps = otherProps.replace("\\", "/"); InputStream is = findInputStream(otherProps); if (is != null) { logger.debug("loading properties from " + otherProps); load(p, is); } else { logger.error("load.properties " + otherProps + " not found."); } } return p; }
InputStream is = findInputStream(otherProps); if (is != null) { logger.fine("loading properties from " + otherProps);
InputStream is = findInputStream(otherProps); if (is != null){ logger.fine("loading properties from "+otherProps);