[power-matchmaker] r2757 committed - There was an error in TableIndex causing a test to fail: when we got t...

0 views
Skip to first unread message

power-ma...@googlecode.com

unread,
Dec 7, 2010, 11:19:57 AM12/7/10
to matchmake...@googlegroups.com
Revision: 2757
Author: gtc....@gmail.com
Date: Tue Dec 7 08:19:39 2010
Log: There was an error in TableIndex causing a test to fail: when we got
the column names, the pointer to the actual object was returned instead of
a copy, so when we changed the column names to a new value, it would change
the old value as well.
http://code.google.com/p/power-matchmaker/source/detail?r=2757

Modified:
/trunk/src/ca/sqlpower/matchmaker/TableIndex.java

=======================================
--- /trunk/src/ca/sqlpower/matchmaker/TableIndex.java Mon Dec 6 14:15:48
2010
+++ /trunk/src/ca/sqlpower/matchmaker/TableIndex.java Tue Dec 7 08:19:39
2010
@@ -232,7 +232,9 @@

@Accessor
public List<String> getColNames() {
- return Collections.unmodifiableList(colNames);
+ List<String> retColNames = new ArrayList<String>();
+ retColNames.addAll(colNames);
+ return Collections.unmodifiableList(retColNames);
}

/**

Reply all
Reply to author
Forward
0 new messages