db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1605981 - in /db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij: util.java utilMain.java
Date Fri, 27 Jun 2014 07:58:20 GMT
Author: kahatlen
Date: Fri Jun 27 07:58:19 2014
New Revision: 1605981

URL: http://svn.apache.org/r1605981
Log:
DERBY-6621: Reduce the visibility of more classes and methods

Make util.getResourceAsStream() package-private, and make utilMain use
that method instead of implementing its own.

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

Modified: db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/util.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/util.java?rev=1605981&r1=1605980&r2=1605981&view=diff
==============================================================================
--- db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/util.java (original)
+++ db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/util.java Fri Jun 27 07:58:19
2014
@@ -160,7 +160,7 @@ public final class util implements java.
 	  @param resourceName the name of the resource
 	  @return a buffered stream for the resource if it exists and null otherwise.
 	  */
-	static public InputStream getResourceAsStream(String resourceName) 
+    static InputStream getResourceAsStream(String resourceName)
 	{
 		final Class c = util.class;
 		final String resource = qualifyResourceName(resourceName,true);

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?rev=1605981&r1=1605980&r2=1605981&view=diff
==============================================================================
--- 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 Fri Jun 27
07:58:19 2014
@@ -30,7 +30,6 @@ import org.apache.derby.iapi.services.in
 import java.util.List;
 import java.util.Stack;
 import java.util.Hashtable;
-import java.util.Properties;
 
 import java.io.InputStream;
 import java.io.FileInputStream;
@@ -51,7 +50,7 @@ import java.sql.PreparedStatement;
 	single and dual connection ij runs.
 
  */
-public class utilMain implements java.security.PrivilegedAction<Object> {
+public class utilMain {
 
 	private StatementFinder[] commandGrabber;
 	UCode_CharStream charStream;
@@ -213,7 +212,8 @@ public class utilMain implements java.se
 		if (firstRun) {
 
 			// figure out which version this is
-			InputStream versionStream = (InputStream) java.security.AccessController.doPrivileged(this);
+            InputStream versionStream = util.getResourceAsStream(
+                    ProductGenusNames.TOOLS_INFO);
 
 			// figure out which version this is
 			ProductVersionHolder ijVersion = 
@@ -828,8 +828,4 @@ public class utilMain implements java.se
         checkScrollableCursor(rs, "GETCURRENTROWNUMBER");
 		return rs.getRow();
 	}
-
-	public final Object run() {
-		return  getClass().getResourceAsStream(ProductGenusNames.TOOLS_INFO);
-	}
 }



Mime
View raw message