You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2016/12/31 07:26:29 UTC
svn commit: r1776696 [1/2] - in /sis/branches/JDK8:
core/sis-build-helper/src/main/java/org/apache/sis/util/resources/
core/sis-feature/src/main/java/org/apache/sis/internal/feature/
core/sis-referencing/src/main/java/org/apache/sis/internal/referencin...
Author: desruisseaux
Date: Sat Dec 31 07:26:29 2016
New Revision: 1776696
URL: http://svn.apache.org/viewvc?rev=1776696&view=rev
Log:
Regenerate all resources without using key "0".
We reserve zero for meaning "no localized message".
Modified:
sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/IndexedResourceCompiler.java
sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/ResourceCompilerMojo.java
sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/Resources.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Resources.java
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/KeyConstants.java
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Messages.java
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java
sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/internal/geotiff/Resources.java
sis/branches/JDK8/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/Resources.java
sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/Resources.java
Modified: sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/IndexedResourceCompiler.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/IndexedResourceCompiler.java?rev=1776696&r1=1776695&r2=1776696&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/IndexedResourceCompiler.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/IndexedResourceCompiler.java [UTF-8] Sat Dec 31 07:26:29 2016
@@ -23,9 +23,9 @@ import java.util.regex.Pattern;
/**
- * Reads a given list of {@code .properties} files and copies their content to {@code .utf} files
- * using UTF-8 encoding. It also checks for key validity and checks values for {@link MessageFormat}
- * compatibility. Finally, it writes the key values in the Java source files.
+ * Reads a given list of {@code .properties} files and copies their content to {@code .utf} files using UTF-8 encoding.
+ * This class also checks for key validity and checks values for {@link MessageFormat} compatibility.
+ * Finally, it writes the key values in the Java source files.
*
* <p>This class is independent of any Mojo and could be executed from the command-line.
* For now we keep it package-private, but we could consider to enable execution from
@@ -33,7 +33,7 @@ import java.util.regex.Pattern;
*
* @author Martin Desruisseaux (IRD, Geomatys)
* @since 0.3
- * @version 0.3
+ * @version 0.8
* @module
*/
class IndexedResourceCompiler implements FilenameFilter, Comparator<Object> {
@@ -81,7 +81,7 @@ class IndexedResourceCompiler implements
/**
* Margin to write before the {@link #KEY_MODIFIERS}.
*/
- private static final String KEY_MARGIN = " "; // 8 spaces
+ private static final String KEY_MARGIN = " "; // 8 spaces
/**
* The source directory of the java and properties files.
@@ -100,8 +100,8 @@ class IndexedResourceCompiler implements
private File bundleClass;
/**
- * Integer IDs allocated to resource keys. This map will be shared for all languages
- * of a given resource bundle.
+ * Integer IDs allocated to resource keys.
+ * This map will be shared for all languages of a given resource bundle.
*/
private final Map<Integer,String> allocatedIDs = new HashMap<>();
@@ -124,14 +124,12 @@ class IndexedResourceCompiler implements
/**
* Constructs a new {@code IndexedResourceCompiler}.
*
- * @param sourceDirectory The source directory.
- * @param buildDirectory The target directory where to write UTF files.
- * @param resourcesToProcess The resource bundle base classes
+ * @param sourceDirectory the source directory.
+ * @param buildDirectory the target directory where to write UTF files.
+ * @param resourcesToProcess the resource bundle base classes
* (e.g. {@code org/apache/sis/util/resources/Vocabulary.java}).
*/
- public IndexedResourceCompiler(final File sourceDirectory, final File buildDirectory,
- final File[] resourcesToProcess)
- {
+ IndexedResourceCompiler(final File sourceDirectory, final File buildDirectory, final File[] resourcesToProcess) {
this.sourceDirectory = sourceDirectory;
this.buildDirectory = buildDirectory;
this.resourcesToProcess = resourcesToProcess;
@@ -140,8 +138,8 @@ class IndexedResourceCompiler implements
/**
* Runs the resource compiler.
*
- * @throws ResourceCompilerException If an error occurred.
- * @return The number of errors found.
+ * @throws ResourceCompilerException if an error occurred.
+ * @return the number of errors found.
*/
@SuppressWarnings("ForLoopReplaceableByForEach")
public int run() throws ResourceCompilerException {
@@ -166,7 +164,7 @@ class IndexedResourceCompiler implements
* Loads the existing key values from the source file. This is used in order to avoid
* the need to recompile the whole application when new entries are added.
*
- * @throws IOException If an error occurred while reading the source file.
+ * @throws IOException if an error occurred while reading the source file.
*/
private void loadKeyValues() throws IOException {
try (BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(bundleClass), JAVA_ENCODING))) {
@@ -178,10 +176,18 @@ class IndexedResourceCompiler implements
final int c = line.indexOf(';', s);
if (c >= 0) {
final String key = line.substring(KEY_MODIFIERS.length(), s).trim();
- final Integer ID = Integer.valueOf(line.substring(s+1, c).trim());
- final String old = allocatedIDs.put(ID, key);
+ final int id = Integer.parseInt(line.substring(s+1, c).trim());
+ final String old = allocatedIDs.put(id, key);
if (old != null) {
- warning("Key " + ID + " is used by " + old + " and " + key);
+ warning("Key " + id + " is used by " + old + " and " + key);
+ errors++;
+ } else if (id <= 0) {
+ final StringBuilder buffer = new StringBuilder(key).append(" = ")
+ .append(id).append(" is not a valid value.");
+ if (id == 0) {
+ buffer.append(" Zero is reserved for meaning \u201cno localized message\u201d.");
+ }
+ warning(buffer.toString());
errors++;
}
}
@@ -253,8 +259,8 @@ class IndexedResourceCompiler implements
/**
* Returns {@code true} if the given file is a property file.
*
- * @param directory The directory (ignored).
- * @param name The file name.
+ * @param directory the directory (ignored).
+ * @param name the file name.
* @return {@code true} if the given file is a property file.
*/
@Override
@@ -265,8 +271,8 @@ class IndexedResourceCompiler implements
/**
* Loads the specified property file. No processing are performed on them.
*
- * @param file The property file to load.
- * @return The properties.
+ * @param file the property file to load.
+ * @return the properties.
* @throws IOException if the file can not be read.
*/
private static Properties loadRawProperties(final File file) throws IOException {
@@ -290,7 +296,7 @@ class IndexedResourceCompiler implements
* <li>{@link #loadKeyValues()}</li>
* </ul>
*
- * @param file The properties file to read.
+ * @param file the properties file to read.
* @throws IOException if an input/output operation failed.
*/
private void loadProperties(final File file) throws IOException {
@@ -300,7 +306,7 @@ class IndexedResourceCompiler implements
final String key = (String) entry.getKey();
final String value = (String) entry.getValue();
/*
- * Checks key and value validity.
+ * Check key and value validity.
*/
if (key.trim().isEmpty()) {
warning(file, key, "Empty key.", null);
@@ -311,7 +317,7 @@ class IndexedResourceCompiler implements
continue;
}
/*
- * Checks if the resource value is a legal MessageFormat pattern.
+ * Check if the resource value is a legal MessageFormat pattern.
*/
final MessageFormat message;
try {
@@ -321,7 +327,7 @@ class IndexedResourceCompiler implements
continue;
}
/*
- * Checks if the expected arguments count (according to naming conventions)
+ * Check if the expected arguments count (according to naming conventions)
* matches the arguments count found in the MessageFormat pattern.
*/
int argumentCount = 0;
@@ -344,18 +350,19 @@ class IndexedResourceCompiler implements
}
}
/*
- * Allocates an ID for each new key.
+ * Allocate an ID for each new key. We start numbering at 1
+ * because some classes use key value 0 for meaning "no message".
*/
final String[] keys = resources.keySet().toArray(new String[resources.size()]);
Arrays.sort(keys, this);
int freeID = 0;
for (final String key : keys) {
if (!allocatedIDs.containsValue(key)) {
- Integer ID;
+ Integer id;
do {
- ID = freeID++;
- } while (allocatedIDs.containsKey(ID));
- allocatedIDs.put(ID, key);
+ id = ++freeID;
+ } while (allocatedIDs.containsKey(id));
+ allocatedIDs.put(id, key);
}
}
}
@@ -368,7 +375,7 @@ class IndexedResourceCompiler implements
int level = 0;
int last = -1;
final StringBuilder buffer = new StringBuilder(text);
-search: for (int i=0; i<buffer.length(); i++) { // Length of 'buffer' will vary.
+search: for (int i=0; i<buffer.length(); i++) { // Length of 'buffer' will vary.
switch (buffer.charAt(i)) {
/*
* Left and right braces take us up or down a level. Quotes will only be doubled
@@ -424,18 +431,18 @@ search: for (int i=0; i<buffer.length();
* <li>{@link #loadProperties(File)}</li>
* </ul>
*
- * @param file The destination file.
+ * @param file the destination file.
* @throws IOException if an input/output operation failed.
*/
private void writeUTF(final File file) throws IOException {
final File directory = file.getParentFile();
if (!directory.isDirectory() && !directory.mkdirs()) {
- throw new IOException("Can't create the " + directory + " directory.");
+ throw new IOException("Can not create the " + directory + " directory.");
}
- final int count = allocatedIDs.isEmpty() ? 0 : Collections.max(allocatedIDs.keySet()) + 1;
+ final int count = allocatedIDs.isEmpty() ? 0 : Collections.max(allocatedIDs.keySet());
try (DataOutputStream out = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(file)))) {
out.writeInt(count);
- for (int i=0; i<count; i++) {
+ for (int i=1; i<=count; i++) {
final String value = (String) resources.get(allocatedIDs.get(i));
out.writeUTF((value != null) ? value : "");
}
@@ -556,10 +563,10 @@ search: for (int i=0; i<buffer.length();
if (endOfLine >= 0) {
if (buffer.substring(startLineToCompare, endOfLine).equals(line)) {
startLineToCompare = endOfLine + lineSeparator.length();
- continue; // Content is equals, do not set the 'modified' flag.
+ continue; // Content is equals, do not set the 'modified' flag.
}
} else if (brackets == 0) {
- break; // Content finished in same time, do not set the 'modified' flag.
+ break; // Content finished in same time, do not set the 'modified' flag.
}
modified = true;
}
@@ -587,8 +594,8 @@ search: for (int i=0; i<buffer.length();
* objects representing resource keys (for example, "{@code MISMATCHED_DIMENSION}"), but
* may also be {@link java.util.Map.Entry}.
*
- * @param o1 The resource key to compare.
- * @param o2 The second resource key to compare.
+ * @param o1 the resource key to compare.
+ * @param o2 the second resource key to compare.
* @return -1, 0 or +1 based on the alphabetic order of resource keys.
*/
@Override
@@ -604,7 +611,7 @@ search: for (int i=0; i<buffer.length();
* Logs the given message at the {@code INFO} level.
* The default implementation just sent it to the standard output stream.
*
- * @param message The message to log.
+ * @param message the message to log.
*/
@SuppressWarnings("UseOfSystemOutOrSystemErr")
protected void info(final String message) {
@@ -615,7 +622,7 @@ search: for (int i=0; i<buffer.length();
* Logs the given message at the {@code WARNING} level.
* The default implementation just sent it to the standard output stream.
*
- * @param message The message to log.
+ * @param message the message to log.
*/
@SuppressWarnings("UseOfSystemOutOrSystemErr")
protected void warning(final String message) {
@@ -625,10 +632,10 @@ search: for (int i=0; i<buffer.length();
/**
* Logs the given message at the {@code WARNING} level.
*
- * @param file File that produced the error, or {@code null} if none.
- * @param key Resource key that produced the error, or {@code null} if none.
- * @param message The message string.
- * @param exception An optional exception that is the cause of this warning.
+ * @param file file that produced the error, or {@code null} if none.
+ * @param key resource key that produced the error, or {@code null} if none.
+ * @param message the message string.
+ * @param exception an optional exception that is the cause of this warning.
*/
private void warning(final File file, final String key,
final String message, final Exception exception)
Modified: sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/ResourceCompilerMojo.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/ResourceCompilerMojo.java?rev=1776696&r1=1776695&r2=1776696&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/ResourceCompilerMojo.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/ResourceCompilerMojo.java [UTF-8] Sat Dec 31 07:26:29 2016
@@ -177,8 +177,8 @@ public class ResourceCompilerMojo extend
/**
* Accepts all {@code "*.properties"} files.
*
- * @param directory The directory.
- * @param name The file name.
+ * @param directory the directory.
+ * @param name the file name.
* @return {@code true} if the given file is a property file.
*/
@Override
@@ -205,8 +205,8 @@ public class ResourceCompilerMojo extend
* <li>{@code "Messages.properties"}</li>
* </ul>
*
- * @param resourcesToProcess The files to filter. This array will be overwritten in-place.
- * @return Number of valid elements in the {@code resourcesToProcess} after this method completion.
+ * @param resourcesToProcess the files to filter. This array will be overwritten in-place.
+ * @return number of valid elements in the {@code resourcesToProcess} after this method completion.
*/
static int filterLanguages(final File[] resourcesToProcess) {
int count = 0;
@@ -236,9 +236,9 @@ public class ResourceCompilerMojo extend
* Converts the given property files into Java source file, provided that the later exists.
* The given array is overwritten in place.
*
- * @param resourcesToProcess The filtered resource files, as returned by {@link #filterLanguages(File[])}.
- * @param count Number of valid elements in {@code resourcesToProcess}.
- * @return Number of valid elements after this method completion.
+ * @param resourcesToProcess the filtered resource files, as returned by {@link #filterLanguages(File[])}.
+ * @param count number of valid elements in {@code resourcesToProcess}.
+ * @return number of valid elements after this method completion.
*/
private static int toJavaSourceFiles(final File[] resourcesToProcess, final int count) {
int n = 0;
@@ -259,7 +259,7 @@ public class ResourceCompilerMojo extend
* A resource compiler that delegates the messages to the Mojo logger.
*/
private final class Compiler extends IndexedResourceCompiler {
- public Compiler(File[] resourcesToProcess) {
+ Compiler(File[] resourcesToProcess) {
super(javaDirectoryFile, outputDirectory, resourcesToProcess);
}
Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/Resources.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/Resources.java?rev=1776696&r1=1776695&r2=1776696&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/Resources.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/Resources.java [UTF-8] Sat Dec 31 07:26:29 2016
@@ -62,96 +62,96 @@ public final class Resources extends Ind
/**
* Feature type \u2018{0}\u2019 is abstract.
*/
- public static final short AbstractFeatureType_1 = 0;
+ public static final short AbstractFeatureType_1 = 1;
/**
* Can not assign characteristics to the \u201c{0}\u201d property.
*/
- public static final short CanNotAssignCharacteristics_1 = 1;
+ public static final short CanNotAssignCharacteristics_1 = 2;
/**
* Property \u201c{0}\u201d is not a type that can be instantiated.
*/
- public static final short CanNotInstantiateProperty_1 = 2;
+ public static final short CanNotInstantiateProperty_1 = 3;
/**
* Can not set a value of type \u2018{1}\u2019 to characteristic \u201c{0}\u201d.
*/
- public static final short CanNotSetCharacteristics_2 = 3;
+ public static final short CanNotSetCharacteristics_2 = 4;
/**
* Type of the \u201c{0}\u201d property does not allow to set a value.
*/
- public static final short CanNotSetPropertyValue_1 = 4;
+ public static final short CanNotSetPropertyValue_1 = 5;
/**
* Characteristics \u201c{1}\u201d already exists in attribute \u201c{0}\u201d.
*/
- public static final short CharacteristicsAlreadyExists_2 = 5;
+ public static final short CharacteristicsAlreadyExists_2 = 6;
/**
* No characteristics named \u201c{1}\u201d has been found in \u201c{0}\u201d attribute.
*/
- public static final short CharacteristicsNotFound_2 = 6;
+ public static final short CharacteristicsNotFound_2 = 7;
/**
* Operation \u201c{0}\u201d requires a \u201c{1}\u201d property, but no such property has been found in \u201c{2}\u201d.
*/
- public static final short DependencyNotFound_3 = 7;
+ public static final short DependencyNotFound_3 = 8;
/**
* Association \u201c{0}\u201d does not accept features of type \u2018{2}\u2019. Expected an instance of \u2018{1}\u2019 or
* derived type.
*/
- public static final short IllegalFeatureType_3 = 8;
+ public static final short IllegalFeatureType_3 = 9;
/**
* Type or result of \u201c{0}\u201d property can not be \u2018{1}\u2019 for this operation.
*/
- public static final short IllegalPropertyType_2 = 9;
+ public static final short IllegalPropertyType_2 = 10;
/**
* Property \u201c{0}\u201d does not accept values of type \u2018{2}\u2019. Expected an instance of \u2018{1}\u2019 or
* derived type.
*/
- public static final short IllegalPropertyValueClass_3 = 10;
+ public static final short IllegalPropertyValueClass_3 = 11;
/**
* Mismatched type for \u201c{0}\u201d property.
*/
- public static final short MismatchedPropertyType_1 = 11;
+ public static final short MismatchedPropertyType_1 = 12;
/**
* An attribute for \u2018{1}\u2019 values where expected, but the \u201c{0}\u201d attribute specifies values of
* type \u2018{2}\u2019.
*/
- public static final short MismatchedValueClass_3 = 12;
+ public static final short MismatchedValueClass_3 = 13;
/**
* Property \u201c{0}\u201d contains more than one value.
*/
- public static final short NotASingleton_1 = 13;
+ public static final short NotASingleton_1 = 14;
/**
* Property \u201c{1}\u201d already exists in feature \u201c{0}\u201d.
*/
- public static final short PropertyAlreadyExists_2 = 14;
+ public static final short PropertyAlreadyExists_2 = 15;
/**
* No property named \u201c{1}\u201d has been found in \u201c{0}\u201d feature.
*/
- public static final short PropertyNotFound_2 = 15;
+ public static final short PropertyNotFound_2 = 16;
/**
* The \u201c{1}\u201d value given to \u201c{0}\u201d property should be separable in {2} components, but we got
* {3}.
*/
- public static final short UnexpectedNumberOfComponents_4 = 16;
+ public static final short UnexpectedNumberOfComponents_4 = 17;
/**
* Feature named \u201c{0}\u201d has not yet been resolved.
*/
- public static final short UnresolvedFeatureName_1 = 17;
+ public static final short UnresolvedFeatureName_1 = 18;
}
/**
Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Resources.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Resources.java?rev=1776696&r1=1776695&r2=1776696&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Resources.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Resources.java [UTF-8] Sat Dec 31 07:26:29 2016
@@ -65,131 +65,131 @@ public final class Resources extends Ind
* Ambiguity between inverse flattening and semi minor axis length for \u201c{0}\u201d. Using inverse
* flattening.
*/
- public static final short AmbiguousEllipsoid_1 = 0;
+ public static final short AmbiguousEllipsoid_1 = 1;
/**
* Can not compute the coordinate operation derivative.
*/
- public static final short CanNotComputeDerivative = 14;
+ public static final short CanNotComputeDerivative = 2;
/**
* Can not concatenate transforms \u201c{0}\u201d and \u201c{1}\u201d.
*/
- public static final short CanNotConcatenateTransforms_2 = 15;
+ public static final short CanNotConcatenateTransforms_2 = 3;
/**
* Can not create an object of group \u201c{1}\u201d as an instance of class \u2018{0}\u2019.
*/
- public static final short CanNotCreateObjectAsInstanceOf_2 = 57;
+ public static final short CanNotCreateObjectAsInstanceOf_2 = 4;
/**
* Can not instantiate geodetic object for \u201c{0}\u201d.
*/
- public static final short CanNotInstantiateGeodeticObject_1 = 58;
+ public static final short CanNotInstantiateGeodeticObject_1 = 5;
/**
* Can not map an axis from the specified coordinate system to the \u201c{0}\u201d direction.
*/
- public static final short CanNotMapAxisToDirection_1 = 16;
+ public static final short CanNotMapAxisToDirection_1 = 6;
/**
* Target dimension {0} depends on excluded source dimensions.
*/
- public static final short CanNotSeparateTargetDimension_1 = 17;
+ public static final short CanNotSeparateTargetDimension_1 = 7;
/**
* Can not transform envelope to a geodetic reference system.
*/
- public static final short CanNotTransformEnvelopeToGeodetic = 18;
+ public static final short CanNotTransformEnvelopeToGeodetic = 8;
/**
* Can not use the {0} geodetic parameters: {1}
*/
- public static final short CanNotUseGeodeticParameters_2 = 19;
+ public static final short CanNotUseGeodeticParameters_2 = 9;
/**
* Axis directions {0} and {1} are colinear.
*/
- public static final short ColinearAxisDirections_2 = 20;
+ public static final short ColinearAxisDirections_2 = 10;
/**
* This result indicates if a datum shift method has been applied.
*/
- public static final short ConformanceMeansDatumShift = 1;
+ public static final short ConformanceMeansDatumShift = 11;
/**
* This parameter is shown for completeness, but should never have a value different than {0}
* for this projection.
*/
- public static final short ConstantProjParameterValue_1 = 2;
+ public static final short ConstantProjParameterValue_1 = 12;
/**
* Coordinate conversion of transformation from system \u201c{0}\u201d to \u201c{1}\u201d has not been found.
*/
- public static final short CoordinateOperationNotFound_2 = 21;
+ public static final short CoordinateOperationNotFound_2 = 13;
/**
* Origin of temporal datum shall be a date.
*/
- public static final short DatumOriginShallBeDate = 22;
+ public static final short DatumOriginShallBeDate = 14;
/**
* Code \u201c{0}\u201d is deprecated and replaced by code {1}. Reason is: {2}
*/
- public static final short DeprecatedCode_3 = 3;
+ public static final short DeprecatedCode_3 = 15;
/**
* Name or alias for parameter \u201c{0}\u201d at index {1} conflict with name \u201c{2}\u201d at index {3}.
*/
- public static final short DuplicatedParameterName_4 = 59;
+ public static final short DuplicatedParameterName_4 = 16;
/**
* There is no factory for version {1} of \u201c{0}\u201d authority. Fallback on default version for
* objects creation.
*/
- public static final short FallbackDefaultFactoryVersion_2 = 4;
+ public static final short FallbackDefaultFactoryVersion_2 = 17;
/**
* {0} geodetic dataset version {1} on \u201c{2}\u201d version {3}.
*/
- public static final short GeodeticDataBase_4 = 5;
+ public static final short GeodeticDataBase_4 = 18;
/**
* More than one service provider of type \u2018{0}\u2019 are declared for \u201c{1}\u201d. Only the first provider
* (an instance of \u2018{2}\u2019) will be used.
*/
- public static final short IgnoredServiceProvider_3 = 6;
+ public static final short IgnoredServiceProvider_3 = 19;
/**
* Coordinate system of class \u2018{0}\u2019 can not have axis in the {1} direction.
*/
- public static final short IllegalAxisDirection_2 = 23;
+ public static final short IllegalAxisDirection_2 = 20;
/**
* Dimensions of \u201c{0}\u201d operation can not be ({1} \u2192 {2}).
*/
- public static final short IllegalOperationDimension_3 = 24;
+ public static final short IllegalOperationDimension_3 = 21;
/**
* This operation can not be applied to values of class \u2018{0}\u2019.
*/
- public static final short IllegalOperationForValueClass_1 = 25;
+ public static final short IllegalOperationForValueClass_1 = 22;
/**
* Parameter \u201c{0}\u201d can not be of type \u2018{1}\u2019.
*/
- public static final short IllegalParameterType_2 = 60;
+ public static final short IllegalParameterType_2 = 23;
/**
* Parameter \u201c{0}\u201d does not accept values of \u2018{2}\u2019 type. Expected an instance of \u2018{1}\u2019 or
* derived type.
*/
- public static final short IllegalParameterValueClass_3 = 61;
+ public static final short IllegalParameterValueClass_3 = 24;
/**
* Parameter \u201c{0}\u201d can not take the \u201c{1}\u201d value.
*/
- public static final short IllegalParameterValue_2 = 62;
+ public static final short IllegalParameterValue_2 = 25;
/**
* Unit of measurement \u201c{1}\u201d is not valid for \u201c{0}\u201d values.
@@ -209,217 +209,217 @@ public final class Resources extends Ind
/**
* Inverse operation uses this parameter value with opposite sign.
*/
- public static final short InverseOperationUsesOppositeSign = 7;
+ public static final short InverseOperationUsesOppositeSign = 29;
/**
* Inverse operation uses the same parameter value.
*/
- public static final short InverseOperationUsesSameSign = 8;
+ public static final short InverseOperationUsesSameSign = 30;
/**
* Latitudes {0} and {1} are opposite.
*/
- public static final short LatitudesAreOpposite_2 = 29;
+ public static final short LatitudesAreOpposite_2 = 31;
/**
* Loading datum shift file \u201c{0}\u201d.
*/
- public static final short LoadingDatumShiftFile_1 = 9;
+ public static final short LoadingDatumShiftFile_1 = 32;
/**
* The \u201c{1}\u201d parameter could have been omitted. But it has been given a value of {2} which does
* not match the definition of the \u201c{0}\u201d ellipsoid.
*/
- public static final short MismatchedEllipsoidAxisLength_3 = 10;
+ public static final short MismatchedEllipsoidAxisLength_3 = 33;
/**
* No coordinate operation from \u201c{0}\u201d to \u201c{1}\u201d because of mismatched factories.
*/
- public static final short MismatchedOperationFactories_2 = 11;
+ public static final short MismatchedOperationFactories_2 = 34;
/**
* Mismatched descriptor for \u201c{0}\u201d parameter.
*/
- public static final short MismatchedParameterDescriptor_1 = 63;
+ public static final short MismatchedParameterDescriptor_1 = 35;
/**
* Expected the \u201c{0}\u201d prime meridian but found \u201c{1}\u201d.
*/
- public static final short MismatchedPrimeMeridian_2 = 30;
+ public static final short MismatchedPrimeMeridian_2 = 36;
/**
* The transform has {2} {0,choice,0#source|1#target} dimension{2,choice,1#|2#s}, while {1} was
* expected.
*/
- public static final short MismatchedTransformDimension_3 = 31;
+ public static final short MismatchedTransformDimension_3 = 37;
/**
* Despite its name, this parameter is effectively \u201c{0}\u201d.
*/
- public static final short MisnamedParameter_1 = 12;
+ public static final short MisnamedParameter_1 = 38;
/**
* No authority was specified for code \u201c{0}\u201d. The expected syntax is \u201cAUTHORITY:CODE\u201d.
*/
- public static final short MissingAuthority_1 = 32;
+ public static final short MissingAuthority_1 = 39;
/**
* No horizontal dimension found in \u201c{0}\u201d.
*/
- public static final short MissingHorizontalDimension_1 = 33;
+ public static final short MissingHorizontalDimension_1 = 40;
/**
* Not enough dimension in \u2018MathTransform\u2019 input or output coordinates for the interpolation
* points.
*/
- public static final short MissingInterpolationOrdinates = 34;
+ public static final short MissingInterpolationOrdinates = 41;
/**
* No spatial or temporal dimension found in \u201c{0}\u201d
*/
- public static final short MissingSpatioTemporalDimension_1 = 35;
+ public static final short MissingSpatioTemporalDimension_1 = 42;
/**
* No temporal dimension found in \u201c{0}\u201d
*/
- public static final short MissingTemporalDimension_1 = 36;
+ public static final short MissingTemporalDimension_1 = 43;
/**
* Missing value for \u201c{0}\u201d parameter.
*/
- public static final short MissingValueForParameter_1 = 64;
+ public static final short MissingValueForParameter_1 = 44;
/**
* No vertical dimension found in \u201c{0}\u201d
*/
- public static final short MissingVerticalDimension_1 = 37;
+ public static final short MissingVerticalDimension_1 = 45;
/**
* No convergence.
*/
- public static final short NoConvergence = 38;
+ public static final short NoConvergence = 46;
/**
* No convergence for points {0} and {1}.
*/
- public static final short NoConvergenceForPoints_2 = 39;
+ public static final short NoConvergenceForPoints_2 = 47;
/**
* No \u2018{1}\u2019 object found for code \u201c{2}\u201d. However only a subset of the {0} geodetic dataset has
* been queried. See {3} for instruction about how to install the full {0} database.
*/
- public static final short NoSuchAuthorityCodeInSubset_4 = 69;
+ public static final short NoSuchAuthorityCodeInSubset_4 = 48;
/**
* No \u2018{1}\u2019 object found for code \u201c{2}\u201d in the \u201c{0}\u201d geodetic dataset.
*/
- public static final short NoSuchAuthorityCode_3 = 40;
+ public static final short NoSuchAuthorityCode_3 = 49;
/**
* No operation method found for name or identifier \u201c{0}\u201d.
*/
- public static final short NoSuchOperationMethod_1 = 41;
+ public static final short NoSuchOperationMethod_1 = 50;
/**
* Non invertible {0}�{1} matrix.
*/
- public static final short NonInvertibleMatrix_2 = 42;
+ public static final short NonInvertibleMatrix_2 = 51;
/**
* Can not invert the \u201c{0}\u201d operation.
*/
- public static final short NonInvertibleOperation_1 = 43;
+ public static final short NonInvertibleOperation_1 = 52;
/**
* Transform is not invertible.
*/
- public static final short NonInvertibleTransform = 44;
+ public static final short NonInvertibleTransform = 53;
/**
* Unit conversion from \u201c{0}\u201d to \u201c{1}\u201d is non-linear.
*/
- public static final short NonLinearUnitConversion_2 = 45;
+ public static final short NonLinearUnitConversion_2 = 54;
/**
* The \u201c{0}\u201d sequence is not monotonic.
*/
- public static final short NonMonotonicSequence_1 = 46;
+ public static final short NonMonotonicSequence_1 = 55;
/**
* Axis directions {0} and {1} are not perpendicular.
*/
- public static final short NonPerpendicularDirections_2 = 47;
+ public static final short NonPerpendicularDirections_2 = 56;
/**
* Scale is not uniform.
*/
- public static final short NonUniformScale = 48;
+ public static final short NonUniformScale = 57;
/**
* Matrix is not skew-symmetric.
*/
- public static final short NotASkewSymmetricMatrix = 49;
+ public static final short NotASkewSymmetricMatrix = 58;
/**
* Transform is not affine.
*/
- public static final short NotAnAffineTransform = 50;
+ public static final short NotAnAffineTransform = 59;
/**
* This parameter borrowed from the \u201c{0}\u201d projection is not formally a parameter of this
* projection.
*/
- public static final short NotFormalProjectionParameter_1 = 13;
+ public static final short NotFormalProjectionParameter_1 = 60;
/**
* No parameter named \u201c{1}\u201d has been found in \u201c{0}\u201d.
*/
- public static final short ParameterNotFound_2 = 65;
+ public static final short ParameterNotFound_2 = 61;
/**
* Recursive call while creating an object of type \u2018{0}\u2019 for code \u201c{1}\u201d.
*/
- public static final short RecursiveCreateCallForCode_2 = 66;
+ public static final short RecursiveCreateCallForCode_2 = 62;
/**
* Matrix is singular.
*/
- public static final short SingularMatrix = 51;
+ public static final short SingularMatrix = 63;
/**
* Unexpected dimension for a coordinate system of type \u2018{0}\u2019.
*/
- public static final short UnexpectedDimensionForCS_1 = 52;
+ public static final short UnexpectedDimensionForCS_1 = 64;
/**
* Parameter \u201c{0}\u201d does not expect unit.
*/
- public static final short UnitlessParameter_1 = 67;
+ public static final short UnitlessParameter_1 = 65;
/**
* Authority \u201c{0}\u201d is unknown.
*/
- public static final short UnknownAuthority_1 = 53;
+ public static final short UnknownAuthority_1 = 66;
/**
* Axis direction \u201c{0}\u201d is unknown.
*/
- public static final short UnknownAxisDirection_1 = 54;
+ public static final short UnknownAxisDirection_1 = 67;
/**
* This affine transform is unmodifiable.
*/
- public static final short UnmodifiableAffineTransform = 55;
+ public static final short UnmodifiableAffineTransform = 68;
/**
* Dimensions have not been specified.
*/
- public static final short UnspecifiedDimensions = 56;
+ public static final short UnspecifiedDimensions = 69;
/**
* Parameter values have not been specified.
*/
- public static final short UnspecifiedParameterValues = 68;
+ public static final short UnspecifiedParameterValues = 70;
}
/**
Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java?rev=1776696&r1=1776695&r2=1776696&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java [UTF-8] Sat Dec 31 07:26:29 2016
@@ -67,838 +67,838 @@ public final class Errors extends Indexe
/**
* Name \u201c{2}\u201d is ambiguous because it can be understood as either \u201c{0}\u201d or \u201c{1}\u201d.
*/
- public static final short AmbiguousName_3 = 0;
+ public static final short AmbiguousName_3 = 1;
/**
* No element can be added to this set because properties \u2018{0}\u2019 and \u2018{1}\u2019 are mutually
* exclusive.
*/
- public static final short CanNotAddToExclusiveSet_2 = 1;
+ public static final short CanNotAddToExclusiveSet_2 = 2;
/**
* Can not assign units \u201c{1}\u201d to dimension \u201c{0}\u201d.
*/
- public static final short CanNotAssignUnitToDimension_2 = 2;
+ public static final short CanNotAssignUnitToDimension_2 = 3;
/**
* Can not assign \u201c{1}\u201d to \u201c{0}\u201d.
*/
- public static final short CanNotAssign_2 = 3;
+ public static final short CanNotAssign_2 = 4;
/**
* Can not compute \u201c{0}\u201d.
*/
- public static final short CanNotCompute_1 = 4;
+ public static final short CanNotCompute_1 = 5;
/**
* Can not connect to \u201c{0}\u201d.
*/
- public static final short CanNotConnectTo_1 = 5;
+ public static final short CanNotConnectTo_1 = 6;
/**
* Can not convert from type \u2018{0}\u2019 to type \u2018{1}\u2019.
*/
- public static final short CanNotConvertFromType_2 = 6;
+ public static final short CanNotConvertFromType_2 = 7;
/**
* Can not convert value \u201c{0}\u201d to type \u2018{1}\u2019.
*/
- public static final short CanNotConvertValue_2 = 7;
+ public static final short CanNotConvertValue_2 = 8;
/**
* Can not open \u201c{0}\u201d.
*/
- public static final short CanNotOpen_1 = 8;
+ public static final short CanNotOpen_1 = 9;
/**
* Can not parse \u201c{1}\u201d as a file in the {0} format.
*/
- public static final short CanNotParseFile_2 = 9;
+ public static final short CanNotParseFile_2 = 10;
/**
* Can not read property \u201c{1}\u201d in file \u201c{0}\u201d.
*/
- public static final short CanNotReadPropertyInFile_2 = 10;
+ public static final short CanNotReadPropertyInFile_2 = 11;
/**
* Can not read \u201c{0}\u201d.
*/
- public static final short CanNotRead_1 = 11;
+ public static final short CanNotRead_1 = 12;
/**
* Can not represent \u201c{1}\u201d in a strictly standard-compliant {0} format.
*/
- public static final short CanNotRepresentInFormat_2 = 12;
+ public static final short CanNotRepresentInFormat_2 = 13;
/**
* Can not set a value for parameter \u201c{0}\u201d.
*/
- public static final short CanNotSetParameterValue_1 = 13;
+ public static final short CanNotSetParameterValue_1 = 14;
/**
* Can not set a value for property \u201c{0}\u201d.
*/
- public static final short CanNotSetPropertyValue_1 = 14;
+ public static final short CanNotSetPropertyValue_1 = 15;
/**
* Can not transform envelope.
*/
- public static final short CanNotTransformEnvelope = 15;
+ public static final short CanNotTransformEnvelope = 16;
/**
* Can not write \u201c{1}\u201d as a file in the {0} format.
*/
- public static final short CanNotWriteFile_2 = 16;
+ public static final short CanNotWriteFile_2 = 17;
/**
* Circular reference.
*/
- public static final short CircularReference = 17;
+ public static final short CircularReference = 18;
/**
* Class \u2018{0}\u2019 is not final.
*/
- public static final short ClassNotFinal_1 = 18;
+ public static final short ClassNotFinal_1 = 19;
/**
* Can not clone an object of type \u2018{0}\u2019.
*/
- public static final short CloneNotSupported_1 = 19;
+ public static final short CloneNotSupported_1 = 20;
/**
* Database error while creating a \u2018{0}\u2019 object for the \u201c{1}\u201d identifier.
*/
- public static final short DatabaseError_2 = 20;
+ public static final short DatabaseError_2 = 21;
/**
* Thread \u201c{0}\u201d is dead.
*/
- public static final short DeadThread_1 = 21;
+ public static final short DeadThread_1 = 22;
/**
* This instance of \u2018{0}\u2019 has been disposed.
*/
- public static final short DisposedInstanceOf_1 = 22;
+ public static final short DisposedInstanceOf_1 = 23;
/**
* Element \u201c{0}\u201d is duplicated.
*/
- public static final short DuplicatedElement_1 = 23;
+ public static final short DuplicatedElement_1 = 24;
/**
* Name or identifier \u201c{0}\u201d is used more than once.
*/
- public static final short DuplicatedIdentifier_1 = 24;
+ public static final short DuplicatedIdentifier_1 = 25;
/**
* Option \u201c{0}\u201d is duplicated.
*/
- public static final short DuplicatedOption_1 = 25;
+ public static final short DuplicatedOption_1 = 26;
/**
* Element \u201c{0}\u201d is already present.
*/
- public static final short ElementAlreadyPresent_1 = 26;
+ public static final short ElementAlreadyPresent_1 = 27;
/**
* Element \u201c{0}\u201d has not been found.
*/
- public static final short ElementNotFound_1 = 27;
+ public static final short ElementNotFound_1 = 28;
/**
* Argument \u2018{0}\u2019 shall not be empty.
*/
- public static final short EmptyArgument_1 = 28;
+ public static final short EmptyArgument_1 = 29;
/**
* The dictionary shall contain at least one entry.
*/
- public static final short EmptyDictionary = 29;
+ public static final short EmptyDictionary = 30;
/**
* Envelope must be at least two-dimensional and non-empty.
*/
- public static final short EmptyEnvelope2D = 30;
+ public static final short EmptyEnvelope2D = 31;
/**
* Property named \u201c{0}\u201d shall not be empty.
*/
- public static final short EmptyProperty_1 = 31;
+ public static final short EmptyProperty_1 = 32;
/**
* An error occurred in file \u201c{0}\u201d at Line {1}.
*/
- public static final short ErrorInFileAtLine_2 = 32;
+ public static final short ErrorInFileAtLine_2 = 33;
/**
* Error in \u201c{0}\u201d: {1}
*/
- public static final short ErrorIn_2 = 33;
+ public static final short ErrorIn_2 = 34;
/**
* Argument \u2018{0}\u2019 shall not contain more than {1} elements. A number of {2} is excessive.
*/
- public static final short ExcessiveArgumentSize_3 = 34;
+ public static final short ExcessiveArgumentSize_3 = 35;
/**
* A size of {1} elements is excessive for the \u201c{0}\u201d list.
*/
- public static final short ExcessiveListSize_2 = 35;
+ public static final short ExcessiveListSize_2 = 36;
/**
* For this algorithm, {0} is an excessive number of dimensions.
*/
- public static final short ExcessiveNumberOfDimensions_1 = 36;
+ public static final short ExcessiveNumberOfDimensions_1 = 37;
/**
* No factory of kind \u2018{0}\u2019 found.
*/
- public static final short FactoryNotFound_1 = 37;
+ public static final short FactoryNotFound_1 = 38;
/**
* File \u201c{0}\u201d has not been found.
*/
- public static final short FileNotFound_1 = 38;
+ public static final short FileNotFound_1 = 39;
/**
* Attribute \u201c{0}\u201d is not allowed for an object of type \u2018{1}\u2019.
*/
- public static final short ForbiddenAttribute_2 = 39;
+ public static final short ForbiddenAttribute_2 = 40;
/**
* Property \u201c{0}\u201d is not allowed.
*/
- public static final short ForbiddenProperty_1 = 40;
+ public static final short ForbiddenProperty_1 = 41;
/**
* Argument \u2018{0}\u2019 can not be an instance of \u2018{1}\u2019.
*/
- public static final short IllegalArgumentClass_2 = 41;
+ public static final short IllegalArgumentClass_2 = 42;
/**
* Argument \u2018{0}\u2019 can not be an instance of \u2018{2}\u2019. Expected an instance of \u2018{1}\u2019 or derived
* type.
*/
- public static final short IllegalArgumentClass_3 = 42;
+ public static final short IllegalArgumentClass_3 = 43;
/**
* Argument \u2018{0}\u2019 can not take the \u201c{1}\u201d value, because the \u2018{2}\u2019 field can not take the \u201c{3}\u201d
* value.
*/
- public static final short IllegalArgumentField_4 = 43;
+ public static final short IllegalArgumentField_4 = 44;
/**
* Argument \u2018{0}\u2019 can not take the \u201c{1}\u201d value.
*/
- public static final short IllegalArgumentValue_2 = 44;
+ public static final short IllegalArgumentValue_2 = 45;
/**
* Illegal bits pattern: {0}.
*/
- public static final short IllegalBitsPattern_1 = 45;
+ public static final short IllegalBitsPattern_1 = 46;
/**
* Coordinate reference system can not be of type \u2018{0}\u2019.
*/
- public static final short IllegalCRSType_1 = 46;
+ public static final short IllegalCRSType_1 = 47;
/**
* The \u201c{2}\u201d character in \u201c{1}\u201d is not permitted by the \u201c{0}\u201d format.
*/
- public static final short IllegalCharacterForFormat_3 = 47;
+ public static final short IllegalCharacterForFormat_3 = 48;
/**
* The \u201c{1}\u201d character can not be used for \u201c{0}\u201d.
*/
- public static final short IllegalCharacter_2 = 48;
+ public static final short IllegalCharacter_2 = 49;
/**
* Class \u2018{1}\u2019 is illegal. It must be \u2018{0}\u2019 or a derived class.
*/
- public static final short IllegalClass_2 = 49;
+ public static final short IllegalClass_2 = 50;
/**
* Coordinate system can not be \u201c{0}\u201d.
*/
- public static final short IllegalCoordinateSystem_1 = 50;
+ public static final short IllegalCoordinateSystem_1 = 51;
/**
* The \u201c{1}\u201d pattern can not be applied to formating of objects of type \u2018{0}\u2019.
*/
- public static final short IllegalFormatPatternForClass_2 = 51;
+ public static final short IllegalFormatPatternForClass_2 = 52;
/**
* \u201c{1}\u201d is not a valid identifier for the \u201c{0}\u201d code space.
*/
- public static final short IllegalIdentifierForCodespace_2 = 52;
+ public static final short IllegalIdentifierForCodespace_2 = 53;
/**
* The \u201c{0}\u201d language is not recognized.
*/
- public static final short IllegalLanguageCode_1 = 53;
+ public static final short IllegalLanguageCode_1 = 54;
/**
* Member \u201c{0}\u201d can not be associated to type \u201c{1}\u201d.
*/
- public static final short IllegalMemberType_2 = 54;
+ public static final short IllegalMemberType_2 = 55;
/**
* Option \u2018{0}\u2019 can not take the \u201c{1}\u201d value.
*/
- public static final short IllegalOptionValue_2 = 55;
+ public static final short IllegalOptionValue_2 = 56;
/**
* The [{0} \u2026 {1}] range of ordinate values is not valid for the \u201c{2}\u201d axis.
*/
- public static final short IllegalOrdinateRange_3 = 56;
+ public static final short IllegalOrdinateRange_3 = 57;
/**
* Property \u201c{0}\u201d does not accept instances of \u2018{1}\u2019.
*/
- public static final short IllegalPropertyValueClass_2 = 57;
+ public static final short IllegalPropertyValueClass_2 = 58;
/**
* Expected an instance of \u2018{1}\u2019 for the \u201c{0}\u201d property, but got an instance of \u2018{2}\u2019.
*/
- public static final short IllegalPropertyValueClass_3 = 58;
+ public static final short IllegalPropertyValueClass_3 = 59;
/**
* Range [{0} \u2026 {1}] is not valid.
*/
- public static final short IllegalRange_2 = 59;
+ public static final short IllegalRange_2 = 60;
/**
* Value {1} for \u201c{0}\u201d is not a valid Unicode code point.
*/
- public static final short IllegalUnicodeCodePoint_2 = 60;
+ public static final short IllegalUnicodeCodePoint_2 = 61;
/**
* Can not use the \u201c{1}\u201d format with \u201c{0}\u201d.
*/
- public static final short IncompatibleFormat_2 = 61;
+ public static final short IncompatibleFormat_2 = 62;
/**
* Property \u201c{0}\u201d has an incompatible value.
*/
- public static final short IncompatiblePropertyValue_1 = 62;
+ public static final short IncompatiblePropertyValue_1 = 63;
/**
* The \u201c{0}\u201d unit of measurement has dimension of \u2018{1}\u2019 ({2}). It is incompatible with
* dimension of \u2018{3}\u2019 ({4}).
*/
- public static final short IncompatibleUnitDimension_5 = 63;
+ public static final short IncompatibleUnitDimension_5 = 64;
/**
* Unit \u201c{0}\u201d is incompatible with current value.
*/
- public static final short IncompatibleUnit_1 = 64;
+ public static final short IncompatibleUnit_1 = 65;
/**
* Units \u201c{0}\u201d and \u201c{1}\u201d are incompatible.
*/
- public static final short IncompatibleUnits_2 = 65;
+ public static final short IncompatibleUnits_2 = 66;
/**
* Value \u201c{1}\u201d of attribute \u2018{0}\u2019 is inconsistent with other attributes.
*/
- public static final short InconsistentAttribute_2 = 66;
+ public static final short InconsistentAttribute_2 = 67;
/**
* Expected \u201c{0}\u201d namespace for \u201c{1}\u201d.
*/
- public static final short InconsistentNamespace_2 = 67;
+ public static final short InconsistentNamespace_2 = 68;
/**
* Inconsistent table columns.
*/
- public static final short InconsistentTableColumns = 68;
+ public static final short InconsistentTableColumns = 69;
/**
* Unit of measurement \u201c{0}\u201d is inconsistent with coordinate system axes.
*/
- public static final short InconsistentUnitsForCS_1 = 69;
+ public static final short InconsistentUnitsForCS_1 = 70;
/**
* Index {0} is out of bounds.
*/
- public static final short IndexOutOfBounds_1 = 70;
+ public static final short IndexOutOfBounds_1 = 71;
/**
* Indices ({0}, {1}) are out of bounds.
*/
- public static final short IndicesOutOfBounds_2 = 71;
+ public static final short IndicesOutOfBounds_2 = 72;
/**
* Argument \u2018{0}\u2019 can not take an infinite value.
*/
- public static final short InfiniteArgumentValue_1 = 72;
+ public static final short InfiniteArgumentValue_1 = 73;
/**
* Argument \u2018{0}\u2019 shall contain at least {1} elements. A number of {2} is insufficient.
*/
- public static final short InsufficientArgumentSize_3 = 73;
+ public static final short InsufficientArgumentSize_3 = 74;
/**
* A different value is already associated to the \u201c{0}\u201d key.
*/
- public static final short KeyCollision_1 = 74;
+ public static final short KeyCollision_1 = 75;
/**
* Attribute \u201c{0}\u201d is mandatory for an object of type \u2018{1}\u2019.
*/
- public static final short MandatoryAttribute_2 = 75;
+ public static final short MandatoryAttribute_2 = 76;
/**
* Mismatched array lengths.
*/
- public static final short MismatchedArrayLengths = 76;
+ public static final short MismatchedArrayLengths = 77;
/**
* The coordinate reference system must be the same for all objects.
*/
- public static final short MismatchedCRS = 77;
+ public static final short MismatchedCRS = 78;
/**
* The \u201c{0}\u201d coordinate reference system has {1} dimension{1,choice,1#|2#s}, but the given
* geometry is {2}-dimensional.
*/
- public static final short MismatchedDimensionForCRS_3 = 78;
+ public static final short MismatchedDimensionForCRS_3 = 79;
/**
* Mismatched object dimensions: {0}D and {1}D.
*/
- public static final short MismatchedDimension_2 = 79;
+ public static final short MismatchedDimension_2 = 80;
/**
* Argument \u2018{0}\u2019 has {2} dimension{2,choice,1#|2#s}, while {1} was expected.
*/
- public static final short MismatchedDimension_3 = 80;
+ public static final short MismatchedDimension_3 = 81;
/**
* The grid geometry must be the same for \u201c{0}\u201d and \u201c{1}\u201d.
*/
- public static final short MismatchedGridGeometry_2 = 81;
+ public static final short MismatchedGridGeometry_2 = 82;
/**
* Mismatched matrix sizes: expected {0}�{1} but got {2}�{3}.
*/
- public static final short MismatchedMatrixSize_4 = 82;
+ public static final short MismatchedMatrixSize_4 = 83;
/**
* Missing a \u2018{1}\u2019 character in \u201c{0}\u201d element.
*/
- public static final short MissingCharacterInElement_2 = 83;
+ public static final short MissingCharacterInElement_2 = 84;
/**
* Missing a \u201c{1}\u201d component in \u201c{0}\u201d.
*/
- public static final short MissingComponentInElement_2 = 84;
+ public static final short MissingComponentInElement_2 = 85;
/**
* JAXB context has not been specified.
*/
- public static final short MissingJAXBContext = 85;
+ public static final short MissingJAXBContext = 86;
/**
* This operation requires the \u201c{0}\u201d module.
*/
- public static final short MissingRequiredModule_1 = 86;
+ public static final short MissingRequiredModule_1 = 87;
/**
* Missing value for \u201c{0}\u201d option.
*/
- public static final short MissingValueForOption_1 = 87;
+ public static final short MissingValueForOption_1 = 88;
/**
* Missing value for \u201c{0}\u201d property.
*/
- public static final short MissingValueForProperty_1 = 88;
+ public static final short MissingValueForProperty_1 = 89;
/**
* Missing value in the \u201c{0}\u201d column.
*/
- public static final short MissingValueInColumn_1 = 89;
+ public static final short MissingValueInColumn_1 = 90;
/**
* Options \u201c{0}\u201d and \u201c{1}\u201d are mutually exclusive.
*/
- public static final short MutuallyExclusiveOptions_2 = 90;
+ public static final short MutuallyExclusiveOptions_2 = 91;
/**
* Argument \u2018{0}\u2019 shall not be negative. The given value was {1}.
*/
- public static final short NegativeArgument_2 = 91;
+ public static final short NegativeArgument_2 = 92;
/**
* Can not create a \u201c{0}\u201d array of negative length.
*/
- public static final short NegativeArrayLength_1 = 92;
+ public static final short NegativeArrayLength_1 = 93;
/**
* Nested \u201c{0}\u201d elements are not allowed.
*/
- public static final short NestedElementNotAllowed_1 = 93;
+ public static final short NestedElementNotAllowed_1 = 94;
/**
* No value is associated to \u201c{0}\u201d.
*/
- public static final short NoSuchValue_1 = 94;
+ public static final short NoSuchValue_1 = 95;
/**
* Node \u201c{0}\u201d can not be a child of itself.
*/
- public static final short NodeChildOfItself_1 = 95;
+ public static final short NodeChildOfItself_1 = 96;
/**
* Node \u201c{0}\u201d already has another parent.
*/
- public static final short NodeHasAnotherParent_1 = 96;
+ public static final short NodeHasAnotherParent_1 = 97;
/**
* Node \u201c{0}\u201d has no parent.
*/
- public static final short NodeHasNoParent_1 = 97;
+ public static final short NodeHasNoParent_1 = 98;
/**
* Node \u201c{0}\u201d is a leaf.
*/
- public static final short NodeIsLeaf_1 = 98;
+ public static final short NodeIsLeaf_1 = 99;
/**
* \u201c{0}\u201d is not an angular unit.
*/
- public static final short NonAngularUnit_1 = 99;
+ public static final short NonAngularUnit_1 = 100;
/**
* Missing a \u2018{1}\u2019 parenthesis in \u201c{0}\u201d.
*/
- public static final short NonEquilibratedParenthesis_2 = 100;
+ public static final short NonEquilibratedParenthesis_2 = 101;
/**
* Conversion is not invertible.
*/
- public static final short NonInvertibleConversion = 101;
+ public static final short NonInvertibleConversion = 102;
/**
* \u201c{0}\u201d is not a linear unit.
*/
- public static final short NonLinearUnit_1 = 102;
+ public static final short NonLinearUnit_1 = 103;
/**
* The scale of measurement for \u201c{0}\u201d unit is not a ratio scale.
*/
- public static final short NonRatioUnit_1 = 103;
+ public static final short NonRatioUnit_1 = 104;
/**
* \u201c{0}\u201d is not a scale unit.
*/
- public static final short NonScaleUnit_1 = 104;
+ public static final short NonScaleUnit_1 = 105;
/**
* \u201c{0}\u201d is not a fundamental or derived unit.
*/
- public static final short NonSystemUnit_1 = 105;
+ public static final short NonSystemUnit_1 = 106;
/**
* \u201c{0}\u201d is not a time unit.
*/
- public static final short NonTemporalUnit_1 = 106;
+ public static final short NonTemporalUnit_1 = 107;
/**
* No element for the \u201c{0}\u201d identifier, or the identifier is a forward reference.
*/
- public static final short NotABackwardReference_1 = 107;
+ public static final short NotABackwardReference_1 = 108;
/**
* \u201c{0}\u201d is not a key-value pair.
*/
- public static final short NotAKeyValuePair_1 = 108;
+ public static final short NotAKeyValuePair_1 = 109;
/**
* Argument \u2018{0}\u2019 shall not be NaN (Not-a-Number).
*/
- public static final short NotANumber_1 = 109;
+ public static final short NotANumber_1 = 110;
/**
* Class \u2018{0}\u2019 is not a primitive type wrapper.
*/
- public static final short NotAPrimitiveWrapper_1 = 110;
+ public static final short NotAPrimitiveWrapper_1 = 111;
/**
* Text \u201c{0}\u201d is not a Unicode identifier.
*/
- public static final short NotAUnicodeIdentifier_1 = 111;
+ public static final short NotAUnicodeIdentifier_1 = 112;
/**
* Argument \u2018{0}\u2019 shall not be null.
*/
- public static final short NullArgument_1 = 112;
+ public static final short NullArgument_1 = 113;
/**
* \u2018{0}\u2019 collection does not accept null elements.
*/
- public static final short NullCollectionElement_1 = 113;
+ public static final short NullCollectionElement_1 = 114;
/**
* Null key is not allowed in this dictionary.
*/
- public static final short NullMapKey = 114;
+ public static final short NullMapKey = 115;
/**
* Null values are not allowed in this dictionary.
*/
- public static final short NullMapValue = 115;
+ public static final short NullMapValue = 116;
/**
* Unexpected null value in record \u201c{2}\u201d for the column \u201c{1}\u201d in table \u201c{0}\u201d.
*/
- public static final short NullValueInTable_3 = 116;
+ public static final short NullValueInTable_3 = 117;
/**
* Array length is {0}, while we expected an even length.
*/
- public static final short OddArrayLength_1 = 117;
+ public static final short OddArrayLength_1 = 118;
/**
* Coordinate is outside the domain of validity.
*/
- public static final short OutsideDomainOfValidity = 118;
+ public static final short OutsideDomainOfValidity = 119;
/**
* No property named \u201c{1}\u201d has been found in \u201c{0}\u201d.
*/
- public static final short PropertyNotFound_2 = 119;
+ public static final short PropertyNotFound_2 = 120;
/**
* Record \u201c{1}\u201d is already defined in schema \u201c{0}\u201d.
*/
- public static final short RecordAlreadyDefined_2 = 120;
+ public static final short RecordAlreadyDefined_2 = 121;
/**
* No record found in \u201c{0}\u201d table for \u201c{1}\u201d key.
*/
- public static final short RecordNotFound_2 = 121;
+ public static final short RecordNotFound_2 = 122;
/**
* Recursive call while creating an object for the \u201c{0}\u201d key.
*/
- public static final short RecursiveCreateCallForKey_1 = 122;
+ public static final short RecursiveCreateCallForKey_1 = 123;
/**
* A decimal separator is required.
*/
- public static final short RequireDecimalSeparator = 123;
+ public static final short RequireDecimalSeparator = 124;
/**
* Thread \u201c{0}\u201d seems stalled.
*/
- public static final short StalledThread_1 = 124;
+ public static final short StalledThread_1 = 125;
/**
* Table \u201c{0}\u201d has not been found.
*/
- public static final short TableNotFound_1 = 125;
+ public static final short TableNotFound_1 = 126;
/**
* Expected at least {0} argument{0,choice,1#|2#s}, but got {1}.
*/
- public static final short TooFewArguments_2 = 126;
+ public static final short TooFewArguments_2 = 127;
/**
* Too few occurrences of \u201c{1}\u201d. Expected at least {0} of them.
*/
- public static final short TooFewOccurrences_2 = 127;
+ public static final short TooFewOccurrences_2 = 128;
/**
* Expected at most {0} argument{0,choice,1#|2#s}, but got {1}.
*/
- public static final short TooManyArguments_2 = 128;
+ public static final short TooManyArguments_2 = 129;
/**
* Too many occurrences of \u201c{1}\u201d. The maximum is {0}.
*/
- public static final short TooManyOccurrences_2 = 129;
+ public static final short TooManyOccurrences_2 = 130;
/**
* Tree depth exceeds the maximum.
*/
- public static final short TreeDepthExceedsMaximum = 130;
+ public static final short TreeDepthExceedsMaximum = 131;
/**
* Ordering between \u201c{0}\u201d and \u201c{1}\u201d elements is undefined.
*/
- public static final short UndefinedOrderingForElements_2 = 131;
+ public static final short UndefinedOrderingForElements_2 = 132;
/**
* Expected an array of length {0}, but got {1}.
*/
- public static final short UnexpectedArrayLength_2 = 132;
+ public static final short UnexpectedArrayLength_2 = 133;
/**
* Unexpected change in \u2018{0}\u2019.
*/
- public static final short UnexpectedChange_1 = 133;
+ public static final short UnexpectedChange_1 = 134;
/**
* The \u201c{1}\u201d characters after \u201c{0}\u201d were unexpected.
*/
- public static final short UnexpectedCharactersAfter_2 = 134;
+ public static final short UnexpectedCharactersAfter_2 = 135;
/**
* Text for \u2018{0}\u2019 was expected to {1,choice,0#begin|1#end} with \u201c{2}\u201d, but found \u201c{3}\u201d.
*/
- public static final short UnexpectedCharactersAtBound_4 = 135;
+ public static final short UnexpectedCharactersAtBound_4 = 136;
/**
* Unexpected end of file while reading \u201c{0}\u201d.
*/
- public static final short UnexpectedEndOfFile_1 = 136;
+ public static final short UnexpectedEndOfFile_1 = 137;
/**
* More characters were expected at the end of \u201c{0}\u201d.
*/
- public static final short UnexpectedEndOfString_1 = 137;
+ public static final short UnexpectedEndOfString_1 = 138;
/**
* File \u201c{1}\u201d seems to be encoded in an other format than {0}.
*/
- public static final short UnexpectedFileFormat_2 = 138;
+ public static final short UnexpectedFileFormat_2 = 139;
/**
* Parameter \u201c{0}\u201d was not expected.
*/
- public static final short UnexpectedParameter_1 = 139;
+ public static final short UnexpectedParameter_1 = 140;
/**
* Property \u201c{1}\u201d was not expected in \u201c{0}\u201d.
*/
- public static final short UnexpectedProperty_2 = 140;
+ public static final short UnexpectedProperty_2 = 141;
/**
* Unexpected scale factor {1} for unit of measurement \u201c{0}\u201d.
*/
- public static final short UnexpectedScaleFactorForUnit_2 = 141;
+ public static final short UnexpectedScaleFactorForUnit_2 = 142;
/**
* Expected \u201c{0}\u201d to reference an instance of \u2018{1}\u2019, but found an instance of \u2018{2}\u2019.
*/
- public static final short UnexpectedTypeForReference_3 = 142;
+ public static final short UnexpectedTypeForReference_3 = 143;
/**
* Unexpected value \u201c{1}\u201d in \u201c{0}\u201d element.
*/
- public static final short UnexpectedValueInElement_2 = 143;
+ public static final short UnexpectedValueInElement_2 = 144;
/**
* Command \u201c{0}\u201d is not recognized.
*/
- public static final short UnknownCommand_1 = 144;
+ public static final short UnknownCommand_1 = 145;
/**
* \u201c{1}\u201d is not a known or supported value for the \u2018{0}\u2019 enumeration.
*/
- public static final short UnknownEnumValue_2 = 145;
+ public static final short UnknownEnumValue_2 = 146;
/**
* Keyword \u201c{0}\u201d is unknown.
*/
- public static final short UnknownKeyword_1 = 146;
+ public static final short UnknownKeyword_1 = 147;
/**
* Option \u201c{0}\u201d is not recognized.
*/
- public static final short UnknownOption_1 = 147;
+ public static final short UnknownOption_1 = 148;
/**
* Type \u2018{0}\u2019 is unknown in this context.
*/
- public static final short UnknownType_1 = 148;
+ public static final short UnknownType_1 = 149;
/**
* Unit \u201c{0}\u201d is not recognized.
*/
- public static final short UnknownUnit_1 = 149;
+ public static final short UnknownUnit_1 = 150;
/**
* The cell at column \u201c{1}\u201d of row \u201c{0}\u201d is unmodifiable.
*/
- public static final short UnmodifiableCellValue_2 = 150;
+ public static final short UnmodifiableCellValue_2 = 151;
/**
* This metadata is not modifiable.
*/
- public static final short UnmodifiableMetadata = 151;
+ public static final short UnmodifiableMetadata = 152;
/**
* This instance of \u2018{0}\u2019 is not modifiable.
*/
- public static final short UnmodifiableObject_1 = 152;
+ public static final short UnmodifiableObject_1 = 153;
/**
* Text \u201c{1}\u201d can not be parsed as an object of type \u2018{0}\u2019.
*/
- public static final short UnparsableStringForClass_2 = 153;
+ public static final short UnparsableStringForClass_2 = 154;
/**
* Text \u201c{1}\u201d can not be parsed as an object of type \u2018{0}\u2019, because of the \u201c{2}\u201d characters.
*/
- public static final short UnparsableStringForClass_3 = 154;
+ public static final short UnparsableStringForClass_3 = 155;
/**
* Can not parse \u201c{1}\u201d in element \u201c{0}\u201d.
*/
- public static final short UnparsableStringInElement_2 = 155;
+ public static final short UnparsableStringInElement_2 = 156;
/**
* Coordinate reference system has not been specified.
*/
- public static final short UnspecifiedCRS = 156;
+ public static final short UnspecifiedCRS = 157;
/**
* No format is specified for objects of class \u2018{0}\u2019.
*/
- public static final short UnspecifiedFormatForClass_1 = 157;
+ public static final short UnspecifiedFormatForClass_1 = 158;
/**
* Version {1} of {0} format is not supported.
*/
- public static final short UnsupportedFormatVersion_2 = 158;
+ public static final short UnsupportedFormatVersion_2 = 159;
/**
* Can not handle this instance of \u2018{0}\u2019 because arbitrary implementations are not yet
* supported.
*/
- public static final short UnsupportedImplementation_1 = 159;
+ public static final short UnsupportedImplementation_1 = 160;
/**
* The \u201c{0}\u201d interpolation is unsupported.
*/
- public static final short UnsupportedInterpolation_1 = 160;
+ public static final short UnsupportedInterpolation_1 = 161;
/**
* The \u2018{0}\u2019 operation is unsupported.
*/
- public static final short UnsupportedOperation_1 = 161;
+ public static final short UnsupportedOperation_1 = 162;
/**
* The \u2018{0}\u2019 type is unsupported.
*/
- public static final short UnsupportedType_1 = 162;
+ public static final short UnsupportedType_1 = 163;
/**
* A value is already defined for \u201c{0}\u201d.
*/
- public static final short ValueAlreadyDefined_1 = 163;
+ public static final short ValueAlreadyDefined_1 = 164;
/**
* Value \u2018{0}\u2019 = {1} is invalid. Expected a number greater than 0.
*/
- public static final short ValueNotGreaterThanZero_2 = 164;
+ public static final short ValueNotGreaterThanZero_2 = 165;
/**
* Value \u2018{0}\u2019 = {3} is invalid. Expected a value in the [{1} \u2026 {2}] range.
*/
- public static final short ValueOutOfRange_4 = 165;
+ public static final short ValueOutOfRange_4 = 166;
}
/**
Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java?rev=1776696&r1=1776695&r2=1776696&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java [UTF-8] Sat Dec 31 07:26:29 2016
@@ -90,6 +90,14 @@ public class IndexedResourceBundle exten
private static final int MAX_STRING_LENGTH = 200;
/**
+ * First valid key index.
+ * We start at 1 rather than 0 in order to keep value 0 available for meaning "no localized message".
+ *
+ * @since 0.8
+ */
+ static final int FIRST = 1;
+
+ /**
* The path of the binary file containing resources, or {@code null} if there is no resources
* or if the resources have already been loaded. The resources may be a file or an entry in a
* JAR file.
@@ -97,12 +105,11 @@ public class IndexedResourceBundle exten
private URL resources;
/**
- * The array of resources. Keys are an array index. For example, the value for key "14" is
- * {@code values[14]}. This array will be loaded only when first needed. We should not load
- * it at construction time, because some {@code ResourceBundle} objects will never ask for
- * values. This is particularly the case for parent resources of {@code Resources_fr_CA},
- * {@code Resources_en}, {@code Resources_de}, etc., which will only be used if a key has
- * not been found in the child resources.
+ * The array of resources. Keys are an array index plus {@value #FIRST}. For example the value for key "14" is
+ * {@code values[13]}. This array will be loaded only when first needed. We should not load it at construction
+ * time, because some {@code ResourceBundle} objects will never ask for values. This is particularly the case
+ * for parent resources of {@code Resources_fr_CA}, {@code Resources_en}, {@code Resources_de}, etc. which will
+ * only be used if a key has not been found in the child resources.
*
* @see #ensureLoaded(String)
*/
@@ -235,7 +242,7 @@ public class IndexedResourceBundle exten
}
final String lineSeparator = System.lineSeparator();
final String[] values = ensureLoaded(null);
- for (int i=0; i<values.length; i++) {
+ for (int i=0; i < values.length; i++) {
final String key = keys [i];
final String value = values[i];
if (key != null && value != null) {
@@ -344,7 +351,7 @@ public class IndexedResourceBundle exten
protected final Object handleGetObject(final String key) {
// Synchronization performed by 'ensureLoaded'
final String[] values = ensureLoaded(key);
- short keyID;
+ int keyID;
try {
keyID = Short.parseShort(key);
} catch (NumberFormatException exception) {
@@ -360,6 +367,7 @@ public class IndexedResourceBundle exten
return null; // This is okay as of 'handleGetObject' contract.
}
}
+ keyID -= FIRST;
return (keyID >= 0 && keyID < values.length) ? values[keyID] : null;
}
Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/KeyConstants.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/KeyConstants.java?rev=1776696&r1=1776695&r2=1776696&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/KeyConstants.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/KeyConstants.java [UTF-8] Sat Dec 31 07:26:29 2016
@@ -42,8 +42,8 @@ public class KeyConstants {
private final Class<?> keysClass;
/**
- * The key names. This is usually not needed, but may be created from the {@code Keys}
- * inner class in some occasions.
+ * The key names in the exact same order than {@link IndexedResourceBundle#values}.
+ * This is usually not needed, but may be created from the {@code Keys} inner class in some occasions.
*
* @see #getKeyNames()
* @see #getKeyName(short)
@@ -80,7 +80,7 @@ public class KeyConstants {
names = new String[fields.length];
for (final Field field : fields) {
if (Modifier.isStatic(field.getModifiers()) && field.getType() == Short.TYPE) {
- final int index = Short.toUnsignedInt((Short) field.get(null));
+ final int index = Short.toUnsignedInt((Short) field.get(null)) - IndexedResourceBundle.FIRST;
if (index >= length) {
length = index + 1;
if (length > names.length) {
@@ -105,9 +105,9 @@ public class KeyConstants {
* our {@link IndexedResourceBundle#handleGetObject(String)} implementation.
*/
final String getKeyName(final short index) {
- final int i = Short.toUnsignedInt(index);
+ final int i = Short.toUnsignedInt(index) - IndexedResourceBundle.FIRST;
final String[] keys = getKeyNames();
- if (i < keys.length) {
+ if (i >= 0 && i < keys.length) {
final String key = keys[i];
if (key != null) {
return key;