mirror of https://github.com/apache/lucene.git
Fix forbidden API usage in Groovy code!
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1627166 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
07e00b4ffb
commit
c60e7fe419
|
@ -202,15 +202,11 @@
|
||||||
<filterchain>
|
<filterchain>
|
||||||
<tokenfilter>
|
<tokenfilter>
|
||||||
<filetokenizer/>
|
<filetokenizer/>
|
||||||
<scriptfilter language="groovy">
|
<scriptfilter language="groovy" classpathref="groovy.classpath"><![CDATA[
|
||||||
<classpath>
|
// private static Codec defaultCodec = Codec . forName ( "LuceneXXX" ) ;
|
||||||
<path refid="groovy.classpath"/>
|
def defaultCodecMatcher = self.getToken() =~ /defaultCodec\s*=\s*Codec\s*\.\s*forName\s*\(\s*"([^"]+)"\s*\)\s*;/
|
||||||
</classpath><![CDATA[
|
self.setToken(defaultCodecMatcher[0][1].toLowerCase(Locale.ROOT));
|
||||||
// private static Codec defaultCodec = Codec . forName ( "Lucene410" ) ;
|
]]></scriptfilter>
|
||||||
defaultCodecMatcher = self.getToken() =~ /defaultCodec\s*=\s*Codec\s*\.\s*forName\s*\(\s*"([^"]+)"\s*\)\s*;/
|
|
||||||
self.setToken(defaultCodecMatcher[0][1].toLowerCase());
|
|
||||||
]]>
|
|
||||||
</scriptfilter>
|
|
||||||
</tokenfilter>
|
</tokenfilter>
|
||||||
</filterchain>
|
</filterchain>
|
||||||
</loadfile>
|
</loadfile>
|
||||||
|
|
Loading…
Reference in New Issue