8043930: TypeError when attemping to create an instance of non-public class could be betterReviewed-by: attila, lagergren