db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r888129 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/PrivilegeNode.java
Date Mon, 07 Dec 2009 20:46:10 GMT
Author: rhillegas
Date: Mon Dec  7 20:46:09 2009
New Revision: 888129

URL: http://svn.apache.org/viewvc?rev=888129&view=rev
Log:
DERBY-712: Fix problem in 888060 having to do with placement of sanity ifdefs.

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

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/PrivilegeNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/PrivilegeNode.java?rev=888129&r1=888128&r2=888129&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/PrivilegeNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/PrivilegeNode.java Mon
Dec  7 20:46:09 2009
@@ -65,27 +65,36 @@
         {
             SanityManager.ASSERT( objectOfPrivilege != null,
                                   "null privilge object");
-            switch( this.objectType)
+        }
+        switch( this.objectType)
+        {
+        case TABLE_PRIVILEGES:
+            if( SanityManager.DEBUG)
             {
-            case TABLE_PRIVILEGES:
                 SanityManager.ASSERT( specificPrivileges != null,
                                       "null specific privileges used with table privilege");
-                objectName = (TableName) objectOfPrivilege;
-                this.specificPrivileges = (TablePrivilegesNode) specificPrivileges;
-                break;
-
-            case ROUTINE_PRIVILEGES:
+            }
+            objectName = (TableName) objectOfPrivilege;
+            this.specificPrivileges = (TablePrivilegesNode) specificPrivileges;
+            break;
+            
+        case ROUTINE_PRIVILEGES:
+            if( SanityManager.DEBUG)
+            {
                 SanityManager.ASSERT( specificPrivileges == null,
                                       "non-null specific privileges used with execute privilege");
-                routineDesignator = (RoutineDesignator) objectOfPrivilege;
-                objectName = routineDesignator.name;
-                break;
-
-            default:
+            }
+            routineDesignator = (RoutineDesignator) objectOfPrivilege;
+            objectName = routineDesignator.name;
+            break;
+            
+        default:
+            if( SanityManager.DEBUG)
+            {
                 SanityManager.THROWASSERT( "Invalid privilege objectType: " + this.objectType);
             }
         }
-    } // end of init
+    }
 
     /**
      * Bind this GrantNode. Resolve all table, column, and routine references. Register



Mime
View raw message