Java 8 Compatibility
Brought to you by:
mlamb
The HashMap
seems to maintain insertion order by default in Java 8, whereas you needed to use a LinkedHashMap
for this in Java 7 and below. Whereas previous the help message generated by JSAP contained the arguments in a random order, now they are now displayed in the same order given to the library (which is much better).
However, this is breaking one of our automated tests depending on whether the test is run on a Java 7 or a Java 8 machine.
To fix this I changed line 72 of JSAPResult
from this:
allExceptions = new java.util.HashMap();
to this:
allExceptions = new java.util.LinkedHashMap();
If a new version containing this fix could be deployed to Maven central that would be great.