src/main/java/org/s2n/ddt/bean/UtlConf.java
public static void initialize() {
		String filePath = getConfigFilePath();
		InputStream is = null;
		try {
			is = new BufferedInputStream(new FileInputStream(filePath));
			Properties p = new Properties();
			p.load(is);
			updateProps(p, true);
			String sddtHomeDir = mainProps.getProperty("ddtHomeDir", "/data/ddt");
			setDdtHomeDir(new File(sddtHomeDir));
			appVerifierHomeDir = mainProps.getProperty("verifiers.home", appVerifierHomeDir);// {r}
			String second = mainProps.getProperty("props.2", null);
			String secondE = mainProps.getProperty("props.2.enabled", null);
			if(second != null && LangUtils.isTrue(secondE, false)){
				logger.warn("INFO : loading more props (will be added or replaced) from :" + second + ".");
				is.close();
				is = new BufferedInputStream(new FileInputStream(second));
				p.clear();
				p.load(is);
				updateProps(p, false);
			}
		} catch (Exception e) {
			logger.warn("UtlConf Init " + e, e);
		} finally {
			if (is != null) {
				try {
					is.close();
				} catch (Exception e2) {
					logger.warn("UtlConf Init close is :" + e2, e2);
				}
			}
		}
	}
/**
	 * Method to initialize the properties and the data source by using the database properties configured in user defined file
	 */
Method to initialize the properties and the data source by using the database properties configured in user defined file
Method to initialize the properties and the data source by using the database properties configured in user defined file
public static void initialize() {
		String filePath = getConfigFilePath();
		InputStream is = null;
		try {
			is = new BufferedInputStream(new FileInputStream(filePath));
			Properties p = new Properties();
			p.load(is);
			updateProps(p, true);
			String sddtHomeDir = mainProps.getProperty("ddtHomeDir", "/data/ddt");
			setDdtHomeDir(new File(sddtHomeDir));
			appVerifierHomeDir = mainProps.getProperty("verifiers.home", appVerifierHomeDir);
			String second = mainProps.getProperty("props.2", null);
			String secondE = mainProps.getProperty("props.2.enabled", null);
			if(second != null && LangUtils.isTrue(secondE, false)){
				logger.warn("INFO : loading more props (will be added or replaced) from :" + second + ".");
				is.close();
				is = new BufferedInputStream(new FileInputStream(second));
				p.clear();
				p.load(is);
				updateProps(p, false);
			}
		} catch (Exception e) {
			logger.warn("UtlConf Init " + e, e);
		} finally {
			if (is != null) {
				try {
					is.close();
				} catch (Exception e2) {
					logger.warn("UtlConf Init close is :" + e2, e2);
				}
			}
		}
	}
public static void initialize ( ) { String filePath = getConfigFilePath ( ) ; InputStream is = null ; try { is = new BufferedInputStream ( new FileInputStream ( filePath ) ) ; Properties p = new Properties ( ) ; p . load ( is ) ; updateProps ( p , true ) ; String sddtHomeDir = mainProps . getProperty ( "ddtHomeDir" , "/data/ddt" ) ; setDdtHomeDir ( new File ( sddtHomeDir ) ) ; appVerifierHomeDir = mainProps . getProperty ( "verifiers.home" , appVerifierHomeDir ) ; String second = mainProps . getProperty ( "props.2" , null ) ; String secondE = mainProps . getProperty ( "props.2.enabled" , null ) ; if ( second != null && LangUtils . isTrue ( secondE , false ) ) { logger . warn ( "INFO : loading more props (will be added or replaced) from :" + second + "." ) ; is . close ( ) ; is = new BufferedInputStream ( new FileInputStream ( second ) ) ; p . clear ( ) ; p . load ( is ) ; updateProps ( p , false ) ; } } catch ( Exception e ) { logger . warn ( "UtlConf Init " + e , e ) ; } finally { if ( is != null ) { try { is . close ( ) ; } catch ( Exception e2 ) { logger . warn ( "UtlConf Init close is :" + e2 , e2 ) ; } } } }
Method to initialize the properties and the data source by using the database properties configured in user defined file
Method to initialize the properties and the data source by using the database properties configured in user defined file
// {r}