From: James Ahlborn Date: Sun, 6 Jun 2010 01:36:35 +0000 (+0000) Subject: Fix some places where table/column names were not being handled case-insensitively... X-Git-Tag: jackcess-1.2.1~7 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1d14558bd17a17f38741e4a35a408b559ad49073;p=jackcess.git 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 --- 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). + + Fix some places where columns names were not being handled + case-insensitively. + 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; } }