--- old/src/hotspot/share/classfile/classLoader.cpp 2019-03-11 14:25:36.138355570 +0100 +++ new/src/hotspot/share/classfile/classLoader.cpp 2019-03-11 14:25:35.938355573 +0100 @@ -206,7 +206,7 @@ // Set bad_class_name to true to indicate that the package name // could not be obtained due to an error condition. // In this situation, is_same_class_package returns false. - if (*class_name_ptr == 'L') { + if (*class_name_ptr == 'L' || *class_name_ptr == 'Q') { if (bad_class_name != NULL) { *bad_class_name = true; }