LUCENE-5540: Update forbidden-apis, pegdown, groovy

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1579399 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uwe Schindler 2014-03-19 21:08:42 +00:00
parent 1ae8b73a89
commit b569844e04
7 changed files with 12 additions and 10 deletions

View File

@ -65,7 +65,7 @@ public class NewLocaleTask extends PerfTask {
getRunData().setLocale(locale);
System.out.println("Changed Locale to: " +
(locale == null ? "null" :
(locale.getDisplayName().length() == 0) ? "root locale" : locale));
(locale.getDisplayName(Locale.ENGLISH).length() == 0) ? "root locale" : locale));
return 1;
}

View File

@ -2181,7 +2181,7 @@ ${ant.project.name}.test.dependencies=${test.classpath.list}
<!-- GROOVY scripting engine for ANT tasks -->
<target name="resolve-groovy" unless="groovy.loaded" depends="ivy-availability-check,ivy-configure">
<ivy:cachepath organisation="org.codehaus.groovy" module="groovy-all" revision="2.2.1"
<ivy:cachepath organisation="org.codehaus.groovy" module="groovy-all" revision="2.2.2"
inline="true" conf="default" type="jar" transitive="true" pathid="groovy.classpath"/>
<taskdef name="groovy"
classname="org.codehaus.groovy.ant.Groovy"
@ -2196,7 +2196,7 @@ ${ant.project.name}.test.dependencies=${test.classpath.list}
<property name="forbidden-rue-excludes" value=""/>
<target name="-install-forbidden-apis" unless="forbidden-apis.loaded" depends="ivy-availability-check,ivy-configure">
<ivy:cachepath organisation="de.thetaphi" module="forbiddenapis" revision="1.4"
<ivy:cachepath organisation="de.thetaphi" module="forbiddenapis" revision="1.4.1"
inline="true" conf="default" transitive="true" pathid="forbidden-apis.classpath"/>
<taskdef name="forbidden-apis" classname="de.thetaphi.forbiddenapis.AntTask" classpathref="forbidden-apis.classpath"/>
<property name="forbidden-apis.loaded" value="true"/>
@ -2251,7 +2251,7 @@ ${ant.project.name}.test.dependencies=${test.classpath.list}
<!-- PEGDOWN macro: Before using depend on the target "resolve-pegdown,resolve-groovy" -->
<target name="resolve-pegdown" unless="pegdown.loaded" depends="ivy-availability-check,ivy-configure">
<ivy:cachepath organisation="org.pegdown" module="pegdown" revision="1.4.1"
<ivy:cachepath organisation="org.pegdown" module="pegdown" revision="1.4.2"
inline="true" conf="default" transitive="true" pathid="pegdown.classpath"/>
<property name="pegdown.loaded" value="true"/>
</target>

View File

@ -460,8 +460,8 @@ public class TestJoinUtil extends LuceneTestCase {
assertEquals(expectedTopDocs.getMaxScore(), actualTopDocs.getMaxScore(), 0.0f);
for (int i = 0; i < expectedTopDocs.scoreDocs.length; i++) {
if (VERBOSE) {
System.out.printf("Expected doc: %d | Actual doc: %d\n", expectedTopDocs.scoreDocs[i].doc, actualTopDocs.scoreDocs[i].doc);
System.out.printf("Expected score: %f | Actual score: %f\n", expectedTopDocs.scoreDocs[i].score, actualTopDocs.scoreDocs[i].score);
System.out.printf(Locale.ENGLISH, "Expected doc: %d | Actual doc: %d\n", expectedTopDocs.scoreDocs[i].doc, actualTopDocs.scoreDocs[i].doc);
System.out.printf(Locale.ENGLISH, "Expected score: %f | Actual score: %f\n", expectedTopDocs.scoreDocs[i].score, actualTopDocs.scoreDocs[i].score);
}
assertEquals(expectedTopDocs.scoreDocs[i].doc, actualTopDocs.scoreDocs[i].doc);
assertEquals(expectedTopDocs.scoreDocs[i].score, actualTopDocs.scoreDocs[i].score, 0.0f);

View File

@ -18,6 +18,7 @@ package org.apache.lucene.misc;
*/
import java.io.File;
import java.util.Locale;
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.FSDirectory;
import org.apache.lucene.index.DirectoryReader;
@ -49,7 +50,7 @@ public class GetTermInfo {
public static void getTermInfo(Directory dir, Term term) throws Exception {
IndexReader reader = DirectoryReader.open(dir);
System.out.printf("%s:%s \t totalTF = %,d \t doc freq = %,d \n",
System.out.printf(Locale.ROOT, "%s:%s \t totalTF = %,d \t doc freq = %,d \n",
term.field(), term.text(), reader.totalTermFreq(term), reader.docFreq(term));
}

View File

@ -31,6 +31,7 @@ import org.apache.lucene.util.BytesRef;
import java.io.File;
import java.io.IOException;
import java.util.Comparator;
import java.util.Locale;
/**
* <code>HighFreqTerms</code> class extracts the top n most frequent terms
@ -76,7 +77,7 @@ public class HighFreqTerms {
TermStats[] terms = getHighFreqTerms(reader, numTerms, field, comparator);
for (int i = 0; i < terms.length; i++) {
System.out.printf("%s:%s \t totalTF = %,d \t docFreq = %,d \n",
System.out.printf(Locale.ROOT, "%s:%s \t totalTF = %,d \t docFreq = %,d \n",
terms[i].field, terms[i].termtext.utf8ToString(), terms[i].totalTermFreq, terms[i].docFreq);
}
reader.close();

View File

@ -90,7 +90,7 @@ public class SimplePropertiesWriter extends DIHProperties {
if(params.get(LOCALE) != null) {
String localeStr = params.get(LOCALE);
for (Locale l : Locale.getAvailableLocales()) {
if(localeStr.equals(l.getDisplayName())) {
if(localeStr.equals(l.getDisplayName(Locale.ROOT))) {
locale = l;
break;
}

View File

@ -238,7 +238,7 @@ class SolrRecordWriter<K, V> extends RecordWriter<K, V> {
} catch (InterruptedException e) {
exitValue = "interrupted";
}
System.err.format("Exit value of 'ls -lR' is %s%n", exitValue);
System.err.format(Locale.ENGLISH, "Exit value of 'ls -lR' is %s%n", exitValue);
}
if (unpackedDir.getName().equals(SolrOutputFormat.getZipName(conf))) {
LOG.info("Using this unpacked directory as solr home: {}", unpackedDir);