remove some unchecked warns

This commit is contained in:
gtully 2015-07-09 14:08:05 +01:00
parent 802e968f93
commit c454fe31fc
4 changed files with 10 additions and 16 deletions

View File

@ -95,13 +95,11 @@ public class CHeadersGenerator extends SingleSourceGenerator {
/**
* Sort the class list so that base classes come up first.
*/
protected List<JClass> sort(List source) {
protected List<JClass> sort(List<JClass> source) {
LinkedHashMap<JClass, JClass> rc = new LinkedHashMap<JClass, JClass>();
ArrayList classes = new ArrayList(source);
Collections.sort(classes, new Comparator() {
public int compare(Object o1, Object o2) {
JClass c1 = (JClass)o1;
JClass c2 = (JClass)o2;
ArrayList<JClass> classes = new ArrayList<JClass>(source);
Collections.sort(classes, new Comparator<JClass>() {
public int compare(JClass c1, JClass c2) {
return c1.getSimpleName().compareTo(c2.getSimpleName());
}
});

View File

@ -558,11 +558,9 @@ public class CSharpMarshallingGenerator extends JavaMarshallingGenerator {
out.println(" {");
out.println(" format.clearMarshallers();");
List list = new ArrayList(getConcreteClasses());
Collections.sort(list, new Comparator() {
public int compare(Object o1, Object o2) {
JClass c1 = (JClass)o1;
JClass c2 = (JClass)o2;
List<JClass> list = new ArrayList<JClass>(getConcreteClasses());
Collections.sort(list, new Comparator<JClass>() {
public int compare(JClass c1, JClass c2) {
return c1.getSimpleName().compareTo(c2.getSimpleName());
}
});

View File

@ -40,7 +40,7 @@ public class CSourcesGenerator extends CHeadersGenerator {
return super.run();
}
protected List sort(List source) {
protected List<JClass> sort(List<JClass> source) {
return source;
}

View File

@ -309,10 +309,8 @@ public class JavaMarshallingGenerator extends MultiSourceGenerator {
out.println("");
List<JClass> list = new ArrayList<JClass>(getConcreteClasses());
Collections.sort(list, new Comparator() {
public int compare(Object o1, Object o2) {
JClass c1 = (JClass)o1;
JClass c2 = (JClass)o2;
Collections.sort(list, new Comparator<JClass>() {
public int compare(JClass c1, JClass c2) {
return c1.getSimpleName().compareTo(c2.getSimpleName());
}
});