Commits

tbrugz  committed b260744

sqldump: changes in init() warnings

  • Participants
  • Parent commits be23086

Comments (0)

Files changed (1)

File src/tbrugz/sqldump/SQLDump.java

 	public static void init(String[] args, Properties papp) throws IOException {
 		log.info("init...");
 		boolean useSysPropSetted = false;
+		boolean propFilenameSetted = false;
 		//parse args
 		String propFilename = PROPERTIES_FILENAME;
 		for(String arg: args) {
 			if(arg.indexOf(PARAM_PROPERTIES_FILENAME)==0) {
 				propFilename = arg.substring(PARAM_PROPERTIES_FILENAME.length());
+				propFilenameSetted = true;
 			}
 			else if(arg.indexOf(PARAM_USE_SYSPROPERTIES)==0) {
 				String useSysProp = arg.substring(PARAM_USE_SYSPROPERTIES.length());
 			papp.load(new FileInputStream(propFile));
 		}
 		catch(FileNotFoundException e) {
-			log.warn("prop file not found: "+propFile);
+			if(propFilenameSetted) {
+				log.warn("prop file not found: "+propFile);
+			}
 		}
 		
 		ColTypeUtil.setProperties(papp);