Author: desruisseaux
Date: Tue Jul 21 12:47:01 2015
New Revision: 1692101
URL: http://svn.apache.org/r1692101
Log:
Reduce the number of compiler warnings by either resolving the warning, or
adding a @SuppressWarnings annotation.
Modified:
sis/branches/JDK8/application/sis-console/src/main/java/org/apache/sis/console/SubCommand.java
sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractIdentifiedType.java
sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/DefaultAttributeTypeTest.java
sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/MultiValuedAttributeTest.java
sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/SingletonAttributeTest.java
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_AggregateInformation.java
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/LegacyPropertyAdapter.java
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/MetadataUtilities.java
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/FormattableObject.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/AbstractMercator.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterFormat.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/UninitializedParameter.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultCompoundCRS.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCompoundCS.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Solver.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractLinearTransform.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CopyTransform.java
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/converter/StringConverter.java
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SystemConverter.java
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapWithSpecialCases.java
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Boolean.java
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Integer.java
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Integer64.java
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/PropertyType.java
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/TimeInstant.java
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/DelayedRunnable.java
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/OS.java
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/SystemListener.java
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/io/AppendableWriter.java
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/AngleFormat.java
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/Locales.java
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTables.java
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultScopedName.java
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/logging/DualLogger.java
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/NilReason.java
sis/branches/JDK8/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/DecoderWrapper.java
sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/ChannelDecoderTest.java
sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/GridGeometryInfoTest.java
sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/VariableInfoTest.java
sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/xml/MimeTypeDetector.java
sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/xml/XMLStoreProvider.java
Modified:
sis/branches/JDK8/application/sis-console/src/main/java/org/apache/sis/console/SubCommand.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/application/sis-console/src/main/java/org/apache/sis/console/SubCommand.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/application/sis-console/src/main/java/org/apache/sis/console/SubCommand.java
[UTF-8] (original)
+++
sis/branches/JDK8/application/sis-console/src/main/java/org/apache/sis/console/SubCommand.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -202,6 +202,7 @@ abstract class SubCommand {
console = System.console();
colors = (value != null) ? Option.COLORS.parseBoolean(value) :
(console != null) && X364.isAnsiSupported();
} catch (RuntimeException e) {
+ @SuppressWarnings("null") // 'option' has been assigned in 'get'
argument.
final String name = option.name().toLowerCase(Locale.US);
throw new
InvalidOptionException(Errors.format(Errors.Keys.IllegalOptionValue_2, name,
value), name);
}
Modified:
sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractIdentifiedType.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractIdentifiedType.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractIdentifiedType.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractIdentifiedType.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -165,6 +165,7 @@ public class AbstractIdentifiedType impl
* @param identification The name and other information to be given to
this identified type.
* @throws IllegalArgumentException if a property has an invalid value.
*/
+ @SuppressWarnings("OverridableMethodCallDuringObjectConstruction")
protected AbstractIdentifiedType(final Map<String,?> identification)
throws IllegalArgumentException {
ensureNonNull("identification", identification);
Object value = identification.get(NAME_KEY);
Modified:
sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/DefaultAttributeTypeTest.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/DefaultAttributeTypeTest.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/DefaultAttributeTypeTest.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/DefaultAttributeTypeTest.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -150,6 +150,7 @@ public final strictfp class DefaultAttri
* Tests attribute comparison.
*/
@Test
+ @SuppressWarnings("ObjectEqualsNull")
public void testEquals() {
final Map<String,Object> identification = new HashMap<>(4);
final DefaultAttributeType<Integer> a1 = population(identification);
Modified:
sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/MultiValuedAttributeTest.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/MultiValuedAttributeTest.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/MultiValuedAttributeTest.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/MultiValuedAttributeTest.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -124,6 +124,7 @@ public final strictfp class MultiValuedA
*/
@Test
@DependsOnMethod("testValue")
+ @SuppressWarnings("ObjectEqualsNull")
public void testEquals() {
final AbstractAttribute<Integer> a1 = population();
final AbstractAttribute<Integer> a2 = population();
Modified:
sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/SingletonAttributeTest.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/SingletonAttributeTest.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/SingletonAttributeTest.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/feature/SingletonAttributeTest.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -130,6 +130,7 @@ public final strictfp class SingletonAtt
*/
@Test
@DependsOnMethod("testValue")
+ @SuppressWarnings("ObjectEqualsNull")
public void testEquals() {
final AbstractAttribute<Integer> a1 = population();
final AbstractAttribute<Integer> a2 = population();
Modified:
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_AggregateInformation.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_AggregateInformation.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_AggregateInformation.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_AggregateInformation.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -32,6 +32,7 @@ import org.apache.sis.internal.jaxb.gco.
* @version 0.3
* @module
*/
+@SuppressWarnings("deprecation")
public final class MD_AggregateInformation extends
PropertyType<MD_AggregateInformation, AggregateInformation>
{
Modified:
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/LegacyPropertyAdapter.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/LegacyPropertyAdapter.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/LegacyPropertyAdapter.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/LegacyPropertyAdapter.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -22,7 +22,6 @@ import java.util.Collections;
import java.util.Iterator;
import java.util.NoSuchElementException;
import org.apache.sis.metadata.AbstractMetadata;
-import org.apache.sis.metadata.iso.ISOMetadata;
import org.apache.sis.internal.jaxb.Context;
import org.apache.sis.util.resources.Messages;
import org.apache.sis.util.ArgumentChecks;
Modified:
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/MetadataUtilities.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/MetadataUtilities.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/MetadataUtilities.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/MetadataUtilities.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -20,7 +20,6 @@ import java.util.Date;
import org.apache.sis.xml.NilReason;
import org.apache.sis.util.Static;
import org.apache.sis.util.resources.Errors;
-import org.apache.sis.metadata.iso.ISOMetadata;
import org.apache.sis.metadata.InvalidMetadataException;
import org.apache.sis.internal.jaxb.PrimitiveTypeProperties;
import org.apache.sis.internal.jaxb.Context;
@@ -71,6 +70,7 @@ public final class MetadataUtilities ext
* @return The given value as a primitive type.
* @throws InvalidMetadataException if the given value is nil.
*/
+ @SuppressWarnings("NumberEquality")
public static boolean getInclusion(final Boolean value) throws
InvalidMetadataException {
if (value == null) {
return true;
@@ -78,7 +78,7 @@ public final class MetadataUtilities ext
final boolean p = value;
// (value == Boolean.FALSE) is an optimization for a common case
avoiding PrimitiveTypeProperties check.
// DO NOT REPLACE BY 'equals' OR 'booleanValue()' - the exact
reference value matter.
- if (p || value == Boolean.FALSE ||
!(PrimitiveTypeProperties.property(value) instanceof NilReason)) {
+ if (p || (value == Boolean.FALSE) ||
!(PrimitiveTypeProperties.property(value) instanceof NilReason)) {
return p;
}
throw new
InvalidMetadataException(Errors.format(Errors.Keys.MissingValueForProperty_1,
"inclusion"));
Modified:
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/FormattableObject.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/FormattableObject.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/FormattableObject.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/FormattableObject.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -142,6 +142,7 @@ public abstract class FormattableObject
* <p>This is a convenience method for debugging purpose and for console
applications.</p>
*/
@Debug
+ @SuppressWarnings("UseOfSystemOutOrSystemErr")
public void print() {
final Console console = System.console();
final PrintWriter out = (console != null) ? console.writer() : null;
Modified:
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/AbstractMercator.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/AbstractMercator.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/AbstractMercator.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/AbstractMercator.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -59,6 +59,7 @@ class AbstractMercator extends MapProjec
*
* @throws ArrayStoreException if a {@code descriptors} element is not an
instance of {@link ParameterDescriptor}.
*/
+ @SuppressWarnings("SuspiciousToArrayCall")
static ParameterDescriptor<?>[] toArray(List<GeneralParameterDescriptor>
descriptors) {
descriptors = descriptors.subList(2, descriptors.size());
return descriptors.toArray(new
ParameterDescriptor<?>[descriptors.size()]); // Intentional array subtype.
Modified:
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterFormat.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterFormat.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterFormat.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterFormat.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -986,6 +986,7 @@ public class ParameterFormat extends Tab
/**
* Writes the given object to the console using a shared instance of
{@code ParameterFormat}.
*/
+ @SuppressWarnings("UseOfSystemOutOrSystemErr")
static void print(final Object object) {
final Console console = System.console();
final Appendable out = (console != null) ? console.writer() :
System.out;
Modified:
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/UninitializedParameter.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/UninitializedParameter.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/UninitializedParameter.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/UninitializedParameter.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -33,6 +33,7 @@ import org.apache.sis.referencing.Identi
* @version 0.4
* @module
*/
+@SuppressWarnings("CloneInNonCloneableClass")
final class UninitializedParameter implements GeneralParameterValue,
Serializable { // Intentionally non-Cloneable.
/**
* For cross-version serialization compatibility.
Modified:
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultCompoundCRS.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultCompoundCRS.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultCompoundCRS.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultCompoundCRS.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -235,6 +235,7 @@ public class DefaultCompoundCRS extends
* <p><strong>WARNING:</strong> this method is invoked by constructors
<em>before</em>
* the {@linkplain #components} field is set. Do not use this field in
this method.</p>
*/
+ @SuppressWarnings("SuspiciousToArrayCall")
private List<? extends CoordinateReferenceSystem> copy(List<? extends
CoordinateReferenceSystem> components) {
if (computeSingleCRS(components)) {
components = singles; // Shares the same list.
Modified:
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -164,6 +164,7 @@ public class AbstractCS extends Abstract
* @param properties The properties to be given to the identified object.
* @param axes The sequence of axes.
*/
+ @SuppressWarnings("OverridableMethodCallDuringObjectConstruction")
public AbstractCS(final Map<String,?> properties, CoordinateSystemAxis...
axes) {
super(properties);
ensureNonNull("axes", axes);
Modified:
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCompoundCS.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCompoundCS.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCompoundCS.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCompoundCS.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -145,6 +145,7 @@ public class DefaultCompoundCS extends A
/**
* Returns all axes in the given sequence of components.
*/
+ @SuppressWarnings("ForLoopReplaceableByForEach")
private static CoordinateSystemAxis[] getAxes(final CoordinateSystem[]
components) {
int count = 0;
for (int i=0; i<components.length; i++) {
Modified:
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Solver.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Solver.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Solver.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Solver.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -37,6 +37,7 @@ import org.apache.sis.util.ArraysExt;
* @version 0.4
* @module
*/
+@SuppressWarnings("CloneInNonCloneableClass")
final class Solver implements Matrix { // Not Cloneable, despite the clone()
method.
/**
* The size of the (i, j, s) tuples used internally by {@link
#solve(Matrix, Matrix, double[], int, int)}
Modified:
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractLinearTransform.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractLinearTransform.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractLinearTransform.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractLinearTransform.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -40,6 +40,7 @@ import org.apache.sis.util.resources.Err
* @version 0.6
* @module
*/
+@SuppressWarnings("CloneInNonCloneableClass")
abstract class AbstractLinearTransform extends AbstractMathTransform
implements LinearTransform, Matrix // Not Cloneable, despite the
clone() method.
{
Modified:
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -99,6 +99,7 @@ class ConcatenatedTransform extends Abst
* @param transform1 The first math transform.
* @param transform2 The second math transform.
*/
+ @SuppressWarnings("OverridableMethodCallDuringObjectConstruction")
protected ConcatenatedTransform(final MathTransform transform1,
final MathTransform transform2)
{
Modified:
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CopyTransform.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CopyTransform.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CopyTransform.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CopyTransform.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -26,7 +26,6 @@ import org.apache.sis.referencing.operat
import org.apache.sis.referencing.operation.matrix.Matrices;
-
/**
* A transform which copy the ordinates in the source array to different
locations in the target array.
* This is a special case of {@link ProjectiveTransform} where the matrix
coefficients are zero everywhere,
Modified:
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/converter/StringConverter.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/converter/StringConverter.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/converter/StringConverter.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/converter/StringConverter.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -85,6 +85,7 @@ abstract class StringConverter<T> extend
* @param targetClass The {@linkplain #getTargetClass() target class}.
* @param inverse The inverse converter from the target to the source
class.
*/
+ @SuppressWarnings("OverridableMethodCallDuringObjectConstruction")
StringConverter(final Class<T> targetClass) {
super(String.class, targetClass);
inverse = createInverse();
Modified:
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SystemConverter.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SystemConverter.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SystemConverter.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SystemConverter.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -57,6 +57,8 @@ abstract class SystemConverter<S,T> exte
/**
* Returns the source class given at construction time.
+ *
+ * @return The type of objects to convert.
*/
@Override
public final Class<S> getSourceClass() {
@@ -65,6 +67,8 @@ abstract class SystemConverter<S,T> exte
/**
* Returns the target class given at construction time.
+ *
+ * @return The type of converted objects.
*/
@Override
public final Class<T> getTargetClass() {
@@ -82,6 +86,8 @@ abstract class SystemConverter<S,T> exte
/**
* Default to non-invertible conversion. Must be overridden by subclasses
that support inversions.
+ *
+ * @return A converter for converting instances of <var>T</var> back to
instances of <var>S</var>.
*/
@Override
public ObjectConverter<T,S> inverse() throws UnsupportedOperationException
{
Modified:
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapWithSpecialCases.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapWithSpecialCases.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapWithSpecialCases.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapWithSpecialCases.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -115,6 +115,8 @@ public final class IdentifierMapWithSpec
/**
* {@inheritDoc}
+ *
+ * @return {@code true} if at least one identifier uses the given code.
*/
@Override
public boolean containsValue(final Object code) {
@@ -123,6 +125,8 @@ public final class IdentifierMapWithSpec
/**
* {@inheritDoc}
+ *
+ * @return {@code true} if at least one identifier uses the given
authority.
*/
@Override
public boolean containsKey(final Object authority) {
@@ -140,6 +144,11 @@ public final class IdentifierMapWithSpec
/**
* {@inheritDoc}
+ *
+ * @param <T> The identifier type.
+ * @param authority The namespace whose associated identifier is to be
returned.
+ * @return The identifier to which the given namespace is mapped, or
+ * {@code null} if this map contains no mapping for the namespace.
*/
@Override
@SuppressWarnings("unchecked")
@@ -161,6 +170,8 @@ public final class IdentifierMapWithSpec
/**
* {@inheritDoc}
+ *
+ * @return The code of the identifier for the given authority, or {@code
null} if none.
*/
@Override
public String get(final Object authority) {
@@ -183,6 +194,8 @@ public final class IdentifierMapWithSpec
* then this method will actually store the value as the {@link
XLink#getHRef()} property of the {@code XLink}
* associated to the {@code XLINK} key. Only if the given string can not
be parsed, then the value is stored
* <cite>as-is</cite> under the {@code HREF} key.</p>
+ *
+ * @return The code of the identifier for the given authority, or {@code
null} if none.
*/
@Override
public String put(final Citation authority, final String code)
@@ -226,6 +239,13 @@ public final class IdentifierMapWithSpec
* <p>If the given {@code authority} is {@code HREF}, then this method
will actually store the value
* as the {@link XLink#getHRef()} property of the {@code XLink} associated
to the {@code XLINK} key.
* The previous {@code HREF} value, if any, is discarded.</p>
+ *
+ * @param <T> The identifier type.
+ * @param authority The namespace with which the given identifier is to
be associated.
+ * @param value The identifier to be associated with the given namespace.
+ * @return The previous identifier associated with {@code authority}, or
{@code null}
+ * if there was no mapping of the specialized type for {@code
authority}.
+ * @throws UnsupportedOperationException If the identifier map is
unmodifiable.
*/
@Override
@SuppressWarnings("unchecked")
Modified:
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Boolean.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Boolean.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Boolean.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Boolean.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -43,8 +43,9 @@ public final class GO_Boolean extends Pr
*
* @param value The value.
*/
+ @SuppressWarnings("NumberEquality")
private GO_Boolean(final Boolean value) {
- super(value, value.booleanValue() == false && value != Boolean.FALSE);
+ super(value, !value && value != Boolean.FALSE);
}
/**
Modified:
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Integer.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Integer.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Integer.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Integer.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -46,7 +46,7 @@ public final class GO_Integer extends Pr
* @param value The value.
*/
private GO_Integer(final Integer value) {
- super(value, value.intValue() == 0);
+ super(value, value == 0);
}
/**
Modified:
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Integer64.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Integer64.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Integer64.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Integer64.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -43,7 +43,7 @@ public final class GO_Integer64 extends
* @param value The value.
*/
private GO_Integer64(final Long value) {
- super(value, value.longValue() == 0);
+ super(value, value == 0L);
}
/**
Modified:
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/PropertyType.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/PropertyType.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/PropertyType.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/PropertyType.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -212,9 +212,10 @@ public abstract class PropertyType<Value
XLink link = map.getSpecialized(IdentifierSpace.XLINK);
UUID uuid = map.getSpecialized(IdentifierSpace.UUID);
if (uuid != null || link != null) {
+
@SuppressWarnings("OverridableMethodCallDuringObjectConstruction")
+ final Class<BoundType> type = getBoundType();
final Context context = Context.current();
final ReferenceResolver resolver = Context.resolver(context);
- final Class<BoundType> type = getBoundType();
/*
* Check if the user gives us the permission to use reference
to those identifiers.
* If not, forget them in order to avoid marshalling the
identifiers twice (see the
Modified:
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/TimeInstant.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/TimeInstant.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/TimeInstant.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/TimeInstant.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -37,8 +37,8 @@ import org.apache.sis.internal.jaxb.XmlU
* @version 0.3
* @module
*/
+@XmlType(name = "TimeInstantType")
@XmlRootElement(name="TimeInstant")
-//@XmlType(name = "TimeInstantType") // TODO: Omitted for now for allowing
external modules to define their own type.
public final class TimeInstant extends GMLAdapter {
/**
* The date, optionally with its time component. The time component is
omitted
Modified:
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/DelayedRunnable.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/DelayedRunnable.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/DelayedRunnable.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/DelayedRunnable.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -115,6 +115,8 @@ public abstract class DelayedRunnable im
/**
* {@inheritDoc}
+ *
+ * @return {@inheritDoc}
*/
@Override
public final int compareTo(final Delayed other) {
Modified:
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/OS.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/OS.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/OS.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/OS.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -66,9 +66,9 @@ public enum OS {
public static OS current() {
final String name = System.getProperty("os.name");
if (name != null) {
- if (name.indexOf("Windows") >= 0) return WINDOWS;
- if (name.indexOf("Mac OS") >= 0) return MAC_OS;
- if (name.indexOf("Linux") >= 0) return LINUX;
+ if (name.contains("Windows")) return WINDOWS;
+ if (name.contains("Mac OS")) return MAC_OS;
+ if (name.contains("Linux")) return LINUX;
}
return UNKNOWN;
}
Modified:
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/SystemListener.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/SystemListener.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/SystemListener.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/system/SystemListener.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -120,6 +120,7 @@ public abstract class SystemListener imp
/**
* Notifies all registered listeners that the classpath may have changed.
*/
+ @SuppressWarnings("ForLoopReplaceableByForEach")
public static void fireClasspathChanged() {
final SystemListener[] list;
synchronized (SystemListener.class) {
Modified:
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/io/AppendableWriter.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/io/AppendableWriter.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/io/AppendableWriter.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/io/AppendableWriter.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -69,6 +69,7 @@ final class AppendableWriter extends Wri
* Forwards the given single character to {@link #out}.
*/
@Override
+ @SuppressWarnings("SynchronizeOnNonFinalField")
public Writer append(final char c) throws IOException {
synchronized (lock) {
out.append(c);
@@ -80,6 +81,7 @@ final class AppendableWriter extends Wri
* Forwards the given single character to {@link #out}.
*/
@Override
+ @SuppressWarnings("SynchronizeOnNonFinalField")
public void write(int c) throws IOException {
synchronized (lock) {
out.append((char) c);
@@ -90,6 +92,7 @@ final class AppendableWriter extends Wri
* Forwards the given character sequence to {@link #out}.
*/
@Override
+ @SuppressWarnings("SynchronizeOnNonFinalField")
public Writer append(final CharSequence sequence) throws IOException {
synchronized (lock) {
out.append(sequence);
@@ -101,6 +104,7 @@ final class AppendableWriter extends Wri
* Forwards the given string to {@link #out}.
*/
@Override
+ @SuppressWarnings("SynchronizeOnNonFinalField")
public void write(final String string) throws IOException {
synchronized (lock) {
out.append(string);
@@ -111,6 +115,7 @@ final class AppendableWriter extends Wri
* Forwards the given character sub-sequence to {@link #out}.
*/
@Override
+ @SuppressWarnings("SynchronizeOnNonFinalField")
public Writer append(final CharSequence sequence, final int start, final
int end) throws IOException {
synchronized (lock) {
out.append(sequence, start, end);
@@ -122,6 +127,7 @@ final class AppendableWriter extends Wri
* Forwards the given sub-string to {@link #out}.
*/
@Override
+ @SuppressWarnings("SynchronizeOnNonFinalField")
public void write(final String string, final int start, final int length)
throws IOException {
synchronized (lock) {
out.append(string, start, start + length);
@@ -132,6 +138,7 @@ final class AppendableWriter extends Wri
* Forwards the given character array to {@link #out}.
*/
@Override
+ @SuppressWarnings("SynchronizeOnNonFinalField")
public void write(final char[] cbuf, final int offset, final int length)
throws IOException {
synchronized (lock) {
out.append(CharBuffer.wrap(cbuf, offset, length));
@@ -143,6 +150,7 @@ final class AppendableWriter extends Wri
* around a flushable object, delegates to that object. Otherwise do
nothing.
*/
@Override
+ @SuppressWarnings("SynchronizeOnNonFinalField")
public void flush() throws IOException {
synchronized (lock) {
IO.flush(out);
@@ -154,6 +162,7 @@ final class AppendableWriter extends Wri
* around a closeable object, delegates to that object. Otherwise just
flush (if possible).
*/
@Override
+ @SuppressWarnings("SynchronizeOnNonFinalField")
public void close() throws IOException {
synchronized (lock) {
IO.close(out);
@@ -170,6 +179,7 @@ final class AppendableWriter extends Wri
* @see IO#content(Appendable)
*/
@Override
+ @SuppressWarnings("SynchronizeOnNonFinalField")
public String toString() {
synchronized (lock) {
return IO.toString(out);
Modified:
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/AngleFormat.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/AngleFormat.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/AngleFormat.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/measure/AngleFormat.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -405,6 +405,7 @@ public class AngleFormat extends Format
*
* @param locale The locale to use.
*/
+ @SuppressWarnings("PointlessBitwiseExpression") // We rely on the
compiler for simplifying the expression.
public AngleFormat(final Locale locale) {
ArgumentChecks.ensureNonNull("locale", locale);
this.locale = locale;
@@ -902,6 +903,7 @@ public class AngleFormat extends Format
*
* @return The {@code toAppendTo} buffer, returned for method calls
chaining.
*/
+ @SuppressWarnings("PointlessBitwiseExpression") // We rely on the
compiler for simplifying the expression.
public StringBuffer format(final double angle, StringBuffer toAppendTo,
final FieldPosition pos) {
final int offset = toAppendTo.length();
final int fieldPos = getField(pos);
@@ -1328,7 +1330,7 @@ public class AngleFormat extends Format
* specifies if spaces can be accepted as a field separator. For example
if {@code true},
* then "45 30" will be parsed as "45°30".
*/
- @SuppressWarnings("fallthrough")
+ @SuppressWarnings({"fallthrough", "UnnecessaryLabelOnBreakStatement"})
private Angle parse(final String source, final ParsePosition pos, final
boolean spaceAsSeparator) {
double degrees;
double minutes = NaN;
Modified:
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/Locales.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/Locales.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/Locales.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/Locales.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -118,7 +118,7 @@ public final class Locales extends Stati
}
if (alpha3 != 0 && alpha3 != alpha2) {
final Short p = map.put(alpha3, alpha2);
- if (p != null && p.shortValue() != alpha2) {
+ if (p != null && p != alpha2) {
// We do not expect any conflict. But if it happen
anyway, conservatively
// remember that we should not perform any
substitution for that code.
map.put(alpha3, CONFLICT);
@@ -191,8 +191,8 @@ public final class Locales extends Stati
locales = Locale.getAvailableLocales();
filter: for (final Locale locale : locales) {
final String code = locale.getLanguage();
- for (int i=0; i<languages.length; i++) {
- if (code.equals(languages[i])) {
+ for (final String language : languages) {
+ if (code.equals(language)) {
locales[count++] = unique(locale);
continue filter;
}
Modified:
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTables.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTables.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTables.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTables.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -213,7 +213,7 @@ public final class TreeTables extends St
}
}
filtered = ArraysExt.resize(filtered, count);
- return replaceCharSequences(table.getRoot(), filtered, locale, new
HashMap<String,String>());
+ return replaceCharSequences(table.getRoot(), filtered, locale, new
HashMap<>());
}
/**
Modified:
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultScopedName.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultScopedName.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultScopedName.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultScopedName.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -161,6 +161,7 @@ public class DefaultScopedName extends A
* @param path The first part to concatenate.
* @param tail The second part to concatenate.
*/
+ @SuppressWarnings("SuspiciousToArrayCall")
protected DefaultScopedName(final GenericName path, final GenericName
tail) {
ArgumentChecks.ensureNonNull("path", path);
ArgumentChecks.ensureNonNull("tail", tail);
Modified:
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/logging/DualLogger.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/logging/DualLogger.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/logging/DualLogger.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/logging/DualLogger.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -31,10 +31,12 @@ import java.util.logging.Logger;
* @version 0.3
* @module
*/
+@SuppressWarnings("ClassWithMultipleLoggers")
final class DualLogger extends LoggerAdapter {
/**
* The two loggers.
*/
+ @SuppressWarnings("NonConstantLogger")
private final Logger first, second;
/**
Modified:
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/NilReason.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/NilReason.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/NilReason.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/NilReason.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -442,6 +442,7 @@ public final class NilReason implements
*
* @throws IllegalArgumentException If the given type is not a supported
type.
*/
+ @SuppressWarnings({"RedundantStringConstructorCall",
"BooleanConstructorCall"})
private static Object createNilPrimitive(final Class<?> type) {
if (type == String .class) return new String(""); // REALLY
need a new instance.
if (type == Boolean.class) return new Boolean(false); // REALLY
need a new instance, not Boolean.FALSE.
@@ -463,8 +464,8 @@ public final class NilReason implements
*/
private static boolean mayBeNil(final Object object) {
// 'instanceof' checks on instances of final classes are expected to
be very fast.
- if (object instanceof String) return ((String) object).isEmpty();
- if (object instanceof Boolean) return ((Boolean)
object).booleanValue() == false && object != Boolean.FALSE;
+ if (object instanceof String) return ((String) object).isEmpty();
+ if (object instanceof Boolean) return !((Boolean) object) && (object
!= Boolean.FALSE);
if (object instanceof Number) {
/*
* Following test may return false positives for Long, Float and
Double types, but this is okay
Modified:
sis/branches/JDK8/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/DecoderWrapper.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/DecoderWrapper.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/DecoderWrapper.java
[UTF-8] (original)
+++
sis/branches/JDK8/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/DecoderWrapper.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -132,6 +132,8 @@ public final class DecoderWrapper extend
* Returns the path which is currently set. The array returned by this
method may be only
* a subset of the array given to {@link #setSearchPath(String[])} since
only the name of
* groups which have been found in the NetCDF file are returned by this
method.
+ *
+ * @return The current search path.
*/
@Override
public String[] getSearchPath() {
@@ -269,6 +271,8 @@ public final class DecoderWrapper extend
/**
* Returns the globally unique dataset identifier as determined by the
UCAR library.
+ *
+ * @return The global dataset identifier, or {@code null} if none.
*/
@Override
public String getId() {
@@ -277,6 +281,8 @@ public final class DecoderWrapper extend
/**
* Returns the human readable title as determined by the UCAR library.
+ *
+ * @return The dataset title, or {@code null} if none.
*/
@Override
public String getTitle() {
@@ -286,8 +292,11 @@ public final class DecoderWrapper extend
/**
* Returns all variables found in the NetCDF file.
* This method returns a direct reference to an internal array - do not
modify.
+ *
+ * @return All variables, or an empty array if none.
*/
@Override
+ @SuppressWarnings("null")
public Variable[] getVariables() {
if (variables == null) {
final List<Dimension> dimensions = file.getDimensions();
@@ -303,8 +312,12 @@ public final class DecoderWrapper extend
/**
* Returns all grid geometries (related to coordinate systems) found in
the NetCDF file.
* This method returns a direct reference to an internal array - do not
modify.
+ *
+ * @return All grid geometries, or an empty array if none.
+ * @throws IOException If an I/O operation was necessary but failed.
*/
@Override
+ @SuppressWarnings("null")
public GridGeometry[] getGridGeometries() throws IOException {
if (geometries == null) {
List<CoordinateSystem> systems = null;
Modified:
sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/ChannelDecoderTest.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/ChannelDecoderTest.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/ChannelDecoderTest.java
[UTF-8] (original)
+++
sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/ChannelDecoderTest.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -44,6 +44,9 @@ import static org.junit.Assert.*;
public final strictfp class ChannelDecoderTest extends DecoderTest {
/**
* Creates a new decoder for dataset of the given name.
+ *
+ * @return The decoder for the given name.
+ * @throws IOException If an error occurred while opening the file.
*/
@Override
protected Decoder createDecoder(final String name) throws IOException {
@@ -80,6 +83,8 @@ public final strictfp class ChannelDecod
/**
* Unconditionally returns {@code false} since {@link ChannelDecoder}
* supports only the classic and 64 bits NetCDF formats.
+ *
+ * @return {@code false}.
*/
@Override
protected boolean isSupplementalFormatSupported(final String format) {
Modified:
sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/GridGeometryInfoTest.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/GridGeometryInfoTest.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/GridGeometryInfoTest.java
[UTF-8] (original)
+++
sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/GridGeometryInfoTest.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -38,6 +38,9 @@ import org.apache.sis.test.DependsOn;
public final strictfp class GridGeometryInfoTest extends GridGeometryTest {
/**
* Creates a new decoder for dataset of the given name.
+ *
+ * @return The decoder for the given name.
+ * @throws IOException If an error occurred while opening the file.
*/
@Override
protected Decoder createDecoder(final String name) throws IOException {
@@ -47,6 +50,8 @@ public final strictfp class GridGeometry
/**
* Unconditionally returns {@code false} since {@link ChannelDecoder}
* supports only the classic and 64 bits NetCDF formats.
+ *
+ * @return {@code false}.
*/
@Override
protected boolean isSupplementalFormatSupported(final String format) {
@@ -56,6 +61,8 @@ public final strictfp class GridGeometry
/**
* Filters out the one-dimensional coordinate systems created by {@code
GridGeometry}
* but not by the UCAR library.
+ *
+ * @return The filtered grid geometries to test.
*/
@Override
protected GridGeometry[] filter(final GridGeometry[] geometries) {
Modified:
sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/VariableInfoTest.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/VariableInfoTest.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/VariableInfoTest.java
[UTF-8] (original)
+++
sis/branches/JDK8/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/VariableInfoTest.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -36,6 +36,9 @@ import org.apache.sis.test.DependsOn;
public final strictfp class VariableInfoTest extends VariableTest {
/**
* Creates a new decoder for dataset of the given name.
+ *
+ * @return The decoder for the given dataset.
+ * @throws IOException If an error occurred while opening the file.
*/
@Override
protected Decoder createDecoder(final String name) throws IOException {
@@ -45,6 +48,8 @@ public final strictfp class VariableInfo
/**
* Unconditionally returns {@code false} since {@link ChannelDecoder}
* supports only the classic and 64 bits NetCDF formats.
+ *
+ * @return {@code false}.
*/
@Override
protected boolean isSupplementalFormatSupported(final String format) {
Modified:
sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/xml/MimeTypeDetector.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/xml/MimeTypeDetector.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/xml/MimeTypeDetector.java
[UTF-8] (original)
+++
sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/xml/MimeTypeDetector.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -57,7 +57,7 @@ abstract class MimeTypeDetector {
/**
* The {@code "xmlns"} string as a sequence of bytes.
*/
- private static byte[] XMLNS = {'x','m','l','n','s'};
+ private static final byte[] XMLNS = {'x','m','l','n','s'};
/**
* The maximal US-ASCII value, inclusive.
@@ -234,7 +234,6 @@ abstract class MimeTypeDetector {
// Skip everything up to the next space, and check again.
while ((c = read()) >= ' ');
if (c < 0) return null;
- continue;
}
/*
* At this point, we found the "xmlns" attribute for the prefix of the
root element.
Modified:
sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/xml/XMLStoreProvider.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/xml/XMLStoreProvider.java?rev=1692101&r1=1692100&r2=1692101&view=diff
==============================================================================
---
sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/xml/XMLStoreProvider.java
[UTF-8] (original)
+++
sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/xml/XMLStoreProvider.java
[UTF-8] Tue Jul 21 12:47:01 2015
@@ -63,6 +63,9 @@ public class XMLStoreProvider extends Da
* Returning {@code SUPPORTED} from this method does not guarantee that
reading or writing will succeed,
* only that there appears to be a reasonable chance of success based on a
brief inspection of the storage
* header.
+ *
+ * @return {@link ProbeResult#SUPPORTED} if the given storage seems to be
readable as a XML file.
+ * @throws DataStoreException if an I/O or SQL error occurred.
*/
@Override
public ProbeResult probeContent(final StorageConnector storage) throws
DataStoreException {