Details
-
Bug
-
Resolution: Done
-
Major
-
5.1.0.CR3
-
None
-
None
Description
private static String extractFqcn(String path, File f) { return f.getAbsolutePath().replace(path, "").replace(File.separator, ".").replace(".class<span class="code-quote">", "").replaceFirst(".", ""); }
A problem is here - at least I think so as I've not seen any complaints; while "replace" is expecting a literal, "replaceFirst" is taking first argument as a regex pattern to match; and "." is a wildcard..
This method is a good candidate for a unit test but I'm not understanding what the purpose is - if someone could plase add examples of intended functionality.