8072054: Cannot build langtools if checked-out in a directory ending with \"com\"
Making sure a proper package name is used when generating Properties classes Reviewed-by: mcimadamore
This commit is contained in:
parent
74f6de6859
commit
3aff88ae3b
@ -192,8 +192,8 @@ public class ClassGenerator {
|
||||
*/
|
||||
String packageName(File file) {
|
||||
String path = file.getAbsolutePath();
|
||||
int begin = path.indexOf("com" + File.separatorChar);
|
||||
String packagePath = path.substring(begin, path.lastIndexOf(File.separatorChar));
|
||||
int begin = path.lastIndexOf(File.separatorChar + "com" + File.separatorChar);
|
||||
String packagePath = path.substring(begin + 1, path.lastIndexOf(File.separatorChar));
|
||||
String packageName = packagePath.replace(File.separatorChar, '.');
|
||||
return packageName;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user