Prepend zeros to package part hash code
This commit is contained in:
+6
-2
@@ -56,8 +56,12 @@ public class PackagePartClassUtils {
|
||||
String fileName = FileUtil.getNameWithoutExtension(PathUtil.getFileName(file.getName()));
|
||||
|
||||
// path hashCode to prevent same name / different path collision
|
||||
String srcName = facadeFqName.shortName().asString() + "$" + replaceSpecialSymbols(fileName) + "$" + Integer.toHexString(
|
||||
getPathHashCode(file));
|
||||
String srcName = String.format(
|
||||
"%s$%s$%08x",
|
||||
facadeFqName.shortName().asString(),
|
||||
replaceSpecialSymbols(fileName),
|
||||
getPathHashCode(file)
|
||||
);
|
||||
|
||||
return facadeFqName.parent().child(Name.identifier(srcName));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user