You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by fu...@apache.org on 2007/04/11 01:36:33 UTC

svn commit: r527339 - in /db/derby/code/trunk/java: testing/org/apache/derbyTesting/functionTests/util/IjTestCase.java tools/org/apache/derby/impl/tools/ij/utilMain.java

Author: fuzzylogic
Date: Tue Apr 10 16:36:32 2007
New Revision: 527339

URL: http://svn.apache.org/viewvc?view=rev&rev=527339
Log:
Fix testclientij in some environments. The script is loaded by getResourceAsStream, so need to use all forward slashes instead of File.separator to specify the
file name. Also get a couple of ij properties using util.getSystemProperty instead of putting the access in their own priv blocks. 

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/IjTestCase.java
    db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/utilMain.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/IjTestCase.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/IjTestCase.java?view=diff&rev=527339&r1=527338&r2=527339
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/IjTestCase.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/IjTestCase.java Tue Apr 10 16:36:32 2007
@@ -50,7 +50,7 @@
 	public IjTestCase(String name) {
 		super(name);
 		scriptName = getName() + ".sql";
-		outfileName = SupportFilesSetup.EXTINOUT + File.separator + getName() + ".out";
+		outfileName = SupportFilesSetup.EXTINOUT + "/" + getName() + ".out";
 		outfile = new File(outfileName);
 	}
 	
@@ -59,7 +59,7 @@
 		setSystemProperty("ij.outfile", outfileName);
 		setSystemProperty("ij.defaultResourcePackage",
 				"/org/apache/derbyTesting/functionTests/tests/"
-				+ getArea() + File.separator);
+				+ getArea() + "/");
 	}
 	
 	public void tearDown() throws Exception {

Modified: db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/utilMain.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/utilMain.java?view=diff&rev=527339&r1=527338&r2=527339
==============================================================================
--- db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/utilMain.java (original)
+++ db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/utilMain.java Tue Apr 10 16:36:32 2007
@@ -250,23 +250,12 @@
 
       		//check if the property is set to not show select count and set the static variable
       		//accordingly. 
-    		//boolean showNoCountForSelect = Boolean.getBoolean("ij.showNoCountForSelect");
-    		String prop = (String) AccessController.doPrivileged(new PrivilegedAction() {
-    					public Object run() {
-    						return System.getProperty("ij.showNoCountForSelect");
-    					}
-    		});
-    		boolean showNoCountForSelect = Boolean.valueOf(prop).booleanValue();
+    		boolean showNoCountForSelect = Boolean.valueOf(util.getSystemProperty("ij.showNoCountForSelect")).booleanValue();
       		JDBCDisplayUtil.showSelectCount = !showNoCountForSelect;
 
       		//check if the property is set to not show initial connections and accordingly set the
       		//static variable.
-    		prop = (String) AccessController.doPrivileged(new PrivilegedAction() {
-				public Object run() {
-					return System.getProperty("ij.showNoConnectionsAtStart");
-				}
-         	});
-    		boolean showNoConnectionsAtStart = Boolean.valueOf(prop).booleanValue();
+    		boolean showNoConnectionsAtStart = Boolean.valueOf(util.getSystemProperty("ij.showNoConnectionsAtStart")).booleanValue();
 
     		if (!(showNoConnectionsAtStart)) {
          		try {