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 2017/01/17 06:53:18 UTC
svn commit: r1779145 [2/2] - in /sis/trunk: ./
core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/
core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/extent/
core/sis-referencing/src/main/java/org/apache/sis/referencing/ core/s...
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/StringConverter.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/StringConverter.java?rev=1779145&r1=1779144&r2=1779145&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/StringConverter.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/StringConverter.java [UTF-8] Tue Jan 17 06:53:18 2017
@@ -124,7 +124,7 @@ abstract class StringConverter<T> extend
*
* @param source the string to convert, or {@code null}.
* @return The converted value, or {@code null} if the given string was null or empty.
- * @throws UnconvertibleObjectException If an error occurred during the conversion.
+ * @throws UnconvertibleObjectException if an error occurred during the conversion.
*/
@Override
public final T apply(String source) throws UnconvertibleObjectException {
@@ -147,7 +147,7 @@ abstract class StringConverter<T> extend
*
* @param source the string to convert, guaranteed to be non-null and non-empty.
* @return The converted value.
- * @throws Exception If an error occurred during the conversion.
+ * @throws Exception if an error occurred during the conversion.
*/
abstract T doConvert(String source) throws Exception;
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SurjectiveConverter.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SurjectiveConverter.java?rev=1779145&r1=1779144&r2=1779145&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SurjectiveConverter.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SurjectiveConverter.java [UTF-8] Tue Jan 17 06:53:18 2017
@@ -35,8 +35,8 @@ import org.apache.sis.util.resources.Err
* <p>This base class is stateless. Consequently sub-classes that choose to implement
* {@link java.io.Serializable} do not need to care about this base class.</p>
*
- * @param <S> The type of objects to convert.
- * @param <T> The type of converted objects.
+ * @param <S> the type of objects to convert.
+ * @param <T> the type of converted objects.
*
* @author Martin Desruisseaux (Geomatys)
* @since 0.3
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SystemConverter.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SystemConverter.java?rev=1779145&r1=1779144&r2=1779145&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SystemConverter.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SystemConverter.java [UTF-8] Tue Jan 17 06:53:18 2017
@@ -32,8 +32,8 @@ import org.apache.sis.util.resources.Err
* This base class is immutable, and thus inherently thread-safe. Subclasses should be immutable
* and thread-safe too if they are intended to be cached in {@link ConverterRegistry}.
*
- * @param <S> The base type of source objects.
- * @param <T> The base type of converted objects.
+ * @param <S> the base type of source objects.
+ * @param <T> the base type of converted objects.
*
* @author Martin Desruisseaux (Geomatys)
* @since 0.3
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SystemRegistry.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SystemRegistry.java?rev=1779145&r1=1779144&r2=1779145&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SystemRegistry.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SystemRegistry.java [UTF-8] Tue Jan 17 06:53:18 2017
@@ -141,7 +141,7 @@ public final class SystemRegistry extend
* many of them, and a generic code is available for all of them.</li>
* </ul>
*
- * @return A newly generated converter from the specified source class to the target class,
+ * @return a newly generated converter from the specified source class to the target class,
* or {@code null} if none.
*/
@Override
@@ -158,7 +158,7 @@ public final class SystemRegistry extend
* to java.util.Date was created by the super class, that conversion would not contain
* an inverse conversion from java.util.Date to java.sql.Date.
*/
- if (tryInverse(targetClass) && !tryInverse(sourceClass)) { // The ! is for preventing infinite recursivity.
+ if (tryInverse(targetClass) && !tryInverse(sourceClass)) { // The ! is for preventing infinite recursivity.
try {
return findExact(targetClass, sourceClass).inverse();
} catch (UnconvertibleObjectException e) {
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/AdapterReplacement.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/AdapterReplacement.java?rev=1779145&r1=1779144&r2=1779145&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/AdapterReplacement.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/AdapterReplacement.java [UTF-8] Tue Jan 17 06:53:18 2017
@@ -54,7 +54,7 @@ public interface AdapterReplacement {
* }
*
* @param marshaller The marshaller to be configured.
- * @throws JAXBException If the given marshaller can not be configured.
+ * @throws JAXBException if the given marshaller can not be configured.
*/
void register(Marshaller marshaller) throws JAXBException;
@@ -67,7 +67,7 @@ public interface AdapterReplacement {
* }
*
* @param unmarshaller The unmarshaller to be configured.
- * @throws JAXBException If the given unmarshaller can not be configured.
+ * @throws JAXBException if the given unmarshaller can not be configured.
*/
void register(Unmarshaller unmarshaller) throws JAXBException;
}
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapAdapter.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapAdapter.java?rev=1779145&r1=1779144&r2=1779145&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapAdapter.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapAdapter.java [UTF-8] Tue Jan 17 06:53:18 2017
@@ -33,6 +33,7 @@ import org.apache.sis.util.Debug;
import org.apache.sis.xml.XLink;
import org.apache.sis.xml.IdentifierMap;
import org.apache.sis.xml.IdentifierSpace;
+import org.apache.sis.internal.util.Utilities;
import org.apache.sis.internal.util.SetOfUnknownSize;
import static org.apache.sis.util.collection.Containers.hashMapCapacity;
@@ -395,7 +396,7 @@ public class IdentifierMapAdapter extend
* @version 0.7
* @module
*/
- @SuppressWarnings("serial") // Not intended to be serialized.
+ @SuppressWarnings("serial") // Not intended to be serialized.
private static final class Iter extends HashMap<Citation,Boolean> implements Iterator<Entry<Citation,String>> {
/**
* An iterator over the {@link IdentifierMapAdapter#identifiers} collection,
@@ -510,6 +511,24 @@ public class IdentifierMapAdapter extend
it.remove();
put(authority, Boolean.TRUE);
}
+
+ /**
+ * Iterators are not intended to be cloned.
+ */
+ @Override
+ @SuppressWarnings("CloneDoesntCallSuperClone")
+ public Object clone() {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Returns the next value to be returned, for debugging purpose only.
+ */
+ @Debug
+ @Override
+ public String toString() {
+ return Utilities.toString(Iter.class, "next", next);
+ }
}
/**
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/ModifiableIdentifierMap.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/ModifiableIdentifierMap.java?rev=1779145&r1=1779144&r2=1779145&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/ModifiableIdentifierMap.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/ModifiableIdentifierMap.java [UTF-8] Tue Jan 17 06:53:18 2017
@@ -17,6 +17,7 @@
package org.apache.sis.internal.jaxb;
import java.net.URI;
+import java.util.Objects;
import java.util.Iterator;
import java.util.Collection;
import java.net.URISyntaxException;
@@ -27,9 +28,6 @@ import org.apache.sis.xml.IdentifierSpac
import org.apache.sis.xml.ValueConverter;
import org.apache.sis.xml.XLink;
-// Branch-dependent imports
-import java.util.Objects;
-
/**
* A map of identifiers which support {@code put} and {@code remove} operations.
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/NonMarshalledAuthority.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/NonMarshalledAuthority.java?rev=1779145&r1=1779144&r2=1779145&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/NonMarshalledAuthority.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/NonMarshalledAuthority.java [UTF-8] Tue Jan 17 06:53:18 2017
@@ -60,7 +60,7 @@ import org.apache.sis.xml.IdentifierSpac
* }
* }
*
- * @param <T> The type of object used as identifier values.
+ * @param <T> the type of object used as identifier values.
*
* @author Martin Desruisseaux (Geomatys)
* @since 0.3
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/PrimitiveTypeProperties.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/PrimitiveTypeProperties.java?rev=1779145&r1=1779144&r2=1779145&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/PrimitiveTypeProperties.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/PrimitiveTypeProperties.java [UTF-8] Tue Jan 17 06:53:18 2017
@@ -81,8 +81,8 @@ public final class PrimitiveTypeProperti
* The {@code primitive} argument shall be a specific instance created by the {@code new} keyword, not
* a shared instance link {@link Boolean#FALSE} or the values returned by {@link Integer#valueOf(int)}.
*
- * @param primitive The {@link Boolean}, {@link Integer}, {@link Double} or {@link String} specific instance.
- * @param property The {@link NilReason} or other property to associate to the given instance.
+ * @param primitive the {@link Boolean}, {@link Integer}, {@link Double} or {@link String} specific instance.
+ * @param property the {@link NilReason} or other property to associate to the given instance.
*/
public static void associate(final Object primitive, final Object property) {
assert isValidKey(primitive) : primitive;
@@ -98,8 +98,8 @@ public final class PrimitiveTypeProperti
/**
* Returns the property of the given primitive type, or {@code null} if none.
*
- * @param primitive The {@link Boolean}, {@link Integer}, {@link Double} or {@link String} specific instance.
- * @return The property associated to the given instance, or {@code null} if none.
+ * @param primitive the {@link Boolean}, {@link Integer}, {@link Double} or {@link String} specific instance.
+ * @return the property associated to the given instance, or {@code null} if none.
*/
public static Object property(final Object primitive) {
// No 'assert isValidKey(primitive)' because this method is sometime invoked
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/TypeRegistration.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/TypeRegistration.java?rev=1779145&r1=1779144&r2=1779145&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/TypeRegistration.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/TypeRegistration.java [UTF-8] Tue Jan 17 06:53:18 2017
@@ -70,7 +70,7 @@ public abstract class TypeRegistration {
* Adds to the given collection every types that should be given to
* the initial JAXB context.
*
- * @param addTo The collection in which to add new types.
+ * @param addTo the collection in which to add new types.
*/
public abstract void getTypes(final Collection<Class<?>> addTo);
@@ -82,7 +82,7 @@ public abstract class TypeRegistration {
* <p>The list of classes is determined dynamically from the SIS modules found on
* the classpath.</p>
*
- * @return The default set of classes to be bound to the {@code JAXBContext}.
+ * @return the default set of classes to be bound to the {@code JAXBContext}.
*/
private static Class<?>[] defaultClassesToBeBound() {
/*
@@ -103,8 +103,8 @@ public abstract class TypeRegistration {
* Note that the {@code JAXBContext} class is thread safe, but the {@code Marshaller},
* {@code Unmarshaller}, and {@code Validator} classes are not thread safe.
*
- * @return The shared JAXB context.
- * @throws JAXBException If an error occurred while creating the JAXB context.
+ * @return the shared JAXB context.
+ * @throws JAXBException if an error occurred while creating the JAXB context.
*/
public static synchronized JAXBContext getSharedContext() throws JAXBException {
final Reference<JAXBContext> c = context;
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/collection/DefaultTreeTable.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/collection/DefaultTreeTable.java?rev=1779145&r1=1779144&r2=1779145&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/collection/DefaultTreeTable.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/collection/DefaultTreeTable.java [UTF-8] Tue Jan 17 06:53:18 2017
@@ -27,6 +27,7 @@ import java.io.Serializable;
import org.apache.sis.util.ArgumentChecks;
import org.apache.sis.util.resources.Errors;
import org.apache.sis.internal.util.Cloner;
+import org.apache.sis.internal.util.Acyclic;
import org.apache.sis.internal.util.UnmodifiableArrayList;
import static org.apache.sis.util.CharSequences.trimWhitespaces;
@@ -321,6 +322,7 @@ public class DefaultTreeTable implements
* @see DefaultTreeTable
* @see TableColumn
*/
+ @Acyclic
public static class Node implements TreeTable.Node, Cloneable, Serializable {
/**
* For cross-version compatibility.
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTableFormat.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTableFormat.java?rev=1779145&r1=1779144&r2=1779145&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTableFormat.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTableFormat.java [UTF-8] Tue Jan 17 06:53:18 2017
@@ -47,6 +47,7 @@ import org.apache.sis.util.CharSequences
import org.apache.sis.util.ArgumentChecks;
import org.apache.sis.util.resources.Errors;
import org.apache.sis.util.resources.Vocabulary;
+import org.apache.sis.internal.util.Acyclic;
import org.apache.sis.internal.util.LocalizedParseException;
import static org.apache.sis.util.Characters.NO_BREAK_SPACE;
@@ -769,7 +770,7 @@ public class TreeTableFormat extends Tab
* a real check of values and children, which is a little bit costly and known to be unnecessary in that
* particular case.
*/
- final boolean omitCheck = (node.getClass() == DefaultTreeTable.Node.class);
+ final boolean omitCheck = node.getClass().isAnnotationPresent(Acyclic.class);
if (omitCheck || recursivityGuard.add(node)) {
final Iterator<? extends TreeTable.Node> it = node.getChildren().iterator();
boolean hasNext = it.hasNext();