svn commit: r949620 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r949620 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java

doogie-3
Author: doogie
Date: Sun May 30 22:08:12 2010
New Revision: 949620

URL: http://svn.apache.org/viewvc?rev=949620&view=rev
Log:
In getIndexInfo, moved the lookupSchemaName calculation outside of the loop, as there is no way it could change at runtime.

Modified:
    ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java?rev=949620&r1=949619&r2=949620&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java Sun May 30 22:08:12 2010
@@ -1567,15 +1567,15 @@ public class DatabaseUtil {
         Map<String, Set<String>> indexInfo = FastMap.newInstance();
         try {
             int totalIndices = 0;
-            for (String curTableName: tableNames) {
-                String lookupSchemaName = null;
-                if (dbData.supportsSchemasInTableDefinitions()) {
-                    if (UtilValidate.isNotEmpty(this.datasourceInfo.schemaName)) {
-                        lookupSchemaName = this.datasourceInfo.schemaName;
-                    } else {
-                        lookupSchemaName = dbData.getUserName();
-                    }
+            String lookupSchemaName = null;
+            if (dbData.supportsSchemasInTableDefinitions()) {
+                if (UtilValidate.isNotEmpty(this.datasourceInfo.schemaName)) {
+                    lookupSchemaName = this.datasourceInfo.schemaName;
+                } else {
+                    lookupSchemaName = dbData.getUserName();
                 }
+            }
+            for (String curTableName: tableNames) {
 
                 ResultSet rsCols = null;
                 try {