db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1455523 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CompilerContextImpl.java
Date Tue, 12 Mar 2013 13:21:24 GMT
Author: kahatlen
Date: Tue Mar 12 13:21:23 2013
New Revision: 1455523

URL: http://svn.apache.org/r1455523
Log:
DERBY-6075: Use modern collections in impl/sql/compile

Remove use of java.util.Stack.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CompilerContextImpl.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CompilerContextImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CompilerContextImpl.java?rev=1455523&r1=1455522&r2=1455523&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CompilerContextImpl.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CompilerContextImpl.java
Tue Mar 12 13:21:23 2013
@@ -80,7 +80,6 @@ import java.util.Properties;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
-import java.util.Stack;
 import java.util.ArrayList;
 
 /**
@@ -715,13 +714,14 @@ public class CompilerContextImpl extends
 	 */
 	public void pushCurrentPrivType( int privType)
 	{
-		privTypeStack.push( ReuseFactory.getInteger( currPrivType));
+		privTypeStack.add(ReuseFactory.getInteger(currPrivType));
 		currPrivType = privType;
 	}
 
 	public void popCurrentPrivType( )
 	{
-		currPrivType = ((Integer) privTypeStack.pop()).intValue();
+        Integer top = (Integer) privTypeStack.remove(privTypeStack.size() - 1);
+        currPrivType = top.intValue();
 	}
 
 	/**
@@ -1043,7 +1043,7 @@ public class CompilerContextImpl extends
 
 	private SQLWarning warnings;
 
-	private Stack privTypeStack = new Stack();
+	private final ArrayList privTypeStack = new ArrayList();
 	private int currPrivType = Authorizer.NULL_PRIV;
 	private HashMap requiredColumnPrivileges;
 	private HashMap requiredTablePrivileges;



Mime
View raw message