Found Bug in Diff#setDiffTypes(String)

I can’t seem to find a place to report this. If there is a better place, I’d be glad to know of it.

I am using Liquibase 1.9.5. I haven’t verified this in 2.0 because I can’t find the source code. If anyone knows where, please point me to it.

I found in this method this:
Set types = new HashSet(Arrays.asList(diffTypes.toLowerCase().split("\s*,\s*")));

It converts diffTypes to lowercase. This seems fine. Usually, a good idea when doing string parsing/comparisons. Further, down I found this:

diffPrimaryKeys = types.contains(“primaryKeys”);
diffUniqueConstraints = types.contains(“uniqueConstraints”);
diffIndexes = types.contains(“indexes”);
diffForeignKeys = types.contains(“foreignKeys”);
         
Note the uppercase ‘K’ and ‘C’. Basically, when using setDiffTypes() diffForeignKeys, diffPrimaryKeys, and diffUniqueConstraints is always false.

Bummer. I actually use this class, so please fix whenever you get around to it. Meanwhile, I’ll use a locally patched version.

Ok. I found http://liquibase.jira.com . I’ll put this there instead. Thanks everyone for not flaming me for posting this in the wrong place.

No problem.  It is often vague where to post it, so either place is fine. 

Nathan

to r351574nc3:
So, would you fix it for 2.0 trunk-version?

Definitely in trunk (2.0).  If the fix is easy, it would be worth applying to the 1.9 branch as well, the diff code is re-organized but similar.

Nathan