Archaius 0.x is not compatible with Java 6/7 #522
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The following issue is currently causing issues in the spring-cloud project, since spring-cloud is currently based on spring 4.x which maintains compatibility with Java 7.
Archaius 0.x claims to be compatible with Java 6 (source and target versions are set to 1.6) but when calling
com.netflix.config.ConcurrentMapConfiguration.getKeys
under Java 7 the following exception occurs:Caused by: java.lang.NoSuchMethodError: java.util.concurrent.ConcurrentHashMap.keySet()Ljava/util/concurrent/ConcurrentHashMap$KeySetView; at com.netflix.config.ConcurrentMapConfiguration.getKeys(ConcurrentMapConfiguration.java:152)
This is caused by the fact that Archaius 0.x is compiled using a JDK 8 with source/target set to 1.6 but without a bootclasspath set to 1.6. Therefore you'll run into this issue: https://gist.github.com/AlainODea/1375759b8720a3f9f094
I see three solutions: