diff options
author | James Ahlborn <jtahlborn@yahoo.com> | 2010-06-06 01:36:35 +0000 |
---|---|---|
committer | James Ahlborn <jtahlborn@yahoo.com> | 2010-06-06 01:36:35 +0000 |
commit | 1d14558bd17a17f38741e4a35a408b559ad49073 (patch) | |
tree | c305779f10d0350f54e56f7330b3b4e423c9f212 | |
parent | 3e17a0a56a818495caa44ca883c6522a44ea6f69 (diff) | |
download | jackcess-1d14558bd17a17f38741e4a35a408b559ad49073.tar.gz jackcess-1d14558bd17a17f38741e4a35a408b559ad49073.zip |
Fix some places where table/column names were not being handled case-insensitively. (fix #3011084)
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@472 f203690c-595d-4dc9-a70b-905162fa7fd2
-rw-r--r-- | src/changes/changes.xml | 4 | ||||
-rw-r--r-- | src/java/com/healthmarketscience/jackcess/Database.java | 6 | ||||
-rw-r--r-- | src/java/com/healthmarketscience/jackcess/Table.java | 4 |
3 files changed, 9 insertions, 5 deletions
diff --git a/src/changes/changes.xml b/src/changes/changes.xml index a7b5539..59dedf9 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -9,6 +9,10 @@ Add ExportUtil and associated utilities for exporting tables to flat files (thanks to F. Gerbig). </action> + <action dev="jahlborn" type="fix" issue="3011084"> + Fix some places where columns names were not being handled + case-insensitively. + </action> </release> <release version="1.2.0" date="2010-04-18"> <action dev="bhamail" type="update" issue="1451628"> diff --git a/src/java/com/healthmarketscience/jackcess/Database.java b/src/java/com/healthmarketscience/jackcess/Database.java index 9ea72bf..d6786ba 100644 --- a/src/java/com/healthmarketscience/jackcess/Database.java +++ b/src/java/com/healthmarketscience/jackcess/Database.java @@ -894,8 +894,8 @@ public class Database String fromName = (String)row.get(REL_COL_FROM_TABLE); String toName = (String)row.get(REL_COL_TO_TABLE); - if(fromTable.getName().equals(fromName) && - toTable.getName().equals(toName)) + if(fromTable.getName().equalsIgnoreCase(fromName) && + toTable.getName().equalsIgnoreCase(toName)) { String relName = (String)row.get(REL_COL_NAME); @@ -904,7 +904,7 @@ public class Database // info for this relationship Relationship rel = null; for(Relationship tmp : relationships) { - if(tmp.getName().equals(relName)) { + if(tmp.getName().equalsIgnoreCase(relName)) { rel = tmp; break; } diff --git a/src/java/com/healthmarketscience/jackcess/Table.java b/src/java/com/healthmarketscience/jackcess/Table.java index ebed2e3..02120c1 100644 --- a/src/java/com/healthmarketscience/jackcess/Table.java +++ b/src/java/com/healthmarketscience/jackcess/Table.java @@ -263,7 +263,7 @@ public class Table */ public Column getColumn(String name) { for(Column column : _columns) { - if(column.getName().equals(name)) { + if(column.getName().equalsIgnoreCase(name)) { return column; } } @@ -306,7 +306,7 @@ public class Table */ public Index getIndex(String name) { for(Index index : _indexes) { - if(index.getName().equals(name)) { + if(index.getName().equalsIgnoreCase(name)) { return index; } } |