MAHOUT-1610 [TESTS] Update tests to pass in Java 8 #46
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.
Right now, several tests don't seem to pass when run with Java 8 (at least on Java 8). The failures are benign, and just due to tests looking for too-specific values or expecting things like a certain ordering of hashmaps.
The tests can easily be made to pass both Java 8 and Java 6/7 at the same time by either relaxing the tests in a principled way, or accepting either output of two equally valid ones as correct.
(There's also one curious compilation failure in Java 8, related to generics. It is fixable by changing to a more explicit declaration that should be equivalent. It should be entirely equivalent at compile time, and of course, at run time. I am not sure it's not just a javac bug, but, might as well work around when it's so easy.)