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:
Uwe Schindler 2014-09-23 22:12:34 +00:00
parent 07e00b4ffb
commit c60e7fe419
1 changed files with 5 additions and 9 deletions

View File

@ -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>