commit | 64e0127c640646f0e8967678a19c372636de6f3f | [log] [tgz] |
---|---|---|
author | Valter Strods <valters.strods@gmail.com> | Sun Jun 08 21:41:52 2014 +0300 |
committer | Valter Strods <valters.strods@gmail.com> | Tue Jun 24 10:00:34 2014 +0300 |
tree | e7e8854108d2d65b2551f2337a733a9b31286016 | |
parent | cb8217586ab2f6d88d75a563cbfb7cd57e746bd3 [diff] |
libcore: Clean up Enum.compareTo(E) As E extends Enum<E>, it is safe to cast the comparable object to Enum<?> as it should not throw any exceptions. When it is cast, the ordinal value can be accessed directly. Doing so would be preferred as either both the variables this.ordinal and o.ordinal should be used or the methods this.ordinal() and o.ordinal() should be used without mixing them together. Change-Id: I7c4e93fdf35b0bf2949738a91c0855d9a52e5c13