Merged #216 proposed fix into isJava40Compliant()