On Mar 25, 2013, at 3:51 AM, Robert Muir <[email protected]> wrote:
> But this 'normalize' is wrongt: like map org.apache.lucene.xxx, or
> other packages of org.apache.solr.xxx to solr.xxx.

No, it maps o.a.(l|s).what.ev.er.xxx to solr.xxx.

Here's the code again:

-----
private static String normalizeSPIname(String fullyQualifiedName) {
  if (fullyQualifiedName.startsWith("org.apache.lucene.") || 
fullyQualifiedName.startsWith("org.apache.solr.")) {
    return "solr" + 
fullyQualifiedName.substring(fullyQualifiedName.lastIndexOf('.'));
  }
  return fullyQualifiedName;
}
-----

See the .lastIndexOf('.') part?

Steve
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to