--- dao/FuldDaekningWorker/src/dk/daoas/fulddaekning/Lookup.java 2014/05/08 09:12:00 2155 +++ dao/FuldDaekningWorker/src/dk/daoas/fulddaekning/Lookup.java 2014/06/19 10:24:16 2192 @@ -14,10 +14,13 @@ import dk.daoas.fulddaekning.BoundingBox.BoundingBoxException; public class Lookup { + + static final String CONFIG_FILENAME = "fulddaekning.properties"; + static int max_workers; static boolean verbose; - static Properties conf; + static SafeProperties conf; static Logger logger = Logger.getLogger( Lookup.class.toString() ); int postnr; @@ -155,19 +158,19 @@ public static void main(String[] args) throws Exception { - File confFile = new File("fulddaekning.properties"); + File confFile = new File( CONFIG_FILENAME ); if (! confFile.exists() ) { - logger.warning("Config file not found"); + logger.warning("Config file not found: " + CONFIG_FILENAME); System.exit(1); } - conf = new Properties(); + conf = new SafeProperties(); conf.load( new FileReader(confFile) ); - max_workers = Integer.parseInt( conf.getProperty("MAX_WORKERS") ); + max_workers = Integer.parseInt( conf.getSafeProperty("MAX_WORKERS") ); logger.info("Starting with MAX_WORKERS:" + max_workers); - verbose = Boolean.parseBoolean( conf.getProperty("VERBOSE") ); + verbose = Boolean.parseBoolean( conf.getSafeProperty("VERBOSE") ); logger.info("Starting with VERBOSE:" + verbose); Database db = new Database(conf); @@ -188,6 +191,8 @@ lookup.doLookup(); } + db.renameResultTables(); + long now = System.currentTimeMillis(); logger.info("Flest Ikke-dækkede, " + flestIkkeDaekkede);