explicitly set types of some objects so that the code can be compiled with a Java 7 bootclasspth
When I attempt to compile with a Java 7 bootclasspath to build for Android, I encounter some errors that seem to have to do with features that are not the same in Java 7 as in later Java's. In particular:
-
Map
doesn't have aputIfAbsent
member as an abstract type, but ConcurrentHashMap does. Changing it to the ConcurrentHashMap is possible by simply not using the abstract type when declaring the variable. -
buildPacket
cannot accept any empty collection of Objects, they must be fragments even if the list is empty. Therefore, theemptyList()
call must also set the type of the members of the collection.
I've created a tag for this to do the Android release with if it is an acceptable set of fixes to be compatible with Java 7.