core: fix duplicated imports
This commit is contained in:
@@ -62,10 +62,12 @@ public class ClassGen {
|
||||
clsCode.newLine();
|
||||
}
|
||||
|
||||
if (imports.size() != 0) {
|
||||
List<String> sortImports = new ArrayList<String>();
|
||||
for (ClassInfo ic : imports)
|
||||
int importsCount = imports.size();
|
||||
if (importsCount != 0) {
|
||||
List<String> sortImports = new ArrayList<String>(importsCount);
|
||||
for (ClassInfo ic : imports) {
|
||||
sortImports.add(ic.getFullName());
|
||||
}
|
||||
Collections.sort(sortImports);
|
||||
|
||||
for (String imp : sortImports) {
|
||||
|
||||
@@ -135,12 +135,12 @@ public final class ClassInfo {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getFullName();
|
||||
return fullName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return type.hashCode();
|
||||
return fullName.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user