System.err.println(
IndexUnicodeProperties.make().getProperty(UcdProperty.Numeric_Type).getValue('1'));
System.err.println(
IndexUnicodeProperties.make(VersionInfo.UNICODE_4_1)
.getProperty(UcdProperty.Numeric_Type)
.getValue(0x2006));
correctly prints
but the second statement alone,
System.err.println(
IndexUnicodeProperties.make(VersionInfo.UNICODE_4_1)
.getProperty(UcdProperty.Numeric_Type)
.getValue(0x2006));
prints null.
This is because we had no @missing lines in 4.1.0 and earlier, and we consider later @missing lines to be valid for earlier versions unless overriden with version suffixes in the Extra files, see
|
private static void parseMissingFromValueAliases(Iterable<String> aliasesLines) { |
|
for (UcdLineParser.UcdLine line : |
|
new UcdLineParser(aliasesLines).withRange(false).withMissing(true)) { |
|
if (line.getType() == UcdLineParser.UcdLine.Contents.MISSING) { |
|
VersionInfo last_applicable_version = Settings.LATEST_VERSION_INFO; |
|
if (line.getParts().length > 3) { |
|
final String suffix = line.getParts()[3]; |
|
if (!VERSION.matcher(suffix).matches()) { |
|
throw new IllegalArgumentException( |
|
"Expected version suffix, got " + suffix); |
|
} |
|
last_applicable_version = VersionInfo.getInstance(suffix.substring(1)); |
|
} |
|
// # @missing: 0000..10FFFF; cjkIRG_KPSource; <none> |
|
setDefaultValueForPropertyName( |
|
line.getOriginalLine(), |
|
line.getParts()[1], |
|
line.getParts()[2], |
|
/* isEmpty= */ false, |
|
last_applicable_version); |
|
} |
|
} |
|
} |
and
|
public String getDefaultValue(VersionInfo version) { |
|
for (final var entry : defaultValues.entrySet()) { |
|
if (version.compareTo(entry.getKey()) <= 0) { |
|
return entry.getValue(); |
|
} |
|
} |
However, we do not actually ensure we load the files with the later @missing lines when reading older files…
correctly prints
but the second statement alone,
prints
null.This is because we had no
@missinglines in 4.1.0 and earlier, and we consider later@missinglines to be valid for earlier versions unless overriden with version suffixes in the Extra files, seeunicodetools/unicodetools/src/main/java/org/unicode/props/PropertyParsingInfo.java
Lines 2240 to 2262 in eac8de1
and
unicodetools/unicodetools/src/main/java/org/unicode/props/PropertyParsingInfo.java
Lines 566 to 571 in eac8de1
However, we do not actually ensure we load the files with the later
@missinglines when reading older files…