mirror of https://github.com/apache/lucene.git
LUCENE-4357: icu tools/ use forbidden apis
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1380967 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e96e4a62ef
commit
99c26e9955
|
@ -97,6 +97,9 @@
|
|||
<target name="compile-test">
|
||||
<forall-analyzers target="compile-test"/>
|
||||
</target>
|
||||
<target name="compile-tools">
|
||||
<forall-analyzers target="compile-tools"/>
|
||||
</target>
|
||||
<target name="test">
|
||||
<forall-analyzers target="test"/>
|
||||
</target>
|
||||
|
|
|
@ -37,6 +37,7 @@ import java.net.URL;
|
|||
import java.net.URLConnection;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
|
@ -252,15 +253,15 @@ public class GenerateUTR30DataFiles {
|
|||
if (it.codepoint != UnicodeSetIterator.IS_STRING) {
|
||||
if (numericValue) {
|
||||
for (int cp = it.codepoint ; cp <= it.codepointEnd ; ++cp) {
|
||||
builder.append(String.format("%04X", cp)).append('>');
|
||||
builder.append(String.format("%04X", 0x30 + UCharacter.getNumericValue(cp)));
|
||||
builder.append(String.format(Locale.ROOT, "%04X", cp)).append('>');
|
||||
builder.append(String.format(Locale.ROOT, "%04X", 0x30 + UCharacter.getNumericValue(cp)));
|
||||
builder.append(" # ").append(UCharacter.getName(cp));
|
||||
builder.append("\n");
|
||||
}
|
||||
} else {
|
||||
builder.append(String.format("%04X", it.codepoint));
|
||||
builder.append(String.format(Locale.ROOT, "%04X", it.codepoint));
|
||||
if (it.codepointEnd > it.codepoint) {
|
||||
builder.append("..").append(String.format("%04X", it.codepointEnd));
|
||||
builder.append("..").append(String.format(Locale.ROOT, "%04X", it.codepointEnd));
|
||||
}
|
||||
builder.append('>').append(rightHandSide).append("\n");
|
||||
}
|
||||
|
|
|
@ -146,6 +146,11 @@
|
|||
<!-- Validation (license/notice/api checks). -->
|
||||
<target name="validate" depends="check-licenses,rat-sources,check-forbidden-apis" description="Validate stuff." />
|
||||
|
||||
<!-- Validation here depends on compile-tools: but we want to compile modules' tools too -->
|
||||
<target name="compile-tools" depends="common.compile-tools">
|
||||
<modules-crawl target="compile-tools" failonerror="true"/>
|
||||
</target>
|
||||
|
||||
<target name="check-licenses" depends="compile-tools,resolve,load-custom-tasks" description="Validate license stuff.">
|
||||
<license-check-macro dir="${basedir}" licensedir="${common.dir}/licenses" />
|
||||
</target>
|
||||
|
|
Loading…
Reference in New Issue