Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
refactor glossary csv reader to remove warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmason committed Aug 31, 2011
1 parent ed1a240 commit 8030400
Showing 1 changed file with 7 additions and 7 deletions.
Expand Up @@ -145,22 +145,22 @@ private Map<Integer, String> setupDescMap(List<String[]> entries)
* Sort out description map according to the value (header name)
*/
ValueComparator bvc = new ValueComparator(descMap);
TreeMap<Integer,String> sorted_map = new TreeMap(bvc);
TreeMap<Integer,String> sorted_map = new TreeMap<Integer, String>(bvc);
sorted_map.putAll(descMap);

return sorted_map;
}

static class ValueComparator implements Comparator {
static class ValueComparator implements Comparator<Integer> {

Map base;
public ValueComparator(Map base) {
Map<Integer, String> base;
public ValueComparator(Map<Integer, String> base) {
this.base = base;
}

public int compare(Object a, Object b) {
String strA = (String)base.get(a);
String strB = (String)base.get(b);
public int compare(Integer a, Integer b) {
String strA = base.get(a);
String strB = base.get(b);

if (strA == null || strB == null)
{
Expand Down

0 comments on commit 8030400

Please sign in to comment.