Fix java testcase for jdk-1.9

Package.getName() returns an empty string instead of null in jdk-1.9
exposing bug in use of replaceAll whose 1st arg is a regex expression.
This commit is contained in:
William S Fulton 2016-05-01 16:31:19 +01:00
commit cc15fcebd0

View file

@ -140,7 +140,7 @@ public class director_classes_runme {
Package packag = klass.getPackage();
String simpleName = null;
if (packag != null)
simpleName = fullName.replaceAll(packag.getName() + ".", "");
simpleName = fullName.replaceAll(packag.getName() + "\\.", "");
else
simpleName = fullName;
return simpleName;