LUCENE-6774: Remove solr hack in MorfologikFilter

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1700837 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2015-09-02 15:00:53 +00:00
parent 5330bd6d2b
commit 387c7d2077
3 changed files with 4 additions and 13 deletions

View File

@ -100,6 +100,8 @@ Bug Fixes
* LUCENE-6748: UsageTrackingQueryCachingPolicy no longer caches trivial queries
like MatchAllDocsQuery. (Adrien Grand)
* LUCENE-6774: Remove solr hack in MorfologikFilter. (Robert Muir)
Other
* LUCENE-6174: Improve "ant eclipse" to select right JRE for building.

View File

@ -76,17 +76,8 @@ public class MorfologikFilter extends TokenFilter {
public MorfologikFilter(final TokenStream in, final String dict) {
super(in);
this.input = in;
// SOLR-4007: temporarily substitute context class loader to allow finding dictionary resources.
Thread me = Thread.currentThread();
ClassLoader cl = me.getContextClassLoader();
try {
me.setContextClassLoader(morfologik.stemming.Dictionary.class.getClassLoader());
this.stemmer = new DictionaryLookup(morfologik.stemming.Dictionary.getForLanguage(dict));
this.lemmaList = Collections.emptyList();
} finally {
me.setContextClassLoader(cl);
}
}
/**

View File

@ -67,8 +67,6 @@ grant {
permission java.lang.RuntimePermission "accessClassInPackage.sun.util";
// needed for test of IOUtils.spins (maybe it can be avoided)
permission java.lang.RuntimePermission "getFileStoreAttributes";
// analyzers/morfologik: needed for a horrible context classloader hack for solr in morfologikfilter: nuke this
permission java.lang.RuntimePermission "setContextClassLoader";
// analyzers/uima: needed by UIMA message localization... (?)
permission java.lang.RuntimePermission "createSecurityManager";
permission java.lang.RuntimePermission "createClassLoader";