[
https://issues.jboss.org/browse/ISPN-1727?page=com.atlassian.jira.plugin....
]
Sanne Grinovero updated ISPN-1727:
----------------------------------
Description:
{code}
private static String extractFqcn(String path, File f) {
return f.getAbsolutePath().replace(path, "").replace(File.separator,
".").replace(".class", "").replaceFirst(".",
"");
}
{code}
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.
was:
{code}
private static String extractFqcn(String path, File f) {
return f.getAbsolutePath().replace(path, "").replace(File.separator,
".").replace(".class", "").replaceFirst(".",
"");
}
{code}
A problems 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.
ComponentMetadataPersister is using dangerous characters in regular
expression replacement
------------------------------------------------------------------------------------------
Key: ISPN-1727
URL:
https://issues.jboss.org/browse/ISPN-1727
Project: Infinispan
Issue Type: Bug
Affects Versions: 5.1.0.CR3
Reporter: Sanne Grinovero
Assignee: Manik Surtani
Fix For: 5.1.0.FINAL
{code}
private static String extractFqcn(String path, File f) {
return f.getAbsolutePath().replace(path, "").replace(File.separator,
".").replace(".class", "").replaceFirst(".",
"");
}
{code}
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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira