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>
|
||||
<tokenfilter>
|
||||
<filetokenizer/>
|
||||
<scriptfilter language="groovy">
|
||||
<classpath>
|
||||
<path refid="groovy.classpath"/>
|
||||
</classpath><![CDATA[
|
||||
// private static Codec defaultCodec = Codec . forName ( "Lucene410" ) ;
|
||||
defaultCodecMatcher = self.getToken() =~ /defaultCodec\s*=\s*Codec\s*\.\s*forName\s*\(\s*"([^"]+)"\s*\)\s*;/
|
||||
self.setToken(defaultCodecMatcher[0][1].toLowerCase());
|
||||
]]>
|
||||
</scriptfilter>
|
||||
<scriptfilter language="groovy" classpathref="groovy.classpath"><![CDATA[
|
||||
// private static Codec defaultCodec = Codec . forName ( "LuceneXXX" ) ;
|
||||
def defaultCodecMatcher = self.getToken() =~ /defaultCodec\s*=\s*Codec\s*\.\s*forName\s*\(\s*"([^"]+)"\s*\)\s*;/
|
||||
self.setToken(defaultCodecMatcher[0][1].toLowerCase(Locale.ROOT));
|
||||
]]></scriptfilter>
|
||||
</tokenfilter>
|
||||
</filterchain>
|
||||
</loadfile>
|
||||
|
|
Loading…
Reference in New Issue