details: /erp/devel/pi/rev/e8ac46d4297c
changeset: 6552:e8ac46d4297c
user: Stefan Hühner <stefan.huehner <at> openbravo.com>
date: Tue Mar 02 18:47:40 2010 +0100
summary: Fixed 12529: Make order of columnnames in error message stable
diffstat:
src-test/org/openbravo/test/system/ErrorTextParserTest.java | 2 +-
src/org/openbravo/erpCommon/utility/ErrorTextParserORACLE.java | 5 +++++
src/org/openbravo/erpCommon/utility/ErrorTextParserPOSTGRE.java | 5 +++++
3 files changed, 11 insertions(+), 1 deletions(-)
diffs (56 lines):
diff -r 2517f0ee895c -r e8ac46d4297c
src-test/org/openbravo/test/system/ErrorTextParserTest.java
--- a/src-test/org/openbravo/test/system/ErrorTextParserTest.java Tue Mar
02 17:20:22 2010 +0100
+++ b/src-test/org/openbravo/test/system/ErrorTextParserTest.java Tue Mar
02 18:47:40 2010 +0100
@@ -102,7 +102,7 @@
ErrorTextParserTestData.insertClientWithName(con, conn, "System",
"System");
break;
case 5:
- expectedErrorMessage = "There is already a Month Translation with the
same (Month, Language). (Month, Language) must be unique. You must change the
values entered.";
+ expectedErrorMessage = "There is already a Month Translation with the
same (Language, Month). (Language, Month) must be unique. You must change the
values entered.";
ErrorTextParserTestData.insertMonthTrl(con, conn);
break;
case 6:
diff -r 2517f0ee895c -r e8ac46d4297c
src/org/openbravo/erpCommon/utility/ErrorTextParserORACLE.java
--- a/src/org/openbravo/erpCommon/utility/ErrorTextParserORACLE.java Tue Mar
02 17:20:22 2010 +0100
+++ b/src/org/openbravo/erpCommon/utility/ErrorTextParserORACLE.java Tue Mar
02 18:47:40 2010 +0100
@@ -18,6 +18,7 @@
*/
package org.openbravo.erpCommon.utility;
+import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
@@ -59,6 +60,10 @@
for (int i = 0; i < cols.length; i++) {
res[i] = cols[i].columnname;
}
+
+ // assure same column order across (oracle,postgresql) by sorting
results in java
+ Arrays.sort(cols);
+
return res;
} catch (ServletException se) {
log4j.error("Error reading list of columns for constraint: " +
constraintName, se);
diff -r 2517f0ee895c -r e8ac46d4297c
src/org/openbravo/erpCommon/utility/ErrorTextParserPOSTGRE.java
--- a/src/org/openbravo/erpCommon/utility/ErrorTextParserPOSTGRE.java Tue Mar
02 17:20:22 2010 +0100
+++ b/src/org/openbravo/erpCommon/utility/ErrorTextParserPOSTGRE.java Tue Mar
02 18:47:40 2010 +0100
@@ -18,6 +18,7 @@
*/
package org.openbravo.erpCommon.utility;
+import java.util.Arrays;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -113,6 +114,10 @@
cols[i] = col;
}
}
+
+ // assure same column order across (oracle,postgresql) by sorting results
in java
+ Arrays.sort(cols);
+
return cols;
}
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits