in mail-archive/server/src/main/java/org/apache/sling/mailarchiveserver/impl/ThreadKeyGeneratorImpl.java [47:65]
public String getThreadKey(String subject) {
String wordCharsSubj;
String noReSubj;
if (subject != null) {
noReSubj = removeRe(subject);
wordCharsSubj = noReSubj.replaceAll("\\W", "_");
if (!isAddressable(wordCharsSubj)) {
noReSubj = wordCharsSubj = UNADDRESSABLE_SUBJECT;
}
} else {
noReSubj = wordCharsSubj = UNADDRESSABLE_SUBJECT;
}
char prefix1;
char prefix2;
prefix1 = assignPrefix(wordCharsSubj, LETTER_POS_WITH_BIGGEST_ENTROPY);
prefix2 = assignPrefix(wordCharsSubj, LETTER_POS_WITH_2ND_BIGGEST_ENTROPY);
return ""+prefix1+"/"+prefix1+prefix2+"/"+ makeJcrFriendly(noReSubj);
}