JBMAR-160: fixes for JDK 8

https://issues.jboss.org/browse/JBMAR-160
I just can't phantom why this was passing all the time.