A test fix .. to catch OOME from StringBuilder.append() as well as the API that is under test.
I don't think there's anything specific to G1 here, it could have happened with other collectors. bug : https://bugs.openjdk.java.net/browse/JDK-8080084 webrev: http://cr.openjdk.java.net/~prr/8080084/ -phil.