The JVM does not complain given the flag: -XX:G1HeapRegionSize=16 (a very small region size)
Change so that the constraints check is done before adjusting G1HeapRegionSize.
Change so that the constraints check is done before adjusting G1HeapRegionSize.