Revision 2218 org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.lib/src/main/java/org/gvsig/tools/namestranslator/DummyNamesTranslator.java

View differences:

DummyNamesTranslator.java
40 40
  protected SimpleList translatedNames;
41 41

  
42 42
  protected DummyNamesTranslator() {
43
      this.sourceNames = new SimpleList();
44
      this.translatedNames = new SimpleList();
43 45
    
44 46
  }
45 47
  
......
102 104

  
103 105
    @Override
104 106
    public int addSource(String sourceName) {
105
        if (this.sourceNames.contains(sourceName)) {
106
            throw new IllegalArgumentException("Source name already exists in the name translator");
107
        }
107
        this.sourceNames.add(sourceName);
108 108
        String sugName = getSuggestion(sourceName);
109
        return this.setTranslation(sourceName, sugName);
109
        this.translatedNames.add(sugName);
110
        return this.sourceNames.size()-1;
110 111
    }
111 112

  
112 113
    @Override

Also available in: Unified diff