I2P Address: [http://git.idk.i2p]

Skip to content

explicitly set types of some objects so that the code can be compiled with a Java 7 bootclasspth

idk requested to merge idk/i2p.i2p:1.9.0-java7-classpath-fix into master

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 a putIfAbsent 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, the emptyList() 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.

Merge request reports

Loading