JBMAR-160: fixes for JDK 8

https://issues.jboss.org/browse/JBMAR-160