Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapWithSpecialCases.java URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapWithSpecialCases.java?rev=1692168&r1=1692167&r2=1692168&view=diff ============================================================================== --- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapWithSpecialCases.java [UTF-8] (original) +++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapWithSpecialCases.java [UTF-8] Tue Jul 21 16:41:12 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 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 * as-is under the {@code HREF} key.

+ * + * @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 *

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.

+ * + * @param 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/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Boolean.java URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Boolean.java?rev=1692168&r1=1692167&r2=1692168&view=diff ============================================================================== --- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Boolean.java [UTF-8] (original) +++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Boolean.java [UTF-8] Tue Jul 21 16:41:12 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/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Integer.java URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Integer.java?rev=1692168&r1=1692167&r2=1692168&view=diff ============================================================================== --- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Integer.java [UTF-8] (original) +++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Integer.java [UTF-8] Tue Jul 21 16:41:12 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/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Integer64.java URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Integer64.java?rev=1692168&r1=1692167&r2=1692168&view=diff ============================================================================== --- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Integer64.java [UTF-8] (original) +++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_Integer64.java [UTF-8] Tue Jul 21 16:41:12 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/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/PropertyType.java URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/PropertyType.java?rev=1692168&r1=1692167&r2=1692168&view=diff ============================================================================== --- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/PropertyType.java [UTF-8] (original) +++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/PropertyType.java [UTF-8] Tue Jul 21 16:41:12 2015 @@ -212,9 +212,10 @@ public abstract class PropertyType type = getBoundType(); final Context context = Context.current(); final ReferenceResolver resolver = Context.resolver(context); - final Class 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/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/TimeInstant.java URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/TimeInstant.java?rev=1692168&r1=1692167&r2=1692168&view=diff ============================================================================== --- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/TimeInstant.java [UTF-8] (original) +++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/TimeInstant.java [UTF-8] Tue Jul 21 16:41:12 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/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/system/DelayedRunnable.java URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/system/DelayedRunnable.java?rev=1692168&r1=1692167&r2=1692168&view=diff ============================================================================== --- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/system/DelayedRunnable.java [UTF-8] (original) +++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/system/DelayedRunnable.java [UTF-8] Tue Jul 21 16:41:12 2015 @@ -115,6 +115,8 @@ public abstract class DelayedRunnable im /** * {@inheritDoc} + * + * @return {@inheritDoc} */ @Override public final int compareTo(final Delayed other) { Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/system/OS.java URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/system/OS.java?rev=1692168&r1=1692167&r2=1692168&view=diff ============================================================================== --- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/system/OS.java [UTF-8] (original) +++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/system/OS.java [UTF-8] Tue Jul 21 16:41:12 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/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/system/SystemListener.java URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/system/SystemListener.java?rev=1692168&r1=1692167&r2=1692168&view=diff ============================================================================== --- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/system/SystemListener.java [UTF-8] (original) +++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/internal/system/SystemListener.java [UTF-8] Tue Jul 21 16:41:12 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/JDK6/core/sis-utility/src/main/java/org/apache/sis/io/AppendableWriter.java URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/io/AppendableWriter.java?rev=1692168&r1=1692167&r2=1692168&view=diff ============================================================================== --- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/io/AppendableWriter.java [UTF-8] (original) +++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/io/AppendableWriter.java [UTF-8] Tue Jul 21 16:41:12 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/JDK6/core/sis-utility/src/main/java/org/apache/sis/math/MathFunctions.java URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/math/MathFunctions.java?rev=1692168&r1=1692167&r2=1692168&view=diff ============================================================================== --- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/math/MathFunctions.java [UTF-8] (original) +++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/math/MathFunctions.java [UTF-8] Tue Jul 21 16:41:12 2015 @@ -57,7 +57,7 @@ import static org.apache.sis.internal.ut * * @author Martin Desruisseaux (MPO, IRD, Geomatys) * @since 0.3 - * @version 0.4 + * @version 0.6 * @module * * @see DecimalFunctions @@ -312,8 +312,38 @@ public final class MathFunctions extends } /** + * Returns the inverse hyperbolic sine of the given value. + * This is the inverse of the {@link Math#sinh(double)} method. + * + * @param x The value for which to compute the inverse hyperbolic sine. + * @return The inverse hyperbolic sine of the given value. + * + * @see Math#sinh(double) + * + * @since 0.6 + */ + public static double asinh(final double x) { + return Math.log(x + Math.sqrt(x*x + 1)); + } + + /** + * Returns the inverse hyperbolic cosine of the given value. + * This is the inverse of the {@link Math#cosh(double)} method. + * + * @param x The value for which to compute the inverse hyperbolic cosine. + * @return The inverse hyperbolic cosine of the given value. + * + * @see Math#cosh(double) + * + * @since 0.6 + */ + public static double acosh(final double x) { + return Math.log(x + Math.sqrt(x*x - 1)); + } + + /** * Returns the inverse hyperbolic tangent of the given value. - * This is the inverse of the {@linkplain Math#tanh(double) tanh} method. + * This is the inverse of the {@link Math#tanh(double)} method. * The range of input values shall be in the [-1 … 1]. * Special cases: * Modified: sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/measure/AngleFormat.java URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/measure/AngleFormat.java?rev=1692168&r1=1692167&r2=1692168&view=diff ============================================================================== --- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/measure/AngleFormat.java [UTF-8] (original) +++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/measure/AngleFormat.java [UTF-8] Tue Jul 21 16:41:12 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/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/Locales.java URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/Locales.java?rev=1692168&r1=1692167&r2=1692168&view=diff ============================================================================== --- sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/Locales.java [UTF-8] (original) +++ sis/branches/JDK6/core/sis-utility/src/main/java/org/apache/sis/util/Locales.java [UTF-8] Tue Jul 21 16:41:12 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 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/JDK6/core/sis-utility/src/test/java/org/apache/sis/math/MathFunctionsTest.java URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/math/MathFunctionsTest.java?rev=1692168&r1=1692167&r2=1692168&view=diff ============================================================================== --- sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/math/MathFunctionsTest.java [UTF-8] (original) +++ sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/math/MathFunctionsTest.java [UTF-8] Tue Jul 21 16:41:12 2015 @@ -149,6 +149,30 @@ public final strictfp class MathFunction } /** + * Tests the {@link MathFunctions#asinh(double)} method in the [-10 … +10] range. + */ + @Test + public void testAsinh() { + for (int i=-100; i<=100; i++) { + final double x = 0.1 * i; + final double y = asinh(x); + assertEquals(x, StrictMath.sinh(y), EPS); + } + } + + /** + * Tests the {@link MathFunctions#acosh(double)} method in the [1 … +10] range. + */ + @Test + public void testAcosh() { + for (int i=10; i<=100; i++) { + final double x = 0.1 * i; + final double y = acosh(x); + assertEquals(x, StrictMath.cosh(y), EPS); + } + } + + /** * Tests the {@link MathFunctions#atanh(double)} method in the [-1 … +1] range. */ @Test Modified: sis/branches/JDK6/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/DecoderWrapper.java URL: http://svn.apache.org/viewvc/sis/branches/JDK6/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/DecoderWrapper.java?rev=1692168&r1=1692167&r2=1692168&view=diff ============================================================================== --- sis/branches/JDK6/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/DecoderWrapper.java [UTF-8] (original) +++ sis/branches/JDK6/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/DecoderWrapper.java [UTF-8] Tue Jul 21 16:41:12 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 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 systems = null; Modified: sis/branches/JDK6/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/ChannelDecoderTest.java URL: http://svn.apache.org/viewvc/sis/branches/JDK6/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/ChannelDecoderTest.java?rev=1692168&r1=1692167&r2=1692168&view=diff ============================================================================== --- sis/branches/JDK6/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/ChannelDecoderTest.java [UTF-8] (original) +++ sis/branches/JDK6/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/ChannelDecoderTest.java [UTF-8] Tue Jul 21 16:41:12 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/JDK6/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/GridGeometryInfoTest.java URL: http://svn.apache.org/viewvc/sis/branches/JDK6/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/GridGeometryInfoTest.java?rev=1692168&r1=1692167&r2=1692168&view=diff ============================================================================== --- sis/branches/JDK6/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/GridGeometryInfoTest.java [UTF-8] (original) +++ sis/branches/JDK6/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/GridGeometryInfoTest.java [UTF-8] Tue Jul 21 16:41:12 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/JDK6/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/VariableInfoTest.java URL: http://svn.apache.org/viewvc/sis/branches/JDK6/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/VariableInfoTest.java?rev=1692168&r1=1692167&r2=1692168&view=diff ============================================================================== --- sis/branches/JDK6/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/VariableInfoTest.java [UTF-8] (original) +++ sis/branches/JDK6/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/VariableInfoTest.java [UTF-8] Tue Jul 21 16:41:12 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/JDK6/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/xml/MimeTypeDetector.java URL: http://svn.apache.org/viewvc/sis/branches/JDK6/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/xml/MimeTypeDetector.java?rev=1692168&r1=1692167&r2=1692168&view=diff ============================================================================== --- sis/branches/JDK6/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/xml/MimeTypeDetector.java [UTF-8] (original) +++ sis/branches/JDK6/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/xml/MimeTypeDetector.java [UTF-8] Tue Jul 21 16:41:12 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/JDK6/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/xml/XMLStoreProvider.java URL: http://svn.apache.org/viewvc/sis/branches/JDK6/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/xml/XMLStoreProvider.java?rev=1692168&r1=1692167&r2=1692168&view=diff ============================================================================== --- sis/branches/JDK6/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/xml/XMLStoreProvider.java [UTF-8] (original) +++ sis/branches/JDK6/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/xml/XMLStoreProvider.java [UTF-8] Tue Jul 21 16:41:12 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 {