Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultMemberName.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultMemberName.java?rev=1779559&r1=1779558&r2=1779559&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultMemberName.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultMemberName.java [UTF-8] Fri Jan 20 04:34:26 2017
@@ -16,6 +16,7 @@
*/
package org.apache.sis.util.iso;
+import java.util.Objects;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -25,9 +26,6 @@ import org.opengis.util.TypeName;
import static org.apache.sis.util.ArgumentChecks.ensureNonNull;
-// Branch-dependent imports
-import java.util.Objects;
-
/**
* The name to identify a member of a {@linkplain org.opengis.util.Record record}.
@@ -70,9 +68,9 @@ public class DefaultMemberName extends D
/**
* Constructs a member name from the given character sequence and attribute type.
*
- * @param scope The scope of this name, or {@code null} for a global scope.
- * @param name The local name (never {@code null}).
- * @param attributeType The type of the data associated with the record member (can not be {@code null}).
+ * @param scope the scope of this name, or {@code null} for a global scope.
+ * @param name the local name (never {@code null}).
+ * @param attributeType the type of the data associated with the record member (can not be {@code null}).
*/
protected DefaultMemberName(final NameSpace scope, final CharSequence name, final TypeName attributeType) {
super(scope, name);
@@ -92,8 +90,8 @@ public class DefaultMemberName extends D
* with the same values than the given name.</li>
* </ul>
*
- * @param object The object to get as a SIS implementation, or {@code null} if none.
- * @return A SIS implementation containing the values of the given object (may be the
+ * @param object the object to get as a SIS implementation, or {@code null} if none.
+ * @return a SIS implementation containing the values of the given object (may be the
* given object itself), or {@code null} if the argument was null.
*
* @since 0.5
@@ -108,7 +106,7 @@ public class DefaultMemberName extends D
/**
* Returns the type of the data associated with the record member.
*
- * @return The type of the data associated with the record member.
+ * @return the type of the data associated with the record member.
*/
@Override
public TypeName getAttributeType() {
@@ -118,7 +116,7 @@ public class DefaultMemberName extends D
/**
* Compares this member name with the specified object for equality.
*
- * @param object The object to compare with this name for equality.
+ * @param object the object to compare with this name for equality.
* @return {@code true} if the given object is equal to this name.
*/
@Override
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultRecord.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultRecord.java?rev=1779559&r1=1779558&r2=1779559&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultRecord.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultRecord.java [UTF-8] Fri Jan 20 04:34:26 2017
@@ -22,6 +22,7 @@ import java.util.AbstractMap;
import java.util.AbstractSet;
import java.util.Iterator;
import java.util.NoSuchElementException;
+import java.util.Objects;
import java.io.Serializable;
import java.lang.reflect.Array;
import org.opengis.util.MemberName;
@@ -33,9 +34,6 @@ import org.apache.sis.util.ArgumentCheck
import org.apache.sis.util.resources.Errors;
import org.apache.sis.internal.util.AbstractMapEntry;
-// Branch-dependent imports
-import java.util.Objects;
-
/**
* A list of logically related elements as (<var>name</var>, <var>value</var>) pairs in a dictionary.
@@ -84,7 +82,7 @@ public class DefaultRecord implements Re
* The initial values are unspecified - they may be null or zero.
* Callers can assign values by a call to {@link #setAll(Object[])}.
*
- * @param type The type definition of the new record.
+ * @param type the type definition of the new record.
*/
public DefaultRecord(final RecordType type) {
ArgumentChecks.ensureNonNull("type", type);
@@ -99,7 +97,7 @@ public class DefaultRecord implements Re
/**
* Returns the type definition of this record.
*
- * @return The type definition of this record.
+ * @return the type definition of this record.
*/
@Override
public RecordType getRecordType() {
@@ -111,7 +109,7 @@ public class DefaultRecord implements Re
* This method returns a view which will delegate all {@code get} and {@code put} operations to
* the {@link #locate(MemberName)} and {@link #set(MemberName, Object)} methods respectively.
*
- * @return The dictionary of all (<var>name</var>, <var>value</var>) pairs in this record.
+ * @return the dictionary of all (<var>name</var>, <var>value</var>) pairs in this record.
*
* @see RecordType#getMemberTypes()
*/
@@ -234,8 +232,8 @@ public class DefaultRecord implements Re
/**
* Returns the value for an attribute of the specified name.
*
- * @param name The name of the attribute to lookup.
- * @return The value of the attribute for the given name.
+ * @param name the name of the attribute to lookup.
+ * @return the value of the attribute for the given name.
*/
@Override
public Object locate(final MemberName name) {
@@ -246,8 +244,8 @@ public class DefaultRecord implements Re
/**
* Sets the value for the attribute of the specified name.
*
- * @param name The name of the attribute to modify.
- * @param value The new value for the attribute.
+ * @param name the name of the attribute to modify.
+ * @param value the new value for the attribute.
* @throws IllegalArgumentException if the given name is not a member of this record.
* @throws ClassCastException if the given value is not an instance of the expected type for this record.
*/
@@ -271,7 +269,7 @@ public class DefaultRecord implements Re
/**
* Sets all attribute values in this record, in attribute order.
*
- * @param newValues The attribute values.
+ * @param newValues the attribute values.
* @throws IllegalArgumentException if the given number of values does not match the expected number.
* @throws ClassCastException if a value is not an instance of the expected type for this record.
*/
@@ -298,13 +296,13 @@ public class DefaultRecord implements Re
/**
* Compares this record with the given object for equality.
*
- * @param object The object to compare with this record for equality.
+ * @param object the object to compare with this record for equality.
* @return {@code true} if both objects are equal.
*/
@Override
public boolean equals(final Object object) {
if (object == this) {
- return true; // Slight optimization for a common case.
+ return true; // Slight optimization for a common case.
}
if (object != null && object.getClass() == getClass()) {
final DefaultRecord that = (DefaultRecord) object;
@@ -317,7 +315,7 @@ public class DefaultRecord implements Re
/**
* Returns a hash code value for this record.
*
- * @return A hash code value for this record.
+ * @return a hash code value for this record.
*/
@Override
public int hashCode() {
@@ -328,7 +326,7 @@ public class DefaultRecord implements Re
* Returns a string representation of this record.
* The string representation is for debugging purpose and may change in any future SIS version.
*
- * @return A string representation of this record.
+ * @return a string representation of this record.
*/
@Debug
@Override
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultRecordSchema.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultRecordSchema.java?rev=1779559&r1=1779558&r2=1779559&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultRecordSchema.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultRecordSchema.java [UTF-8] Fri Jan 20 04:34:26 2017
@@ -124,9 +124,9 @@ public class DefaultRecordSchema impleme
* that interface will provide a {@code createMemberName(…)} method (tentatively in GeoAPI 3.1).
* </div>
*
- * @param nameFactory The factory to use for creating names, or {@code null} for the default factory.
- * @param parent The parent namespace, or {@code null} if none.
- * @param schemaName The name of the new schema.
+ * @param nameFactory the factory to use for creating names, or {@code null} for the default factory.
+ * @param parent the parent namespace, or {@code null} if none.
+ * @param schemaName the name of the new schema.
*/
public DefaultRecordSchema(DefaultNameFactory nameFactory, final NameSpace parent, final CharSequence schemaName) {
ArgumentChecks.ensureNonNull("schemaName", schemaName);
@@ -142,7 +142,7 @@ public class DefaultRecordSchema impleme
/**
* Returns the schema name.
*
- * @return The schema name.
+ * @return the schema name.
*/
@Override
public LocalName getSchemaName() {
@@ -153,10 +153,10 @@ public class DefaultRecordSchema impleme
* Creates a new record type of the given name, which will contains the given members.
* Members are declared in iteration order.
*
- * @param typeName The record type name.
- * @param members The name of each record member, together with the expected value types.
- * @return A record type of the given name and members.
- * @throws IllegalArgumentException If a record already exists for the given name but with different members.
+ * @param typeName the record type name.
+ * @param members the name of each record member, together with the expected value types.
+ * @return a record type of the given name and members.
+ * @throws IllegalArgumentException if a record already exists for the given name but with different members.
*/
public RecordType createRecordType(final CharSequence typeName, final Map<CharSequence,Class<?>> members)
throws IllegalArgumentException
@@ -182,15 +182,15 @@ public class DefaultRecordSchema impleme
boolean hasNext;
while ((hasNext = it1.hasNext()) == it2.hasNext()) {
if (!hasNext) {
- return record; // Finished comparison successfully.
+ return record; // Finished comparison successfully.
}
final Map.Entry<CharSequence,Class<?>> e1 = it1.next();
final Map.Entry<MemberName,Type> e2 = it2.next();
if (!e2.getKey().tip().toString().equals(e1.toString())) {
- break; // Member names differ.
+ break; // Member names differ.
}
if (!((SimpleAttributeType) e2.getValue()).getValueClass().equals(e1.getValue())) {
- break; // Value classes differ.
+ break; // Value classes differ.
}
}
throw new IllegalArgumentException(Errors.format(Errors.Keys.RecordAlreadyDefined_2, getSchemaName(), typeName));
@@ -201,8 +201,8 @@ public class DefaultRecordSchema impleme
* of OGC/ISO specification when possible, e.g. {@code "GCO:CharacterString"} for {@code java.lang.String}.
* See <cite>Mapping Java classes to type names</cite> in {@link DefaultTypeName} javadoc for more information.
*
- * @param valueClass The value class to represent as an attribute type.
- * @return Attribute type for the given value class.
+ * @param valueClass the value class to represent as an attribute type.
+ * @return attribute type for the given value class.
*/
final Type toAttributeType(final Class<?> valueClass) {
if (!TypeNames.isValid(valueClass)) {
@@ -226,7 +226,7 @@ public class DefaultRecordSchema impleme
/**
* Returns the dictionary of all (<var>name</var>, <var>record type</var>) pairs in this schema.
*
- * @return All (<var>name</var>, <var>record type</var>) pairs in this schema.
+ * @return all (<var>name</var>, <var>record type</var>) pairs in this schema.
*/
@Override
public Map<TypeName, RecordType> getDescription() {
@@ -237,8 +237,8 @@ public class DefaultRecordSchema impleme
* Returns the record type for the given name.
* If the type name is not defined within this schema, then this method returns {@code null}.
*
- * @param name The name of the type to lookup.
- * @return The type for the given name, or {@code null} if none.
+ * @param name the name of the type to lookup.
+ * @return the type for the given name, or {@code null} if none.
*/
@Override
public RecordType locate(final TypeName name) {
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultRecordType.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultRecordType.java?rev=1779559&r1=1779558&r2=1779559&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultRecordType.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultRecordType.java [UTF-8] Fri Jan 20 04:34:26 2017
@@ -20,6 +20,7 @@ import java.util.Set;
import java.util.Map;
import java.util.LinkedHashMap;
import java.util.Arrays;
+import java.util.Objects;
import java.io.Serializable;
import java.io.IOException;
import java.io.ObjectInputStream;
@@ -41,9 +42,6 @@ import org.apache.sis.util.collection.Co
import org.apache.sis.util.ObjectConverters;
import org.apache.sis.internal.converter.SurjectiveConverter;
-// Branch-dependent imports
-import java.util.Objects;
-
/**
* An immutable definition of the type of a {@linkplain DefaultRecord record}.
@@ -126,7 +124,7 @@ public class DefaultRecordType extends R
/**
* Creates a new record with the same names and members than the given one.
*
- * @param other The {@code RecordType} to copy.
+ * @param other the {@code RecordType} to copy.
*/
public DefaultRecordType(final RecordType other) {
typeName = other.getTypeName();
@@ -144,9 +142,9 @@ public class DefaultRecordType extends R
* implementation is sufficient, the {@link DefaultRecordSchema#createRecordType(CharSequence, Map)}
* method provides an easier alternative.</p>
*
- * @param typeName The name that identifies this record type.
- * @param container The schema that contains this record type.
- * @param members The name and type of the members to be included in this record type.
+ * @param typeName the name that identifies this record type.
+ * @param container the schema that contains this record type.
+ * @param members the name and type of the members to be included in this record type.
*
* @see DefaultRecordSchema#createRecordType(CharSequence, Map)
*/
@@ -186,10 +184,10 @@ public class DefaultRecordType extends R
* Creates a new record from member names specified as character sequence.
* This constructor builds the {@link MemberName} instance itself.
*
- * @param typeName The name that identifies this record type.
- * @param container The schema that contains this record type.
- * @param members The name of the members to be included in this record type.
- * @param nameFactory The factory to use for instantiating {@link MemberName}.
+ * @param typeName the name that identifies this record type.
+ * @param container the schema that contains this record type.
+ * @param members the name of the members to be included in this record type.
+ * @param nameFactory the factory to use for instantiating {@link MemberName}.
*/
DefaultRecordType(final TypeName typeName, final RecordSchema container,
final Map<? extends CharSequence, ? extends Type> members, final DefaultNameFactory nameFactory)
@@ -213,9 +211,9 @@ public class DefaultRecordType extends R
* Invoked on deserialization for restoring the transient fields.
* See {@link #writeObject(ObjectOutputStream)} for the stream data description.
*
- * @param in The input stream from which to deserialize an object.
- * @throws IOException If an I/O error occurred while reading or if the stream contains invalid data.
- * @throws ClassNotFoundException If the class serialized on the stream is not on the classpath.
+ * @param in the input stream from which to deserialize an object.
+ * @throws IOException if an I/O error occurred while reading or if the stream contains invalid data.
+ * @throws ClassNotFoundException if the class serialized on the stream is not on the classpath.
*/
private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException {
in.defaultReadObject();
@@ -234,11 +232,11 @@ public class DefaultRecordType extends R
/**
* Invoked on serialization for writing the member names and their type.
*
- * @serialData The number of members as an {@code int}, followed by a
+ * @serialData the number of members as an {@code int}, followed by a
* ({@code MemberName}, {@code Type}) pair for each member.
*
- * @param out The output stream where to serialize this object.
- * @throws IOException If an I/O error occurred while writing.
+ * @param out the output stream where to serialize this object.
+ * @throws IOException if an I/O error occurred while writing.
*/
private void writeObject(final ObjectOutputStream out) throws IOException {
final int size = size();
@@ -264,8 +262,8 @@ public class DefaultRecordType extends R
* in the given object are not recursively copied.</li>
* </ul>
*
- * @param other The object to get as a SIS implementation, or {@code null} if none.
- * @return A SIS implementation containing the members of the given object
+ * @param other the object to get as a SIS implementation, or {@code null} if none.
+ * @return a SIS implementation containing the members of the given object
* (may be the given object itself), or {@code null} if the argument was {@code null}.
*/
public static DefaultRecordType castOrCopy(final RecordType other) {
@@ -298,7 +296,7 @@ public class DefaultRecordType extends R
* then this method can be think as the equivalent of the Java {@link Class#getName()} method.
* </div>
*
- * @return The name that identifies this record type.
+ * @return the name that identifies this record type.
*/
@Override
public TypeName getTypeName() {
@@ -308,7 +306,7 @@ public class DefaultRecordType extends R
/**
* Returns the schema that contains this record type.
*
- * @return The schema that contains this record type.
+ * @return the schema that contains this record type.
*/
@Override
public RecordSchema getContainer() {
@@ -324,7 +322,7 @@ public class DefaultRecordType extends R
* this method can be though as the related to the Java {@link Class#getFields()} method.
* </div>
*
- * @return The dictionary of (<var>name</var>, <var>type</var>) pairs, or an empty map if none.
+ * @return the dictionary of (<var>name</var>, <var>type</var>) pairs, or an empty map if none.
*/
@Override
public Map<MemberName,Type> getMemberTypes() {
@@ -343,7 +341,7 @@ public class DefaultRecordType extends R
* getMemberTypes().keySet();
* }
*
- * @return The set of attribute names, or an empty set if none.
+ * @return the set of attribute names, or an empty set if none.
*/
@Override
public Set<MemberName> getMembers() {
@@ -370,8 +368,8 @@ public class DefaultRecordType extends R
* this method can be though as related to the Java {@link Class#getField(String)} method.
* </div>
*
- * @param memberName The attribute name for which to get the associated type name.
- * @return The associated type name, or {@code null} if none.
+ * @param memberName the attribute name for which to get the associated type name.
+ * @return the associated type name, or {@code null} if none.
*/
@Override
public TypeName locate(final MemberName memberName) {
@@ -392,7 +390,7 @@ public class DefaultRecordType extends R
* We do not require that {@code record.getRecordType() == this} in order to allow record
* "sub-types" to define additional fields, in a way similar to Java sub-classing.</div>
*
- * @param record The record to test for compatibility.
+ * @param record the record to test for compatibility.
* @return {@code true} if the given record is compatible with this {@code RecordType}.
*/
@Override
@@ -403,7 +401,7 @@ public class DefaultRecordType extends R
/**
* Compares the given object with this {@code RecordType} for equality.
*
- * @param other The object to compare with this {@code RecordType}.
+ * @param other the object to compare with this {@code RecordType}.
* @return {@code true} if both objects are equal.
*/
@Override
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultScopedName.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultScopedName.java?rev=1779559&r1=1779558&r2=1779559&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultScopedName.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultScopedName.java [UTF-8] Fri Jan 20 04:34:26 2017
@@ -83,7 +83,7 @@ public class DefaultScopedName extends A
* Creates a new scoped names from the given list of local names. This constructor is
* not public because we do not check if the given local names have the proper scope.
*
- * @param names The names to gives to the new scoped name.
+ * @param names the names to gives to the new scoped name.
*/
static AbstractName create(final UnmodifiableArrayList<? extends DefaultLocalName> names) {
ArgumentChecks.ensureNonNull("names", names);
@@ -98,7 +98,7 @@ public class DefaultScopedName extends A
* Creates a new scoped names from the given list of local names. This constructor is
* not public because it does not check if the given local names have the proper scope.
*
- * @param names The names to gives to the new scoped name.
+ * @param names the names to gives to the new scoped name.
*/
private DefaultScopedName(final UnmodifiableArrayList<? extends LocalName> names) {
parsedNames = names;
@@ -111,8 +111,8 @@ public class DefaultScopedName extends A
* method will be invoked for fetching an unlocalized name.
* Otherwise the {@link CharSequence#toString()} method will be used.
*
- * @param scope The scope of this name, or {@code null} for the global scope.
- * @param names The local names. This list must have at least two elements.
+ * @param scope the scope of this name, or {@code null} for the global scope.
+ * @param names the local names. This list must have at least two elements.
*/
protected DefaultScopedName(final NameSpace scope, final List<? extends CharSequence> names) {
ArgumentChecks.ensureNonNull("names", names);
@@ -158,8 +158,8 @@ public class DefaultScopedName extends A
* Constructs a scoped name as the concatenation of the given generic names.
* The scope of the new name will be the scope of the {@code path} argument.
*
- * @param path The first part to concatenate.
- * @param tail The second part to concatenate.
+ * @param path the first part to concatenate.
+ * @param tail the second part to concatenate.
*/
@SuppressWarnings("SuspiciousToArrayCall")
protected DefaultScopedName(final GenericName path, final GenericName tail) {
@@ -213,7 +213,7 @@ public class DefaultScopedName extends A
name = it.next();
}
}
- if (index != locals.length) { // Paranoiac check.
+ if (index != locals.length) { // Paranoiac check.
throw new ConcurrentModificationException(Errors.format(Errors.Keys.UnexpectedChange_1, "tail"));
}
// Following line is safe because 'parsedNames' type is <? extends LocalName>.
@@ -235,8 +235,8 @@ public class DefaultScopedName extends A
}
/**
- * Returns the size of the backing array. This is used only has a hint for optimizations
- * in attempts to share internal arrays.
+ * Returns the size of the backing array.
+ * This is used only has a hint for optimizations in attempts to share internal arrays.
*/
@Override
final int arraySize() {
@@ -255,7 +255,7 @@ public class DefaultScopedName extends A
* Returns every elements in the sequence of {@linkplain #getParsedNames() parsed names}
* except for the {@linkplain #head() head}.
*
- * @return All elements except the first one in the in the list of {@linkplain #getParsedNames() parsed names}.
+ * @return all elements except the first one in the in the list of {@linkplain #getParsedNames() parsed names}.
*/
@Override
public synchronized GenericName tail() {
@@ -275,7 +275,7 @@ public class DefaultScopedName extends A
* Returns every element in the sequence of {@linkplain #getParsedNames() parsed names}
* except for the {@linkplain #tip() tip}.
*
- * @return All elements except the last one in the in the list of {@linkplain #getParsedNames() parsed names}.
+ * @return all elements except the last one in the in the list of {@linkplain #getParsedNames() parsed names}.
*/
@Override
public synchronized GenericName path() {
@@ -295,6 +295,7 @@ public class DefaultScopedName extends A
* Returns the sequence of local name for this generic name.
*/
@Override
+ @SuppressWarnings("ReturnOfCollectionOrArrayField") // Safe because unmodifiable.
public List<? extends LocalName> getParsedNames() {
return parsedNames;
}
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/RecordDefinition.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/RecordDefinition.java?rev=1779559&r1=1779558&r2=1779559&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/RecordDefinition.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/RecordDefinition.java [UTF-8] Fri Jan 20 04:34:26 2017
@@ -53,7 +53,7 @@ import org.apache.sis.internal.simple.Si
* @module
*/
@XmlTransient
-abstract class RecordDefinition { // Intentionally not Serializable.
+abstract class RecordDefinition { // Intentionally not Serializable.
/**
* {@code RecordDefinition} implementation used as a fallback when the user-supplied {@link RecordType}
* is not an instance of {@link DefaultRecordType}. So this adapter is used only if Apache SIS is mixed
@@ -71,7 +71,7 @@ abstract class RecordDefinition { // Int
/**
* The wrapped record type.
*/
- private final RecordType recordType; // This is the only serialized field in this file.
+ private final RecordType recordType; // This is the only serialized field in this file.
/**
* Creates a new adapter for the given record type.
@@ -84,9 +84,9 @@ abstract class RecordDefinition { // Int
/**
* Invoked on deserialization for restoring the transient fields.
*
- * @param in The input stream from which to deserialize an attribute.
- * @throws IOException If an I/O error occurred while reading or if the stream contains invalid data.
- * @throws ClassNotFoundException If the class serialized on the stream is not on the classpath.
+ * @param in the input stream from which to deserialize an attribute.
+ * @throws IOException if an I/O error occurred while reading or if the stream contains invalid data.
+ * @throws ClassNotFoundException if the class serialized on the stream is not on the classpath.
*/
private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException {
in.defaultReadObject();
@@ -141,8 +141,8 @@ abstract class RecordDefinition { // Int
/**
* Invoked on construction or deserialization for computing the transient fields.
*
- * @param memberTypes The (<var>name</var>, <var>type</var>) pairs in this record type.
- * @return The values in the given map. This information is not stored in {@code RecordDefinition}
+ * @param memberTypes the (<var>name</var>, <var>type</var>) pairs in this record type.
+ * @return the values in the given map. This information is not stored in {@code RecordDefinition}
* because not needed by this class, but the {@link DefaultRecordType} subclass will store it.
*/
final Type[] computeTransientFields(final Map<? extends MemberName, ? extends Type> memberTypes) {
@@ -222,7 +222,7 @@ abstract class RecordDefinition { // Int
* Returns a string representation of this object.
* The string representation is for debugging purpose and may change in any future SIS version.
*
- * @return A string representation of this record type.
+ * @return a string representation of this record type.
*/
@Debug
@Override
@@ -233,9 +233,9 @@ abstract class RecordDefinition { // Int
/**
* Returns a string representation of a {@code Record} or {@code RecordType}.
*
- * @param head Either {@code "Record"} or {@code "RecordType"}.
- * @param values The values as an array, or {@code null} for writing the types instead.
- * @return The string representation.
+ * @param head either {@code "Record"} or {@code "RecordType"}.
+ * @param values the values as an array, or {@code null} for writing the types instead.
+ * @return the string representation.
*/
final String toString(final String head, final Object values) {
final StringBuilder buffer = new StringBuilder(250);
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/ResourceInternationalString.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/ResourceInternationalString.java?rev=1779559&r1=1779558&r2=1779559&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/ResourceInternationalString.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/ResourceInternationalString.java [UTF-8] Fri Jan 20 04:34:26 2017
@@ -107,8 +107,8 @@ public class ResourceInternationalString
* The class loader will be the one of the {@link #toString(Locale)} caller,
* unless the {@link #getBundle(Locale)} method is overridden.
*
- * @param resources The name of the resource bundle, as a fully qualified class name.
- * @param key The key for the resource to fetch.
+ * @param resources the name of the resource bundle, as a fully qualified class name.
+ * @param key the key for the resource to fetch.
*/
public ResourceInternationalString(final String resources, final String key) {
ArgumentChecks.ensureNonNull("resources", resources);
@@ -136,7 +136,7 @@ public class ResourceInternationalString
* }
*
* @param locale The locale for which to get the resource bundle.
- * @return The resource bundle for the given locale.
+ * @return the resource bundle for the given locale.
*
* @see ResourceBundle#getBundle(String, Locale, ClassLoader)
*/
@@ -154,14 +154,14 @@ public class ResourceInternationalString
* {@code Locale.ROOT}. However subclasses are free to use a different fallback. Client
* code are encouraged to specify only non-null values for more determinist behavior.
*
- * @param locale The desired locale for the string to be returned.
- * @return The string in the specified locale, or in a fallback locale.
- * @throws MissingResourceException is the key given to the constructor is invalid.
+ * @param locale the desired locale for the string to be returned.
+ * @return the string in the specified locale, or in a fallback locale.
+ * @throws MissingResourceException if the key given to the constructor is invalid.
*/
@Override
public String toString(Locale locale) throws MissingResourceException {
if (locale == null) {
- locale = Locale.ROOT; // For consistency with DefaultInternationalString.
+ locale = Locale.ROOT; // For consistency with DefaultInternationalString.
}
return getBundle(locale).getString(key);
}
@@ -169,7 +169,7 @@ public class ResourceInternationalString
/**
* Compares this international string with the specified object for equality.
*
- * @param object The object to compare with this international string.
+ * @param object the object to compare with this international string.
* @return {@code true} if the given object is equal to this string.
*/
@Override
@@ -184,7 +184,7 @@ public class ResourceInternationalString
/**
* Returns a hash code value for this international text.
*
- * @return A hash code value for this international text.
+ * @return a hash code value for this international text.
*/
@Override
public int hashCode() {
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/TypeNames.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/TypeNames.java?rev=1779559&r1=1779558&r2=1779559&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/TypeNames.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/TypeNames.java [UTF-8] Fri Jan 20 04:34:26 2017
@@ -115,7 +115,7 @@ final class TypeNames {
name = entry.getKey();
return factory.createTypeName(ns, name);
}
- } while (base != Boolean.class); // See MAPPING javadoc for the role of Boolean as a sentinel value.
+ } while (base != Boolean.class); // See MAPPING javadoc for the role of Boolean as a sentinel value.
/*
* Found no special case. Checks for the UML annotation, to be also formatted in the "OGC:" namespace.
* If no UML identifier is found, then we will format the Java class in the "class:" namespace. We use
@@ -124,7 +124,7 @@ final class TypeNames {
name = Types.getStandardName(valueClass);
if (name == null) {
ns = classNS;
- name = valueClass.getName(); // See above comment.
+ name = valueClass.getName(); // See above comment.
}
}
/*
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/LoggerAdapter.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/LoggerAdapter.java?rev=1779559&r1=1779558&r2=1779559&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/LoggerAdapter.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/LoggerAdapter.java [UTF-8] Fri Jan 20 04:34:26 2017
@@ -101,7 +101,7 @@ public abstract class LoggerAdapter exte
/**
* Creates a new logger.
*
- * @param name The logger name.
+ * @param name the logger name.
*/
protected LoggerAdapter(final String name) {
super(name, null);
@@ -122,7 +122,7 @@ public abstract class LoggerAdapter exte
* Sets the level for this logger. Subclasses must redirect the call to the external
* logging framework, or do nothing if the level can not be changed programmatically.
*
- * @param level The new value for the log level (may be null).
+ * @param level the new value for the log level (may be null).
*/
@Override
public abstract void setLevel(Level level);
@@ -131,7 +131,7 @@ public abstract class LoggerAdapter exte
* Returns the level for this logger. Subclasses shall get this level from the
* external logging framework.
*
- * @return The logger's level.
+ * @return the logger's level.
*/
@Override
public abstract Level getLevel();
@@ -143,7 +143,7 @@ public abstract class LoggerAdapter exte
* value used in the JDK logging framework. Subclasses should override this method if
* a different debug level is wanted.
*
- * @return The level to use for debugging informations.
+ * @return the level to use for debugging informations.
*/
@Debug
protected Level getDebugLevel() {
@@ -191,7 +191,7 @@ public abstract class LoggerAdapter exte
* }
* }
*
- * @param level A message logging level.
+ * @param level a message logging level.
* @return {@code true} if the given message level is currently being logged.
*/
@Override
@@ -200,7 +200,7 @@ public abstract class LoggerAdapter exte
/**
* Logs a {@link Level#SEVERE SEVERE} message.
*
- * @param message The message to log.
+ * @param message the message to log.
*/
@Override
public abstract void severe(String message);
@@ -208,7 +208,7 @@ public abstract class LoggerAdapter exte
/**
* Logs a {@link Level#WARNING WARNING} message.
*
- * @param message The message to log.
+ * @param message the message to log.
*/
@Override
public abstract void warning(String message);
@@ -216,7 +216,7 @@ public abstract class LoggerAdapter exte
/**
* Logs an {@link Level#INFO INFO} message.
*
- * @param message The message to log.
+ * @param message the message to log.
*/
@Override
public abstract void info(String message);
@@ -224,7 +224,7 @@ public abstract class LoggerAdapter exte
/**
* Logs an {@link Level#CONFIG CONFIG} message.
*
- * @param message The message to log.
+ * @param message the message to log.
*/
@Override
public abstract void config(String message);
@@ -232,7 +232,7 @@ public abstract class LoggerAdapter exte
/**
* Logs a {@link Level#FINE FINE} message.
*
- * @param message The message to log.
+ * @param message the message to log.
*/
@Override
public abstract void fine(String message);
@@ -240,7 +240,7 @@ public abstract class LoggerAdapter exte
/**
* Logs a {@link Level#FINER FINER} message.
*
- * @param message The message to log.
+ * @param message the message to log.
*/
@Override
public abstract void finer(String message);
@@ -248,7 +248,7 @@ public abstract class LoggerAdapter exte
/**
* Logs a {@link Level#FINEST FINEST} message.
*
- * @param message The message to log.
+ * @param message the message to log.
*/
@Override
public abstract void finest(String message);
@@ -258,8 +258,8 @@ public abstract class LoggerAdapter exte
* default {@link Logger}, this implementation bypass the level check in order to let
* the backing logging framework do its own check.
*
- * @param sourceClass Name of class that issued the logging request.
- * @param sourceMethod Name of method that is being entered.
+ * @param sourceClass name of class that issued the logging request.
+ * @param sourceMethod name of method that is being entered.
*/
@Override
public void entering(final String sourceClass, final String sourceMethod) {
@@ -271,9 +271,9 @@ public abstract class LoggerAdapter exte
* Compared to the default {@link Logger}, this implementation bypass the level check in
* order to let the backing logging framework do its own check.
*
- * @param sourceClass Name of class that issued the logging request.
- * @param sourceMethod Name of method that is being entered.
- * @param param Parameter to the method being entered.
+ * @param sourceClass name of class that issued the logging request.
+ * @param sourceMethod name of method that is being entered.
+ * @param param parameter to the method being entered.
*/
@Override
public void entering(String sourceClass, String sourceMethod, Object param) {
@@ -285,9 +285,9 @@ public abstract class LoggerAdapter exte
* Compared to the default {@link Logger}, this implementation bypass the level check in
* order to let the backing logging framework do its own check.
*
- * @param sourceClass Name of class that issued the logging request.
- * @param sourceMethod Name of method that is being entered.
- * @param params Array of parameters to the method being entered.
+ * @param sourceClass name of class that issued the logging request.
+ * @param sourceMethod name of method that is being entered.
+ * @param params array of parameters to the method being entered.
*/
@Override
public void entering(final String sourceClass, final String sourceMethod, final Object[] params) {
@@ -315,8 +315,8 @@ public abstract class LoggerAdapter exte
* default {@link Logger}, this implementation bypass the level check in order to let
* the backing logging framework do its own check.
*
- * @param sourceClass Name of class that issued the logging request.
- * @param sourceMethod Name of the method.
+ * @param sourceClass name of class that issued the logging request.
+ * @param sourceMethod name of the method.
*/
@Override
public void exiting(final String sourceClass, final String sourceMethod) {
@@ -328,9 +328,9 @@ public abstract class LoggerAdapter exte
* default {@link Logger}, this implementation bypass the level check in order to let
* the backing logging framework do its own check.
*
- * @param sourceClass Name of class that issued the logging request.
- * @param sourceMethod Name of the method.
- * @param result Object that is being returned.
+ * @param sourceClass name of class that issued the logging request.
+ * @param sourceMethod name of the method.
+ * @param result object that is being returned.
*/
@Override
public void exiting(String sourceClass, String sourceMethod, Object result) {
@@ -342,9 +342,9 @@ public abstract class LoggerAdapter exte
* default {@link Logger}, this implementation bypass the level check in order to let
* the backing logging framework do its own check.
*
- * @param sourceClass Name of class that issued the logging request.
- * @param sourceMethod Name of the method.
- * @param thrown The Throwable that is being thrown.
+ * @param sourceClass name of class that issued the logging request.
+ * @param sourceMethod name of the method.
+ * @param thrown the Throwable that is being thrown.
*/
@Override
public void throwing(String sourceClass, String sourceMethod, Throwable thrown) {
@@ -356,7 +356,7 @@ public abstract class LoggerAdapter exte
* {@link #logrb(Level,String,String,ResourceBundle,String,Object[]) logrb} or
* {@link #logp(Level,String,String,String)} methods.
*
- * @param record The log record to be published.
+ * @param record the log record to be published.
*/
@Override
public void log(final LogRecord record) {
@@ -408,8 +408,8 @@ public abstract class LoggerAdapter exte
* {@link #config(String) config}, {@link #fine(String) fine}, {@link #finer(String) finer} or
* {@link #finest(String) finest} methods according the supplied level.
*
- * @param level One of the message level identifiers.
- * @param message The message to log.
+ * @param level one of the message level identifiers.
+ * @param message the message to log.
*/
@Override
@SuppressWarnings("fallthrough")
@@ -418,8 +418,10 @@ public abstract class LoggerAdapter exte
switch (n / 100) {
default: {
if (n < 0 || n == Integer.MAX_VALUE) break;
- // MAX_VALUE is a special value for Level.OFF. Otherwise and
- // if positive, fallthrough since we are greater than SEVERE.
+ /*
+ * MAX_VALUE is a special value for Level.OFF. Otherwise and
+ * if positive, fallthrough since we are greater than SEVERE.
+ */
}
case 10: severe (message); break;
case 9: warning(message); break;
@@ -439,9 +441,9 @@ public abstract class LoggerAdapter exte
* Logs a record at the specified level. The default implementation discards the exception
* and delegates to <code>{@linkplain #log(Level,String) log}(level, message)</code>.
*
- * @param level One of the message level identifiers.
- * @param message The message to log.
- * @param thrown Throwable associated with log message.
+ * @param level one of the message level identifiers.
+ * @param message the message to log.
+ * @param thrown throwable associated with log message.
*/
@Override
public void log(final Level level, final String message, final Throwable thrown) {
@@ -453,9 +455,9 @@ public abstract class LoggerAdapter exte
* <code>{@linkplain #log(Level,String,Object[]) log}(level, message, params)</code>
* where the {@code params} array is built from the {@code param} object.
*
- * @param level One of the message level identifiers.
- * @param message The message to log.
- * @param param Parameter to the method being entered.
+ * @param level one of the message level identifiers.
+ * @param message the message to log.
+ * @param param parameter to the method being entered.
*/
@Override
public void log(final Level level, final String message, final Object param) {
@@ -467,9 +469,9 @@ public abstract class LoggerAdapter exte
* The default implementation formats the message immediately, then delegates to
* <code>{@linkplain #log(Level,String) log}(level, message)</code>.
*
- * @param level One of the message level identifiers.
- * @param message The message to log.
- * @param params Array of parameters to the method being entered.
+ * @param level one of the message level identifiers.
+ * @param message the message to log.
+ * @param params array of parameters to the method being entered.
*/
@Override
public void log(final Level level, final String message, final Object[] params) {
@@ -481,10 +483,10 @@ public abstract class LoggerAdapter exte
* the source class and source method, then delegates to
* <code>{@linkplain #log(Level,String) log}(level, message)</code>.
*
- * @param level One of the message level identifiers.
- * @param sourceClass Name of class that issued the logging request.
- * @param sourceMethod Name of the method.
- * @param message The message to log.
+ * @param level one of the message level identifiers.
+ * @param sourceClass name of class that issued the logging request.
+ * @param sourceMethod name of the method.
+ * @param message the message to log.
*/
@Override
public void logp(final Level level, final String sourceClass, final String sourceMethod,
@@ -498,11 +500,11 @@ public abstract class LoggerAdapter exte
* the source class and source method, then delegates to
* <code>{@linkplain #log(Level,String,Throwable) log}(level, message, thrown)</code>.
*
- * @param level One of the message level identifiers.
- * @param sourceClass Name of class that issued the logging request.
- * @param sourceMethod Name of the method.
- * @param message The message to log.
- * @param thrown Throwable associated with log message.
+ * @param level one of the message level identifiers.
+ * @param sourceClass name of class that issued the logging request.
+ * @param sourceMethod name of the method.
+ * @param message the message to log.
+ * @param thrown throwable associated with log message.
*/
@Override
public void logp(final Level level, final String sourceClass, final String sourceMethod,
@@ -520,11 +522,11 @@ public abstract class LoggerAdapter exte
* <p>Note that {@code sourceClass} and {@code sourceMethod} will be discarded unless the
* target {@link #logp(Level,String,String,String) logp} method has been overridden.</p>
*
- * @param level One of the message level identifiers.
- * @param sourceClass Name of class that issued the logging request.
- * @param sourceMethod Name of the method.
- * @param message The message to log.
- * @param param Parameter to the method being entered.
+ * @param level one of the message level identifiers.
+ * @param sourceClass name of class that issued the logging request.
+ * @param sourceMethod name of the method.
+ * @param message the message to log.
+ * @param param parameter to the method being entered.
*/
@Override
public void logp(final Level level, final String sourceClass, final String sourceMethod,
@@ -541,11 +543,11 @@ public abstract class LoggerAdapter exte
* <p>Note that {@code sourceClass} and {@code sourceMethod} will be discarded unless the
* target {@link #logp(Level,String,String,String) logp} method has been overridden.</p>
*
- * @param level One of the message level identifiers.
- * @param sourceClass Name of class that issued the logging request.
- * @param sourceMethod Name of the method.
- * @param message The message to log.
- * @param params Array of parameters to the method being entered.
+ * @param level one of the message level identifiers.
+ * @param sourceClass name of class that issued the logging request.
+ * @param sourceMethod name of the method.
+ * @param message the message to log.
+ * @param params array of parameters to the method being entered.
*/
@Override
public void logp(final Level level, final String sourceClass, final String sourceMethod,
@@ -559,12 +561,12 @@ public abstract class LoggerAdapter exte
* message immediately, then delegates to <code>{@linkplain #logp(Level,String,String,String,
* Object[]) logp}(level, sourceClass, sourceMethod, message, params)</code>.
*
- * @param level One of the message level identifiers.
- * @param sourceClass Name of class that issued the logging request.
- * @param sourceMethod Name of the method.
- * @param bundle The resource bundle for localizing the message, or {@code null}.
- * @param message The message to log.
- * @param params Array of parameters to the method being entered.
+ * @param level one of the message level identifiers.
+ * @param sourceClass name of class that issued the logging request.
+ * @param sourceMethod name of the method.
+ * @param bundle the resource bundle for localizing the message, or {@code null}.
+ * @param message the message to log.
+ * @param params array of parameters to the method being entered.
*
* @since 0.5
*/
@@ -579,12 +581,12 @@ public abstract class LoggerAdapter exte
* message immediately, then delegates to <code>{@linkplain #logp(Level,String,String,String,
* Throwable) logp}(level, sourceClass, sourceMethod, message, thrown)</code>.
*
- * @param level One of the message level identifiers.
- * @param sourceClass Name of class that issued the logging request.
- * @param sourceMethod Name of the method.
- * @param bundle The resource bundle for localizing the message, or {@code null}.
- * @param message The message to log.
- * @param thrown Throwable associated with log message.
+ * @param level one of the message level identifiers.
+ * @param sourceClass name of class that issued the logging request.
+ * @param sourceMethod name of the method.
+ * @param bundle the resource bundle for localizing the message, or {@code null}.
+ * @param message the message to log.
+ * @param thrown throwable associated with log message.
*
* @since 0.5
*/
@@ -599,11 +601,11 @@ public abstract class LoggerAdapter exte
* message immediately, then delegates to <code>{@linkplain #logp(Level,String,String,String)
* logp}(level, sourceClass, sourceMethod, message)</code>.
*
- * @param level One of the message level identifiers.
- * @param sourceClass Name of class that issued the logging request.
- * @param sourceMethod Name of the method.
- * @param bundleName Name of resource bundle to localize message, or {@code null}.
- * @param message The message to log.
+ * @param level one of the message level identifiers.
+ * @param sourceClass name of class that issued the logging request.
+ * @param sourceMethod name of the method.
+ * @param bundleName name of resource bundle to localize message, or {@code null}.
+ * @param message the message to log.
*
* @deprecated JDK 8 has deprecated this method.
*/
@@ -620,12 +622,12 @@ public abstract class LoggerAdapter exte
* message immediately, then delegates to <code>{@linkplain #logp(Level,String,String,String,
* Throwable) logp}(level, sourceClass, sourceMethod, message, thrown)</code>.
*
- * @param level One of the message level identifiers.
- * @param sourceClass Name of class that issued the logging request.
- * @param sourceMethod Name of the method.
- * @param bundleName Name of resource bundle to localize message, or {@code null}.
- * @param message The message to log.
- * @param thrown Throwable associated with log message.
+ * @param level one of the message level identifiers.
+ * @param sourceClass name of class that issued the logging request.
+ * @param sourceMethod name of the method.
+ * @param bundleName name of resource bundle to localize message, or {@code null}.
+ * @param message the message to log.
+ * @param thrown throwable associated with log message.
*
* @deprecated JDK 8 has deprecated this method.
*/
@@ -642,12 +644,12 @@ public abstract class LoggerAdapter exte
* message immediately, then delegates to <code>{@linkplain #logp(Level,String,String,String,
* Object) logp}(level, sourceClass, sourceMethod, message, param)</code>.
*
- * @param level One of the message level identifiers.
- * @param sourceClass Name of class that issued the logging request.
- * @param sourceMethod Name of the method.
- * @param bundleName Name of resource bundle to localize message, or {@code null}.
- * @param message The message to log.
- * @param param Parameter to the method being entered.
+ * @param level one of the message level identifiers.
+ * @param sourceClass name of class that issued the logging request.
+ * @param sourceMethod name of the method.
+ * @param bundleName name of resource bundle to localize message, or {@code null}.
+ * @param message the message to log.
+ * @param param parameter to the method being entered.
*
* @deprecated JDK 8 has deprecated this method.
*/
@@ -664,12 +666,12 @@ public abstract class LoggerAdapter exte
* message immediately, then delegates to <code>{@linkplain #logp(Level,String,String,String,
* Object[]) logp}(level, sourceClass, sourceMethod, message, params)</code>.
*
- * @param level One of the message level identifiers.
- * @param sourceClass Name of class that issued the logging request.
- * @param sourceMethod Name of the method.
- * @param bundleName Name of resource bundle to localize message, or {@code null}.
- * @param message The message to log.
- * @param params Array of parameters to the method being entered.
+ * @param level one of the message level identifiers.
+ * @param sourceClass name of class that issued the logging request.
+ * @param sourceMethod name of the method.
+ * @param bundleName name of resource bundle to localize message, or {@code null}.
+ * @param message the message to log.
+ * @param params array of parameters to the method being entered.
*
* @deprecated JDK 8 has deprecated this method.
*/
@@ -687,7 +689,7 @@ public abstract class LoggerAdapter exte
* (e.g. <a href="http://commons.apache.org/logging/">Commons-logging</a>) instead,
* which is not expected to use {@link Handler} objects.
*
- * @param handler A logging handler, ignored in default implementation.
+ * @param handler a logging handler, ignored in default implementation.
*/
@Override
public void addHandler(Handler handler) {
@@ -696,7 +698,7 @@ public abstract class LoggerAdapter exte
/**
* Do nothing since this logger adapter does not support handlers.
*
- * @param handler A logging handler, ignored in default implementation.
+ * @param handler a logging handler, ignored in default implementation.
*/
@Override
public void removeHandler(Handler handler) {
@@ -707,7 +709,7 @@ public abstract class LoggerAdapter exte
* with {@link #addHandler} not allowing to add any handlers, and avoid mixing
* loggings from the external framework with JDK loggings.
*
- * @param useParentHandlers Ignored in default implementation.
+ * @param useParentHandlers ignored in default implementation.
*/
@Override
public void setUseParentHandlers(boolean useParentHandlers) {
@@ -718,7 +720,7 @@ public abstract class LoggerAdapter exte
* More specifically, it should not inherits any configuration from a parent
* logger using the JDK logging framework.
*
- * @param parent Ignored in default implementation.
+ * @param parent ignored in default implementation.
*/
@Override
public void setParent(Logger parent) {
@@ -731,7 +733,7 @@ public abstract class LoggerAdapter exte
* is cascaded into many other {@code log} calls, and this test must works in multi-threads
* environment).
*
- * @param filter Ignored in default implementation.
+ * @param filter ignored in default implementation.
*/
@Override
public void setFilter(Filter filter) {
@@ -739,7 +741,7 @@ public abstract class LoggerAdapter exte
/**
* Wraps the specified object in an array. This is a helper method for
- * {@code log(..., Object)} methods that delegate their work to {@code log(..., Object[])}
+ * {@code log(…, Object)} methods that delegate their work to {@code log(…, Object[])}
*/
private static Object[] asArray(final Object param) {
return (param != null) ? new Object[] {param} : null;
@@ -747,15 +749,17 @@ public abstract class LoggerAdapter exte
/**
* Formats the specified message. This is a helper method for
- * {@code log(..., Object[])} methods that delegate their work to {@code log(...)}
+ * {@code log(…, Object[])} methods that delegate their work to {@code log(…)}
*/
private static String format(String message, final Object[] params) {
if (params != null && params.length != 0) {
if (MESSAGE_FORMAT.matcher(message).find()) try {
message = MessageFormat.format(message, params);
} catch (IllegalArgumentException e) {
- // The default Formatter.messageFormat implementation ignores this exception
- // and uses the pattern as the message, so we mimic its behavior here.
+ /*
+ * The default Formatter.messageFormat implementation ignores this exception
+ * and uses the pattern as the message, so we mimic its behavior here.
+ */
}
}
return message;
@@ -763,28 +767,32 @@ public abstract class LoggerAdapter exte
/**
* Localizes the specified message. This is a helper method for
- * {@code logrb(...)} methods that delegate their work to {@code logp(...)}
+ * {@code logrb(…)} methods that delegate their work to {@code logp(…)}
*/
private static String localize(final String bundleName, String message) {
if (bundleName != null) try {
message = ResourceBundle.getBundle(bundleName).getString(message);
} catch (MissingResourceException e) {
- // The default Formatter.messageFormat implementation ignores this exception
- // and uses the bundle key as the message, so we mimic its behavior here.
+ /*
+ * The default Formatter.messageFormat implementation ignores this exception
+ * and uses the bundle key as the message, so we mimic its behavior here.
+ */
}
return message;
}
/**
* Localizes the specified message. This is a helper method for
- * {@code logrb(...)} methods that delegate their work to {@code logp(...)}
+ * {@code logrb(…)} methods that delegate their work to {@code logp(…)}
*/
private static String localize(final ResourceBundle bundle, String message) {
if (bundle != null) try {
message = bundle.getString(message);
} catch (MissingResourceException e) {
- // The default Formatter.messageFormat implementation ignores this exception
- // and uses the bundle key as the message, so we mimic its behavior here.
+ /*
+ * The default Formatter.messageFormat implementation ignores this exception
+ * and uses the bundle key as the message, so we mimic its behavior here.
+ */
}
return message;
}
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/LoggerFactory.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/LoggerFactory.java?rev=1779559&r1=1779558&r2=1779559&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/LoggerFactory.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/LoggerFactory.java [UTF-8] Fri Jan 20 04:34:26 2017
@@ -41,8 +41,8 @@ import org.apache.sis.util.collection.We
* This base class is safe for multi-threads usage. Subclasses registered in {@code META-INF/services/}
* shall make sure that any overridden methods remain safe to call from multiple threads.
*
- * @param <L> The type of loggers used for the implementation backend.
- * This is the type used by external frameworks like Log4J.
+ * @param <L> the type of loggers used for the implementation backend.
+ * This is the type used by external frameworks like Log4J.
*
* @author Martin Desruisseaux (IRD, Geomatys)
* @since 0.3
@@ -78,7 +78,7 @@ public abstract class LoggerFactory<L> {
/**
* Returns the name of the logging framework.
*
- * @return The logging framework name.
+ * @return the logging framework name.
*/
public abstract String getName();
@@ -86,8 +86,8 @@ public abstract class LoggerFactory<L> {
* Returns the logger of the specified name, or {@code null} if the JDK logging framework
* should be used.
*
- * @param name The name of the logger.
- * @return The logger, or {@code null} if the JDK logging framework should be used.
+ * @param name the name of the logger.
+ * @return the logger, or {@code null} if the JDK logging framework should be used.
*/
public Logger getLogger(final String name) {
final L target = getImplementation(name);
@@ -108,7 +108,7 @@ public abstract class LoggerFactory<L> {
* Returns the base class of objects to be returned by {@link #getImplementation(String)}.
* The class depends on the underlying logging framework (Log4J, SLF4J, <i>etc.</i>).
*
- * @return The type of loggers used for the implementation backend.
+ * @return the type of loggers used for the implementation backend.
*/
public Class<L> getImplementationClass() {
return loggerClass;
@@ -120,8 +120,8 @@ public abstract class LoggerFactory<L> {
* framework redirects logging events to JDK logging, then this method shall return
* {@code null} since we should not use wrapper at all.
*
- * @param name The name of the logger.
- * @return The logger as an object of the target logging framework (Log4J, SLF4J,
+ * @param name the name of the logger.
+ * @return the logger as an object of the target logging framework (Log4J, SLF4J,
* <i>etc.</i>), or {@code null} if the target framework would redirect
* to the JDK logging framework.
*/
@@ -130,9 +130,9 @@ public abstract class LoggerFactory<L> {
/**
* Wraps the specified {@linkplain #getImplementation(String) implementation} in a JDK logger.
*
- * @param name The name of the logger.
- * @param implementation An implementation returned by {@link #getImplementation(String)}.
- * @return A new logger wrapping the specified implementation.
+ * @param name the name of the logger.
+ * @param implementation an implementation returned by {@link #getImplementation(String)}.
+ * @return a new logger wrapping the specified implementation.
*/
protected abstract Logger wrap(String name, L implementation);
@@ -141,8 +141,8 @@ public abstract class LoggerFactory<L> {
* logger, or {@code null} if none. If the specified logger is not an instance of the expected
* class, then this method should returns {@code null}.
*
- * @param logger The logger to test.
- * @return The implementation wrapped by the specified logger, or {@code null} if none.
+ * @param logger the logger to test.
+ * @return the implementation wrapped by the specified logger, or {@code null} if none.
*/
protected abstract L unwrap(Logger logger);
}
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java?rev=1779559&r1=1779558&r2=1779559&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java [UTF-8] Fri Jan 20 04:34:26 2017
@@ -134,7 +134,7 @@ public final class Logging extends Stati
/**
* Returns the factory used for obtaining {@link Logger} instances, or {@code null} if none.
*
- * @return The current logger factory, or {@code null} if none.
+ * @return the current logger factory, or {@code null} if none.
*/
public static LoggerFactory<?> getLoggerFactory() {
return factory;
@@ -311,7 +311,9 @@ public final class Logging extends Stati
}
final int length = paquet.length();
if (classname.length() > length) {
- // We expect '.' but we accept also '$' or end of string.
+ /*
+ * We expect '.' but we accept also '$' or end of string.
+ */
final char separator = classname.charAt(length);
if (Character.isJavaIdentifierPart(separator)) {
continue;
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/MonolineFormatter.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/MonolineFormatter.java?rev=1779559&r1=1779558&r2=1779559&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/MonolineFormatter.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/MonolineFormatter.java [UTF-8] Fri Jan 20 04:34:26 2017
@@ -360,7 +360,7 @@ loop: for (int i=0; ; i++) {
* Returns the string to write on the left side of the first line of every log records, or {@code null} if none.
* This is a string to be shown just before the level.
*
- * @return The string to write on the left side of the first line of every log records, or {@code null} if none.
+ * @return the string to write on the left side of the first line of every log records, or {@code null} if none.
*/
public String getHeader() {
final String header;
@@ -394,7 +394,7 @@ loop: for (int i=0; ; i++) {
* {@code org.apache.sis.util.logging.MonolineFormatter.time} property in the
* {@code jre/lib/logging.properties} file.
*
- * @return The time pattern, or {@code null} if elapsed time is not formatted.
+ * @return the time pattern, or {@code null} if elapsed time is not formatted.
*/
public String getTimeFormat() {
synchronized (buffer) {
@@ -410,8 +410,8 @@ loop: for (int i=0; ; i++) {
* The {@code "HH:mm:ss.SSS"} pattern will display the elapsed time in hours, minutes, seconds
* and milliseconds.</div>
*
- * @param pattern The time pattern, or {@code null} to disable time formatting.
- * @throws IllegalArgumentException If the given pattern is invalid.
+ * @param pattern the time pattern, or {@code null} to disable time formatting.
+ * @throws IllegalArgumentException if the given pattern is invalid.
*/
public void setTimeFormat(final String pattern) throws IllegalArgumentException {
synchronized (buffer) {
@@ -440,7 +440,7 @@ loop: for (int i=0; ; i++) {
* {@code org.apache.sis.util.logging.MonolineFormatter.source} property in the
* {@code jre/lib/logging.properties} file.
*
- * @return The source format, or {@code null} if source is not formatted.
+ * @return the source format, or {@code null} if source is not formatted.
*/
public String getSourceFormat() {
synchronized (buffer) {
@@ -465,8 +465,8 @@ loop: for (int i=0; ; i++) {
* The source class name usually contains the logger name since (by convention) logger
* names are package names, but this is not mandatory neither enforced.
*
- * @param format The format for displaying the source, or {@code null} if the source shall not be formatted.
- * @throws IllegalArgumentException If the given argument is not one of the recognized format names.
+ * @param format the format for displaying the source, or {@code null} if the source shall not be formatted.
+ * @throws IllegalArgumentException if the given argument is not one of the recognized format names.
*/
public void setSourceFormat(final String format) throws IllegalArgumentException {
synchronized (buffer) {
@@ -497,8 +497,8 @@ loop: for (int i=0; ; i++) {
* The current set of supported colors are {@code "red"}, {@code "green"}, {@code "yellow"}, {@code "blue"},
* {@code "magenta"}, {@code "cyan"} and {@code "gray"}. This set may be extended in any future SIS version.
*
- * @param level The level for which to get the color.
- * @return The color for the given level, or {@code null} if none.
+ * @param level the level for which to get the color.
+ * @return the color for the given level, or {@code null} if none.
*/
public String getLevelColor(final Level level) {
synchronized (buffer) {
@@ -521,9 +521,9 @@ loop: for (int i=0; ; i++) {
* <p>The given {@code color} argument shall be one of the values documented in the
* {@link #getLevelColor(Level)} method.</p>
*
- * @param level The level for which to set a new color.
- * @param color The case-insensitive new color, or {@code null} if none.
- * @throws IllegalArgumentException If the given color is not one of the recognized values.
+ * @param level the level for which to set a new color.
+ * @param color the case-insensitive new color, or {@code null} if none.
+ * @throws IllegalArgumentException if the given color is not one of the recognized values.
*/
public void setLevelColor(final Level level, final String color) throws IllegalArgumentException {
boolean changed = false;
@@ -620,8 +620,8 @@ loop: for (int i=0; ; i++) {
* Formats the given log record and return the formatted string.
* See the <a href="#overview">class javadoc</a> for information on the log format.
*
- * @param record The log record to be formatted.
- * @return A formatted log record.
+ * @param record the log record to be formatted.
+ * @return a formatted log record.
*/
@Override
public String format(final LogRecord record) {
@@ -759,7 +759,7 @@ loop: for (int i=0; ; i++) {
* </ul>
*
* @param record The log record from which to get a localized message.
- * @return The localized message.
+ * @return the localized message.
*/
@Override
public String formatMessage(final LogRecord record) {
@@ -803,11 +803,11 @@ loop: for (int i=0; ; i++) {
* Prints an abridged stack trace. This method is invoked when the record is logged at
* at low logging level (typically less than {@link Level#INFO}).
*
- * @param exception The exception to be logged.
- * @param writer Where to print the stack trace.
- * @param loggerName The name of the logger when the log will be sent.
- * @param sourceClassName The name of the class that emitted the log.
- * @param sourceMethodName The name of the method that emitted the log.
+ * @param exception the exception to be logged.
+ * @param writer where to print the stack trace.
+ * @param loggerName the name of the logger when the log will be sent.
+ * @param sourceClassName the name of the class that emitted the log.
+ * @param sourceMethodName the name of the method that emitted the log.
*/
private static void printAbridged(Throwable exception, final Appendable writer,
final String loggerName, final String sourceClassName, final String sourceMethodName) throws IOException
@@ -916,9 +916,9 @@ loop: for (int i=0; ; i++) {
* The current implementation does not check for duplicated {@code ConsoleHandler} instances,
* and does not check if any child logger has a {@code ConsoleHandler}.</div>
*
- * @return The new or existing {@code MonolineFormatter}. The formatter output can be configured
+ * @return the new or existing {@code MonolineFormatter}. The formatter output can be configured
* using the {@link #setTimeFormat(String)} and {@link #setSourceFormat(String)} methods.
- * @throws SecurityException If this method does not have the permission to install the formatter.
+ * @throws SecurityException if this method does not have the permission to install the formatter.
*/
@Configuration
public static MonolineFormatter install() throws SecurityException {
@@ -958,11 +958,11 @@ loop: for (int i=0; ; i++) {
* This is mostly a convenience for temporary increase of logging verbosity for debugging purpose.
* This functionality should not be used in production environment, since it overwrite user's level setting.
*
- * @param logger The base logger to apply the change on.
- * @param level The desired level, or {@code null} if no level should be set.
- * @return The new or existing {@code MonolineFormatter}. The formatter output can be configured
+ * @param logger the base logger to apply the change on.
+ * @param level the desired level, or {@code null} if no level should be set.
+ * @return the new or existing {@code MonolineFormatter}. The formatter output can be configured
* using the {@link #setTimeFormat(String)} and {@link #setSourceFormat(String)} methods.
- * @throws SecurityException If this method does not have the permission to install the formatter.
+ * @throws SecurityException if this method does not have the permission to install the formatter.
*/
@Debug
@Configuration
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/PerformanceLevel.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/PerformanceLevel.java?rev=1779559&r1=1779558&r2=1779559&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/PerformanceLevel.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/PerformanceLevel.java [UTF-8] Fri Jan 20 04:34:26 2017
@@ -101,9 +101,9 @@ public final class PerformanceLevel exte
/**
* Constructs a new logging level for monitoring performance.
*
- * @param name The logging level name.
- * @param value The level value.
- * @param duration The minimal duration (in nanoseconds) for logging a record.
+ * @param name the logging level name.
+ * @param value the level value.
+ * @param duration the minimal duration (in nanoseconds) for logging a record.
*/
private PerformanceLevel(final String name, final int value, final long duration) {
super(name, value);
@@ -113,9 +113,9 @@ public final class PerformanceLevel exte
/**
* Returns the level to use for logging an event of the given duration.
*
- * @param duration The event duration.
- * @param unit The unit of the given duration value.
- * @return The level to use for logging an event of the given duration.
+ * @param duration the event duration.
+ * @param unit the unit of the given duration value.
+ * @return the level to use for logging an event of the given duration.
*/
public static PerformanceLevel forDuration(long duration, final TimeUnit unit) {
duration = unit.toNanos(duration);
@@ -129,8 +129,8 @@ public final class PerformanceLevel exte
/**
* Returns the minimal duration for logging an event at this level.
*
- * @param unit The unit in which to express the minimal duration.
- * @return The minimal duration in the given unit.
+ * @param unit the unit in which to express the minimal duration.
+ * @return the minimal duration in the given unit.
*/
public long getMinDuration(final TimeUnit unit) {
return unit.convert(minDuration, TimeUnit.NANOSECONDS);
@@ -152,9 +152,9 @@ public final class PerformanceLevel exte
* However invoking this method on the {@code PERFORMANCE} field will ensure that every
* {@code SLOW*} levels will have at least the given duration.</div>
*
- * @param duration The minimal duration.
- * @param unit The unit of the given duration value.
- * @throws IllegalArgumentException If the given duration is negative.
+ * @param duration the minimal duration.
+ * @param unit the unit of the given duration value.
+ * @throws IllegalArgumentException if the given duration is negative.
*/
@Configuration
@SuppressWarnings("fallthrough")
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/WarningListener.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/WarningListener.java?rev=1779559&r1=1779558&r2=1779559&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/WarningListener.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/WarningListener.java [UTF-8] Fri Jan 20 04:34:26 2017
@@ -34,7 +34,7 @@ import java.util.logging.LogRecord;
* The difference between using this listener or configuring the logging {@link java.util.logging.Handler} is
* that listeners allow to handle the warnings on a per-{@code DataStore} (or any other emitter) instance.
*
- * @param <S> The base type of objects that emit warnings (the <cite>source</cite>).
+ * @param <S> the base type of objects that emit warnings (the <cite>source</cite>).
*
* @author Martin Desruisseaux (Geomatys)
* @since 0.3
@@ -50,7 +50,7 @@ public interface WarningListener<S> exte
* This is typically, but not necessarily, the class having the name returned by
* {@link LogRecord#getSourceClassName()}, or one of its parent classes.
*
- * @return The base type of objects that emit warnings (the <cite>source</cite>).
+ * @return the base type of objects that emit warnings (the <cite>source</cite>).
*/
Class<S> getSourceClass();
@@ -68,8 +68,8 @@ public interface WarningListener<S> exte
* Applications do not need to log the warning, since logging will be done automatically if the emitter has
* no registered warning listeners.</p>
*
- * @param source The object that emitted a warning, or {@code null} if not available.
- * @param warning The warning message together with programmatic information.
+ * @param source the object that emitted a warning, or {@code null} if not available.
+ * @param warning the warning message together with programmatic information.
*/
void warningOccured(S source, LogRecord warning);
}
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java?rev=1779559&r1=1779558&r2=1779559&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java [UTF-8] Fri Jan 20 04:34:26 2017
@@ -279,8 +279,10 @@ public class IndexedResourceBundle exten
* differ from its parent in the way dates and numbers are formatted.
*/
if (resources == null) {
- // If we get a NullPointerException or ClassCastException here,
- // it would be a bug in the way we create the chain of parents.
+ /*
+ * If we get a NullPointerException or ClassCastException here,
+ * it would be a bug in the way we create the chain of parents.
+ */
values = ((IndexedResourceBundle) parent).ensureLoaded(key);
} else {
/*
@@ -348,7 +350,9 @@ public class IndexedResourceBundle exten
*/
@Override
protected final Object handleGetObject(final String key) {
- // Synchronization performed by 'ensureLoaded'
+ /*
+ * Note: Synchronization is performed by 'ensureLoaded'
+ */
final String[] values = ensureLoaded(key);
int keyID;
try {
@@ -415,8 +419,10 @@ public class IndexedResourceBundle exten
} else if (element instanceof CodeList<?>) {
replacement = Types.getCodeTitle((CodeList<?>) element).toString(getLocale());
}
- // No need to check for Numbers or Dates instances, since they are
- // properly formatted in the ResourceBundle locale by MessageFormat.
+ /*
+ * No need to check for Numbers or Dates instances, since they are
+ * properly formatted in the ResourceBundle locale by MessageFormat.
+ */
if (replacement != element) {
if (array == arguments) {
array = array.clone(); // Protect the user-provided array from change.
@@ -461,7 +467,7 @@ public class IndexedResourceBundle exten
* A space may or may not be added before ":", depending on the locale.
* No space is added after the string; it is up to the caller to add such space if needed.
*
- * @param key The key for the desired string.
+ * @param key the key for the desired string.
* @return the string for the given key.
* @throws MissingResourceException if no object for the given key can be found.
*/
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Loader.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Loader.java?rev=1779559&r1=1779558&r2=1779559&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Loader.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Loader.java [UTF-8] Fri Jan 20 04:34:26 2017
@@ -97,7 +97,7 @@ final class Loader extends ResourceBundl
try {
classe = Class.forName(baseName, true, loader);
} catch (ClassNotFoundException e) {
- return null; // This is the expected behavior as of Control.newBundle contract.
+ return null; // This is the expected behavior as of Control.newBundle contract.
}
/*
* Gets the filename relative to the class we created, since we assumes that UTF files
|