Feature - Implemented Generic Types Warning Cleanup: Classes implementing Comparable in src (patch)

This is the first of many patches I'll be submitting to clean up some of the generic type warnings now that we've switched over to Java SE 5. This particular patch changes all classes of the form:

class Clazz implements Comparable

to

class Clazz implements Comparable<Clazz>

and fixes all the compile errors the above change produced, by changing the compareTo(Object o) methods to compareTo(Clazz o) instead primarily. Unfortunately, this fix also introduced new problems for classes that extend other classes affected by this change AND that override compareTo. Those errors are also fixed in the patch.

I deliberately limited the scope of this patch to the src folder only. I'll be tackling similar problems in lib in a future patch. ;)
 

fronobulax

Developer
Staff member
I deliberately limited the scope of this patch to the src folder only. I'll be tackling similar problems in lib in a future patch. ;)

Take care. Much of what is in lib is third party code that mafia devs deliberately do not want to maintain. A goal is that if the third party updates and we import their source tree mafia will still compile. That is clearly not the case since there is third party code that has been tweaked for mafia use but the proposed change seems as if it would cause more problems that it solves. If mafia switched to a different build process, there would probably be no code in lib and much of what is there would be imported as a jar file from a repository.
 

lostcalpolydude

Developer
Staff member
Other than an occasional whitespace change, that looked good. 11492.

Since I had all those files open, I added some Generics unrelated to Comparable that I saw.
 
Top