db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r122617 - in incubator/derby/code/trunk/java: engine/org/apache/derby/iapi/store/access engine/org/apache/derby/impl/sql/catalog engine/org/apache/derby/impl/sql/compile engine/org/apache/derby/impl/sql/depend engine/org/apache/derby/impl/sql/execute engine/org/apache/derby/impl/sql/execute/rts engine/org/apache/derby/jdbc tools/org/apache/derby/impl/tools/ij tools/org/apache/derby/tools
Date Fri, 17 Dec 2004 06:08:28 GMT
Author: djd
Date: Thu Dec 16 22:08:26 2004
New Revision: 122617

URL: http://svn.apache.org/viewcvs?view=rev&rev=122617
Log:
Partial commit of patch for Derby-73 (from attachment).
Changes all enum variable names to avoid use of it since
it is a reserved word in J2SE 5.0.

Patch contributed by Jeremy Boynes <jboynes@apache.org>

Modified:
   incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/RowUtil.java
   incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
   incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java
   incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromList.java
   incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromTable.java
   incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/depend/BasicDependencyManager.java
   incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/InternalTriggerExecutionContext.java
   incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealBasicNoPutResultSetStatistics.java
   incubator/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbedPooledConnection.java
   incubator/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/AttributeHolder.java
   incubator/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/ConnectionEnv.java
   incubator/derby/code/trunk/java/tools/org/apache/derby/tools/URLCheck.java

Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/RowUtil.java
Url: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/RowUtil.java?view=diff&rev=122617&p1=incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/RowUtil.java&r1=122616&p2=incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/RowUtil.java&r2=122617
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/RowUtil.java
(original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/iapi/store/access/RowUtil.java
Thu Dec 16 22:08:26 2004
@@ -526,7 +526,6 @@
             String str = new String();
 
             Object  row_or_vector;
-            Enumeration enum = hash_table.elements();
 
             for (Enumeration e = hash_table.elements(); e.hasMoreElements();)
             {

Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
Url: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java?view=diff&rev=122617&p1=incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java&r1=122616&p2=incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java&r2=122617
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
(original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
Thu Dec 16 22:08:26 2004
@@ -8022,14 +8022,14 @@
 		throws StandardException
 	{
 		Properties p = getQueryDescriptions(net);
-		Enumeration enum = p.keys();
+		Enumeration e = p.keys();
 		//statement will get compiled on first execution
 		//Note: Don't change this to FALSE LCC is not available for compiling
 		boolean nocompile = true;
 		
-		while (enum.hasMoreElements())
+		while (e.hasMoreElements())
 		{
-			String spsName = (String)enum.nextElement();
+			String spsName = (String)e.nextElement();
 			String spsText =  p.getProperty(spsName);
 			SPSDescriptor spsd = new SPSDescriptor(this, spsName,
 												   getUUIDFactory().createUUID(),

Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java
Url: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java?view=diff&rev=122617&p1=incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java&r1=122616&p2=incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java&r2=122617
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java
(original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java
Thu Dec 16 22:08:26 2004
@@ -669,13 +669,13 @@
 		boolean indexSpecified = false;
 		boolean constraintSpecified = false;
 		ConstraintDescriptor consDesc = null;
-		Enumeration enum = tableProperties.keys();
+		Enumeration e = tableProperties.keys();
 
 			StringUtil.SQLEqualsIgnoreCase(tableDescriptor.getSchemaName(), 
 										   "SYS");
-		while (enum.hasMoreElements())
+		while (e.hasMoreElements())
 		{
-			String key = (String) enum.nextElement();
+			String key = (String) e.nextElement();
 			String value = (String) tableProperties.get(key);
 
 			if (key.equals("index"))

Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromList.java
Url: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromList.java?view=diff&rev=122617&p1=incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromList.java&r1=122616&p2=incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromList.java&r2=122617
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromList.java
(original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromList.java
Thu Dec 16 22:08:26 2004
@@ -864,10 +864,10 @@
 		** there is nothing in this properties list that relies on binding
 		** or optimization to validate.
 		*/
-		Enumeration enum = properties.keys();
-		while (enum.hasMoreElements())
+		Enumeration e = properties.keys();
+		while (e.hasMoreElements())
 		{
-			String key = (String) enum.nextElement();
+			String key = (String) e.nextElement();
 			String value = (String) properties.get(key);
 
 			if (key.equals("joinOrder"))

Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromTable.java
Url: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromTable.java?view=diff&rev=122617&p1=incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromTable.java&r1=122616&p2=incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromTable.java&r2=122617
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromTable.java
(original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromTable.java
Thu Dec 16 22:08:26 2004
@@ -412,10 +412,10 @@
 		 *		invalid value for hashMaxCapacity
 		 */
 		boolean indexSpecified = false;
-		Enumeration enum = tableProperties.keys();
-		while (enum.hasMoreElements())
+		Enumeration e = tableProperties.keys();
+		while (e.hasMoreElements())
 		{
-			String key = (String) enum.nextElement();
+			String key = (String) e.nextElement();
 			String value = (String) tableProperties.get(key);
 
 			if (key.equals("joinStrategy"))

Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/depend/BasicDependencyManager.java
Url: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/depend/BasicDependencyManager.java?view=diff&rev=122617&p1=incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/depend/BasicDependencyManager.java&r1=122616&p2=incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/depend/BasicDependencyManager.java&r2=122617
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/depend/BasicDependencyManager.java
(original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/depend/BasicDependencyManager.java
Thu Dec 16 22:08:26 2004
@@ -632,7 +632,7 @@
 	public ProviderInfo[] getPersistentProviderInfos(ProviderList pl)
 							throws StandardException
 	{
-		Enumeration enum = pl.elements();
+		Enumeration e = pl.elements();
 		int			numProviders = 0;
 		ProviderInfo[]	retval;
 
@@ -640,9 +640,9 @@
 		** We make 2 passes - the first to count the number of persistent
  		** providers and the second to populate the array of ProviderInfos.
 		*/
-		while (enum != null && enum.hasMoreElements())
+		while (e != null && e.hasMoreElements())
 		{
-			Provider prov = (Provider) enum.nextElement();
+			Provider prov = (Provider) e.nextElement();
 
 			if (prov.isPersistent())
 			{
@@ -650,12 +650,12 @@
 			}
 		}
 
-		enum = pl.elements();
+		e = pl.elements();
 		retval = new ProviderInfo[numProviders];
 		int piCtr = 0;
-		while (enum != null && enum.hasMoreElements())
+		while (e != null && e.hasMoreElements())
 		{
-			Provider prov = (Provider) enum.nextElement();
+			Provider prov = (Provider) e.nextElement();
 
 			if (prov.isPersistent())
 			{
@@ -681,10 +681,10 @@
 	public void clearColumnInfoInProviders(ProviderList pl)
 					throws StandardException
 	{
-		Enumeration enum = pl.elements();
-		while (enum != null && enum.hasMoreElements())
+		Enumeration e = pl.elements();
+		while (e != null && e.hasMoreElements())
 		{
-			Provider pro = (Provider) enum.nextElement();
+			Provider pro = (Provider) e.nextElement();
 			if (pro instanceof TableDescriptor)
 				((TableDescriptor) pro).setReferencedColumnMap(null);
 		}

Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/InternalTriggerExecutionContext.java
Url: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/InternalTriggerExecutionContext.java?view=diff&rev=122617&p1=incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/InternalTriggerExecutionContext.java&r1=122616&p2=incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/InternalTriggerExecutionContext.java&r2=122617
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/InternalTriggerExecutionContext.java
(original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/InternalTriggerExecutionContext.java
Thu Dec 16 22:08:26 2004
@@ -260,10 +260,10 @@
 		** Explicitly close all result sets that we have
 		** given out to the user.  
 	 	*/
-		for (Enumeration enum = resultSetVector.elements();
-			 enum.hasMoreElements(); )
+		for (Enumeration e = resultSetVector.elements();
+			 e.hasMoreElements(); )
 		{
-			java.sql.ResultSet rs = (java.sql.ResultSet)enum.nextElement();
+			java.sql.ResultSet rs = (java.sql.ResultSet)e.nextElement();
 			try
 			{
 				rs.close();

Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealBasicNoPutResultSetStatistics.java
Url: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealBasicNoPutResultSetStatistics.java?view=diff&rev=122617&p1=incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealBasicNoPutResultSetStatistics.java&r1=122616&p2=incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealBasicNoPutResultSetStatistics.java&r2=122617
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealBasicNoPutResultSetStatistics.java
(original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/rts/RealBasicNoPutResultSetStatistics.java
Thu Dec 16 22:08:26 2004
@@ -193,9 +193,9 @@
 	 */
   public long getChildrenTime(){
     long childrenTime = 0;
-    java.util.Enumeration enum = getChildren().elements();
-    while (enum.hasMoreElements()){
-      childrenTime = childrenTime + ((RealBasicNoPutResultSetStatistics)enum.nextElement()).getTotalTime();
+    java.util.Enumeration e = getChildren().elements();
+    while (e.hasMoreElements()){
+      childrenTime = childrenTime + ((RealBasicNoPutResultSetStatistics)e.nextElement()).getTotalTime();
     }
     return childrenTime;
   }

Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbedPooledConnection.java
Url: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbedPooledConnection.java?view=diff&rev=122617&p1=incubator/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbedPooledConnection.java&r1=122616&p2=incubator/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbedPooledConnection.java&r2=122617
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbedPooledConnection.java
(original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbedPooledConnection.java
Thu Dec 16 22:08:26 2004
@@ -284,11 +284,11 @@
 		{
 			ConnectionEvent errorEvent = new ConnectionEvent(this, exception);
 
-			for (Enumeration enum = eventListener.elements();
-				 enum.hasMoreElements(); )
+			for (Enumeration e = eventListener.elements();
+				 e.hasMoreElements(); )
 			{
 				ConnectionEventListener l =
-					(ConnectionEventListener)enum.nextElement(); 
+					(ConnectionEventListener)e.nextElement();
 				l.connectionErrorOccurred(errorEvent);
 			}
 		}
@@ -302,11 +302,11 @@
 		{
 			ConnectionEvent closeEvent = new ConnectionEvent(this);
 
-			for (Enumeration enum = eventListener.elements();
-				 enum.hasMoreElements(); )
+			for (Enumeration e = eventListener.elements();
+				 e.hasMoreElements(); )
 			{
 				ConnectionEventListener l =
-					(ConnectionEventListener)enum.nextElement(); 
+					(ConnectionEventListener)e.nextElement();
 				l.connectionClosed(closeEvent);
 			}
 		}

Modified: incubator/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/AttributeHolder.java
Url: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/AttributeHolder.java?view=diff&rev=122617&p1=incubator/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/AttributeHolder.java&r1=122616&p2=incubator/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/AttributeHolder.java&r2=122617
==============================================================================
--- incubator/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/AttributeHolder.java
(original)
+++ incubator/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/AttributeHolder.java
Thu Dec 16 22:08:26 2004
@@ -72,14 +72,14 @@
     }
     public void displayErrors(){
       //If no error are found then nothing is displayed.
-      Enumeration enum = errors.elements();
+      Enumeration e = errors.elements();
       //In the first line, show the exact token that was parsed from
       //the URL.
-      if (enum.hasMoreElements())
+      if (e.hasMoreElements())
         display(LocalizedResource.getMessage("TL_urlLabel1", "[", getToken(), "]"));
       //Show all errors.  More than one error can be found for an attribute.
-      while (enum.hasMoreElements()){
-        String aString = (String)enum.nextElement();
+      while (e.hasMoreElements()){
+        String aString = (String)e.nextElement();
         displayIndented(aString);
       }
     }

Modified: incubator/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/ConnectionEnv.java
Url: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/ConnectionEnv.java?view=diff&rev=122617&p1=incubator/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/ConnectionEnv.java&r1=122616&p2=incubator/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/ConnectionEnv.java&r2=122617
==============================================================================
--- incubator/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/ConnectionEnv.java
(original)
+++ incubator/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/ConnectionEnv.java
Thu Dec 16 22:08:26 2004
@@ -116,13 +116,13 @@
     int newNum = 0;
     boolean newConnectionNameOk = false;
     String newConnectionName = "";
-    Enumeration enum;
+    Enumeration e;
     while (!newConnectionNameOk){
       newConnectionName = Session.DEFAULT_NAME + newNum;
       newConnectionNameOk = true;
-      enum = sessions.keys();
-      while (enum.hasMoreElements() && newConnectionNameOk){
-        if (((String)enum.nextElement()).equals(newConnectionName))
+      e = sessions.keys();
+      while (e.hasMoreElements() && newConnectionNameOk){
+        if (((String)e.nextElement()).equals(newConnectionName))
            newConnectionNameOk = false;
       }
       newNum = newNum + 1;

Modified: incubator/derby/code/trunk/java/tools/org/apache/derby/tools/URLCheck.java
Url: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/tools/org/apache/derby/tools/URLCheck.java?view=diff&rev=122617&p1=incubator/derby/code/trunk/java/tools/org/apache/derby/tools/URLCheck.java&r1=122616&p2=incubator/derby/code/trunk/java/tools/org/apache/derby/tools/URLCheck.java&r2=122617
==============================================================================
--- incubator/derby/code/trunk/java/tools/org/apache/derby/tools/URLCheck.java	(original)
+++ incubator/derby/code/trunk/java/tools/org/apache/derby/tools/URLCheck.java	Thu Dec 16
22:08:26 2004
@@ -70,9 +70,9 @@
     }
   }
   public void check(){
-    Enumeration enum = attributes.elements();
-    while (enum.hasMoreElements()) {
-      AttributeHolder anAttribute = (AttributeHolder)enum.nextElement();
+    Enumeration e = attributes.elements();
+    while (e.hasMoreElements()) {
+      AttributeHolder anAttribute = (AttributeHolder)e.nextElement();
       //The check for duplicate must be done at the URLCheck level
       //and not by each specific attribute.  Only URLCheck knowns about
       //all of the attributes and names.
@@ -82,9 +82,9 @@
     }
   }
   public void checkForDuplicate(AttributeHolder anAttribute){
-    Enumeration enum = attributes.elements();
-    while (enum.hasMoreElements()) {
-      AttributeHolder aHolder = (AttributeHolder)enum.nextElement();
+    Enumeration e = attributes.elements();
+    while (e.hasMoreElements()) {
+      AttributeHolder aHolder = (AttributeHolder)e.nextElement();
       //If a duplicate is found, make sure that the message is only shown
       //once for each attribute.
       if (anAttribute != aHolder && anAttribute.getName().equals(aHolder.getName()))
{

Mime
View raw message