Skip to content

Sorting a string #3

@GoogleCodeExporter

Description

@GoogleCodeExporter
What steps will reproduce the problem?
1. Sorting column with String with capitals and lower case characters

What is the expected output? What do you see instead?
Column is sorted first on capitals decent lower case

What version of the product are you using? On what operating system?
Windows xp newest version....

Please provide any additional information below.
Made my own fix.. Just an small update for you

------------
Instead of  

compareResult = column1.compareTo(column2); on SortComparator.java

use

if(column1 instanceof String){
    String col1 = ((String)column1).toLowerCase();
    String col2 = ((String)column2).toLowerCase();
    compareResult = col1.compareTo(col2);
}
else
    compareResult = column1.compareTo(column2);


Original issue reported on code.google.com by appienva...@gmail.com on 7 Jul 2008 at 9:46

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions