Comparison method violates its general contract! Java 7 only
问题 I know this has been an issue for a while now, and checked all previously answers I could get, but still this one doesn\'t work. The object \'crew\' represents crewmembers with ranks and other items. The comparison should be made by comparing \'assigned_rank\', an int value, and if this value is equal in both instances, then \'is_trainer\', a boolean, should make the difference. This method worked great as long as it was running with java < 7. But since Java 7 I keep getting this one: java