|
From: <pe...@us...> - 2004-02-19 15:40:12
|
Update of /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/sql In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16429/src/java/org/neuclear/commons/sql Modified Files: SQLTools.java Log Message: Various cleanups and corrections Index: SQLTools.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/sql/SQLTools.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SQLTools.java 3 Dec 2003 23:22:06 -0000 1.4 --- SQLTools.java 19 Feb 2004 15:29:10 -0000 1.5 *************** *** 27,30 **** --- 27,33 ---- */ public final class SQLTools { + private SQLTools() { + } + private static final String PROPS_FILE = "neuclear-sql.properties"; *************** *** 40,48 **** e.printStackTrace(); //To change body of catch statement use Options | File Templates. } ! return DriverManager.getConnection( ! props.getProperty("jdbc.url"), props.getProperty("jdbc.username"), ! props.getProperty("jdbc.password") ! ); } --- 43,49 ---- e.printStackTrace(); //To change body of catch statement use Options | File Templates. } ! return DriverManager.getConnection(props.getProperty("jdbc.url"), props.getProperty("jdbc.username"), ! props.getProperty("jdbc.password")); } *************** *** 51,56 **** static Properties loadProperties() throws IOException { final Properties props = new Properties(); ! final File propsFile = new File( ! System.getProperty("user.home") + System.getProperty("file.separator") + PROPS_FILE); --- 52,56 ---- static Properties loadProperties() throws IOException { final Properties props = new Properties(); ! final File propsFile = new File(System.getProperty("user.home") + System.getProperty("file.separator") + PROPS_FILE); |