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 2014/02/19 22:32:00 UTC
svn commit: r1569926 [6/6] - in /sis/branches/JDK6: ./
core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/
core/sis-metadata/src/main/java/org/apache/sis/io/
core/sis-metadata/src/main/java/org/apache/sis/io/wkt/
core/sis-metadata/src/mai...
Modified: sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/util/collection/CodeListSetTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/util/collection/CodeListSetTest.java?rev=1569926&r1=1569925&r2=1569926&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/util/collection/CodeListSetTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/util/collection/CodeListSetTest.java [UTF-8] Wed Feb 19 21:31:56 2014
@@ -34,7 +34,7 @@ import static org.opengis.referencing.cs
/**
- * Test the {@link CodeListSet} implementation.
+ * Tests the {@link CodeListSet} implementation.
*
* @author Martin Desruisseaux (Geomatys)
* @since 0.3
Modified: sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/util/collection/DefaultTreeTableTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/util/collection/DefaultTreeTableTest.java?rev=1569926&r1=1569925&r2=1569926&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/util/collection/DefaultTreeTableTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/util/collection/DefaultTreeTableTest.java [UTF-8] Wed Feb 19 21:31:56 2014
@@ -50,7 +50,7 @@ public final strictfp class DefaultTreeT
* after this one.
*/
@TestStep
- private static DefaultTreeTable testTableCreation() {
+ public static DefaultTreeTable testTableCreation() {
final DefaultTreeTable table = new DefaultTreeTable(NAME, TYPE);
assertEquals("Number of columns:", 2, table.columnIndices.size());
assertEquals("Index of first column:", Integer.valueOf(0), table.columnIndices.get(NAME));
@@ -71,7 +71,7 @@ public final strictfp class DefaultTreeT
* @return The root node produced by this method.
*/
@TestStep
- private static DefaultTreeTable.Node testNodeCreation(final DefaultTreeTable table) {
+ public static DefaultTreeTable.Node testNodeCreation(final DefaultTreeTable table) {
/*
* Create a root node with an initially empty list of children.
*/
@@ -114,7 +114,7 @@ public final strictfp class DefaultTreeT
* @param root The root node where to move children.
*/
@TestStep
- private static void testNodeDisplacement(final TreeTable.Node root) {
+ public static void testNodeDisplacement(final TreeTable.Node root) {
final Collection<TreeTable.Node> rootChildren, nodeChildren;
final TreeTable.Node node1 = getSingleton(rootChildren = root .getChildren());
final TreeTable.Node node2 = getSingleton(nodeChildren = node1.getChildren());
@@ -142,10 +142,11 @@ public final strictfp class DefaultTreeT
* <p>This method is part of a chain.
* The previous method is {@link #testNodeDisplacement(TreeTable.Node)}.</p>
*
+ * @param table The table to clone.
* @throws CloneNotSupportedException Should never happen.
*/
@TestStep
- private void testClone(final DefaultTreeTable table) throws CloneNotSupportedException {
+ public static void testClone(final DefaultTreeTable table) throws CloneNotSupportedException {
final TreeTable newTable = table.clone();
assertNotSame("clone", table, newTable);
assertEquals("newTable.equals(table)", table, newTable);
@@ -159,9 +160,11 @@ public final strictfp class DefaultTreeT
*
* <p>This method is part of a chain.
* The previous method is {@link #testNodeDisplacement(TreeTable.Node)}.</p>
+ *
+ * @param table The table to serialize.
*/
@TestStep
- private void testSerialization(final TreeTable table) {
+ public static void testSerialization(final TreeTable table) {
final TreeTable newTable = assertSerializedEquals(table);
getChildrenList(newTable).get(1).setValue(NAME, "New name");
assertFalse("newTable.equals(table)", newTable.equals(table));
Modified: sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/util/logging/MonolineFormatterTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/util/logging/MonolineFormatterTest.java?rev=1569926&r1=1569925&r2=1569926&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/util/logging/MonolineFormatterTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/util/logging/MonolineFormatterTest.java [UTF-8] Wed Feb 19 21:31:56 2014
@@ -58,10 +58,19 @@ public final strictfp class MonolineForm
* The given string shall use tabulation before each line of the message.
*/
private static String localize(final Level level, final String expected) {
- final String label = level.getLocalizedName();
- CharSequence text = CharSequences.replace(expected, level.getName(), label);
- text = CharSequences.replace(text, "\t", CharSequences.spaces(MonolineFormatter.levelWidth(null) - label.length()));
- return text.toString();
+ final String levelToReplace = level.getName();
+ final String levelLocalized = level.getLocalizedName();
+ assertTrue(expected, expected.startsWith(levelToReplace));
+ final int margin = MonolineFormatter.levelWidth(null);
+ final StringBuilder buffer = new StringBuilder(expected.length() + 40)
+ .append(levelLocalized)
+ .append(CharSequences.spaces(margin - levelLocalized.length()))
+ .append(expected, levelToReplace.length() + 1, expected.length()); // +1 is for skipping '\t'.
+ final String spaces = CharSequences.spaces(margin).toString();
+ for (int i=margin; (i=buffer.indexOf("\n\t", i)) >= 0; i += margin) {
+ buffer.replace(++i, i+1, spaces); // Replace only tabulation, leave new line.
+ }
+ return buffer.toString();
}
/**
@@ -74,8 +83,8 @@ public final strictfp class MonolineForm
final String formatted = formatter.format(record);
assertMultilinesEquals(localize(Level.INFO,
"INFO\t First line\n" +
- " \t Indented line\n" +
- " \t Last line\n"), formatted);
+ "\t Indented line\n" +
+ "\t Last line\n"), formatted);
}
/**
@@ -94,9 +103,9 @@ public final strictfp class MonolineForm
String formatted = formatter.format(record);
assertMultilinesEquals(localize(Level.WARNING,
"WARNING\t An exception occured.\n" +
- " \t Caused by: java.lang.Exception\n" +
- " \t at org.apache.sis.NonExistent.foo(NonExistent.java:10)\n" +
- " \t at org.junit.WhoKnows.main(WhoKnows.java:20)\n"), formatted);
+ "\t Caused by: java.lang.Exception\n" +
+ "\t at org.apache.sis.NonExistent.foo(NonExistent.java:10)\n" +
+ "\t at org.junit.WhoKnows.main(WhoKnows.java:20)\n"), formatted);
/*
* Remove the message and try again.
*/
@@ -104,7 +113,7 @@ public final strictfp class MonolineForm
formatted = formatter.format(record);
assertMultilinesEquals(localize(Level.WARNING,
"WARNING\t java.lang.Exception\n" +
- " \t at org.apache.sis.NonExistent.foo(NonExistent.java:10)\n" +
- " \t at org.junit.WhoKnows.main(WhoKnows.java:20)\n"), formatted);
+ "\t at org.apache.sis.NonExistent.foo(NonExistent.java:10)\n" +
+ "\t at org.junit.WhoKnows.main(WhoKnows.java:20)\n"), formatted);
}
}
Modified: sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/xml/ValueConverterTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/xml/ValueConverterTest.java?rev=1569926&r1=1569925&r2=1569926&view=diff
==============================================================================
--- sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/xml/ValueConverterTest.java [UTF-8] (original)
+++ sis/branches/JDK6/core/sis-utility/src/test/java/org/apache/sis/xml/ValueConverterTest.java [UTF-8] Wed Feb 19 21:31:56 2014
@@ -24,7 +24,7 @@ import static org.apache.sis.test.Assert
/**
- * Tests {@link ValueConverter}.
+ * Tests the {@link ValueConverter} class.
*
* @author Martin Desruisseaux (Geomatys)
* @since 0.4
Modified: sis/branches/JDK6/pom.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/pom.xml?rev=1569926&r1=1569925&r2=1569926&view=diff
==============================================================================
--- sis/branches/JDK6/pom.xml (original)
+++ sis/branches/JDK6/pom.xml Wed Feb 19 21:31:56 2014
@@ -672,7 +672,7 @@ Apache SIS is a free software, Java lang
</group>
<group>
<title>Referencing</title>
- <packages>org.apache.sis.referencing*:org.apache.sis.parameter*:org.apache.sis.io.wkt</packages>
+ <packages>org.apache.sis.referencing*:org.apache.sis.parameter*</packages>
</group>
<group>
<title>Metadata</title>
@@ -680,7 +680,7 @@ Apache SIS is a free software, Java lang
</group>
<group>
<title>Utilities</title>
- <packages>org.apache.sis.math*:org.apache.sis.measure*:org.apache.sis.util*:org.apache.sis.io:org.apache.sis.xml*:org.apache.sis.setup*</packages>
+ <packages>org.apache.sis.math*:org.apache.sis.measure*:org.apache.sis.util*:org.apache.sis.io*:org.apache.sis.xml*:org.apache.sis.setup*</packages>
</group>
<group>
<title>Profiles</title>
Modified: sis/branches/JDK6/src/main/docbook/book.entities
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/src/main/docbook/book.entities?rev=1569926&r1=1569925&r2=1569926&view=diff
==============================================================================
--- sis/branches/JDK6/src/main/docbook/book.entities (original)
+++ sis/branches/JDK6/src/main/docbook/book.entities Wed Feb 19 21:31:56 2014
@@ -1,4 +1,4 @@
-<!ENTITY geoapi-version "3.1-M04">
+<!ENTITY geoapi-version "3.1-SNAPSHOT">
<!ENTITY geoapi-release "3.0.0">
<!ENTITY sis-release "0.4-jdk6-SNAPSHOT">
<!ENTITY gml-version "3.3">
Modified: sis/branches/JDK6/src/main/javadoc/stylesheet.css
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/src/main/javadoc/stylesheet.css?rev=1569926&r1=1569925&r2=1569926&view=diff
==============================================================================
--- sis/branches/JDK6/src/main/javadoc/stylesheet.css (original)
+++ sis/branches/JDK6/src/main/javadoc/stylesheet.css Wed Feb 19 21:31:56 2014
@@ -64,6 +64,7 @@ table.compact {
border-spacing: 0pt;
padding: 0pt;
line-height: 1em;
+ text-align: left;
}
table.compact tr td {
@@ -71,6 +72,7 @@ table.compact tr td {
padding-bottom: 0pt;
padding-right: 3pt;
padding-left: 3pt;
+ vertical-align: text-top;
}
table.compact tr td.onright {
Modified: sis/branches/JDK6/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/AttributeNames.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/AttributeNames.java?rev=1569926&r1=1569925&r2=1569926&view=diff
==============================================================================
--- sis/branches/JDK6/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/AttributeNames.java [UTF-8] (original)
+++ sis/branches/JDK6/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/AttributeNames.java [UTF-8] Wed Feb 19 21:31:56 2014
@@ -22,7 +22,6 @@ package org.apache.sis.storage.netcdf;
* the compiled file of this class should have no dependency to the UCAR packages.
*/
import java.io.Serializable;
-import ucar.nc2.Group;
import ucar.nc2.NetcdfFile;
import ucar.nc2.VariableSimpleIF;
import ucar.nc2.constants.CF;
Modified: sis/branches/JDK6/storage/sis-storage/src/main/java/org/apache/sis/storage/DataStoreRegistry.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/storage/sis-storage/src/main/java/org/apache/sis/storage/DataStoreRegistry.java?rev=1569926&r1=1569925&r2=1569926&view=diff
==============================================================================
--- sis/branches/JDK6/storage/sis-storage/src/main/java/org/apache/sis/storage/DataStoreRegistry.java [UTF-8] (original)
+++ sis/branches/JDK6/storage/sis-storage/src/main/java/org/apache/sis/storage/DataStoreRegistry.java [UTF-8] Wed Feb 19 21:31:56 2014
@@ -85,7 +85,7 @@ final class DataStoreRegistry {
* The {@code storage} argument can be any of the following types:
*
* <ul>
- * <li>A {@link java.nio.file.Path} or a {@link java.io.File} for a file or a directory.</li>
+ * <li>A {@link java.io.File} for a file or a directory.</li>
* <li>A {@link java.net.URI} or a {@link java.net.URL} to a distant resource.</li>
* <li>A {@link java.lang.CharSequence} interpreted as a filename or a URL.</li>
* <li>A {@link java.nio.channels.Channel}, {@link java.io.DataInput}, {@link java.io.InputStream} or {@link java.io.Reader}.</li>
Modified: sis/branches/JDK6/storage/sis-storage/src/main/java/org/apache/sis/storage/DataStores.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/storage/sis-storage/src/main/java/org/apache/sis/storage/DataStores.java?rev=1569926&r1=1569925&r2=1569926&view=diff
==============================================================================
--- sis/branches/JDK6/storage/sis-storage/src/main/java/org/apache/sis/storage/DataStores.java [UTF-8] (original)
+++ sis/branches/JDK6/storage/sis-storage/src/main/java/org/apache/sis/storage/DataStores.java [UTF-8] Wed Feb 19 21:31:56 2014
@@ -93,7 +93,7 @@ public final class DataStores extends St
* The {@code storage} argument can be any of the following types:
*
* <ul>
- * <li>A {@link java.nio.file.Path} or a {@link java.io.File} for a file or a directory.</li>
+ * <li>A {@link java.io.File} for a file or a directory.</li>
* <li>A {@link java.net.URI} or a {@link java.net.URL} to a distant resource.</li>
* <li>A {@link java.lang.CharSequence} interpreted as a filename or a URL.</li>
* <li>A {@link java.nio.channels.Channel}, {@link java.io.DataInput}, {@link java.io.InputStream} or {@link java.io.Reader}.</li>
Modified: sis/branches/JDK6/storage/sis-storage/src/main/java/org/apache/sis/storage/ProbeResult.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/storage/sis-storage/src/main/java/org/apache/sis/storage/ProbeResult.java?rev=1569926&r1=1569925&r2=1569926&view=diff
==============================================================================
--- sis/branches/JDK6/storage/sis-storage/src/main/java/org/apache/sis/storage/ProbeResult.java [UTF-8] (original)
+++ sis/branches/JDK6/storage/sis-storage/src/main/java/org/apache/sis/storage/ProbeResult.java [UTF-8] Wed Feb 19 21:31:56 2014
@@ -17,7 +17,6 @@
package org.apache.sis.storage;
import java.io.Serializable;
-import java.io.ObjectStreamException;
import org.apache.sis.util.Debug;
import org.apache.sis.util.Version;
import org.apache.sis.internal.util.Utilities;
@@ -287,7 +286,7 @@ public class ProbeResult implements Seri
* okay if all comparisons are performed by the {@code equals} method instead
* than the {@code ==} operator.
*/
- Object readResolve() throws ObjectStreamException {
+ Object readResolve() {
try {
return ProbeResult.class.getField(name).get(null);
} catch (Exception e) { // ReflectiveOperationException on the JDK7 branch.
Modified: sis/branches/JDK6/storage/sis-storage/src/main/java/org/apache/sis/storage/StorageConnector.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/storage/sis-storage/src/main/java/org/apache/sis/storage/StorageConnector.java?rev=1569926&r1=1569925&r2=1569926&view=diff
==============================================================================
--- sis/branches/JDK6/storage/sis-storage/src/main/java/org/apache/sis/storage/StorageConnector.java [UTF-8] (original)
+++ sis/branches/JDK6/storage/sis-storage/src/main/java/org/apache/sis/storage/StorageConnector.java [UTF-8] Wed Feb 19 21:31:56 2014
@@ -54,7 +54,7 @@ import org.apache.sis.internal.jdk7.JDK7
* {@code StorageConnector} wraps an input {@link Object}, which can be any of the following types:
*
* <ul>
- * <li>A {@link java.nio.file.Path} or a {@link java.io.File} for a file or a directory.</li>
+ * <li>A {@link java.io.File} for a file or a directory.</li>
* <li>A {@link java.net.URI} or a {@link java.net.URL} to a distant resource.</li>
* <li>A {@link CharSequence} interpreted as a filename or a URL.</li>
* <li>A {@link java.nio.channels.Channel}, {@link DataInput}, {@link InputStream} or {@link Reader}.</li>
@@ -227,8 +227,8 @@ public class StorageConnector implements
* the following choices based on the type of the {@linkplain #getStorage() storage} object:
*
* <ul>
- * <li>For {@link java.nio.file.Path}, {@link java.io.File}, {@link java.net.URI} or {@link java.net.URL}
- * instances, this method uses dedicated API like {@link java.nio.file.Path#getFileName()}.</li>
+ * <li>For {@link java.io.File}, {@link java.net.URI} or {@link java.net.URL}
+ * instances, this method uses dedicated API.</li>
* <li>For {@link CharSequence} instances, this method gets a string representation of the storage object
* and returns the part after the last {@code '/'} character or platform-dependent name separator.</li>
* <li>For instances of unknown type, this method builds a string representation using the class name.
@@ -252,7 +252,7 @@ public class StorageConnector implements
* the following choices based on the type of the {@linkplain #getStorage() storage} object:
*
* <ul>
- * <li>For {@link java.nio.file.Path}, {@link java.io.File}, {@link java.net.URI}, {@link java.net.URL} or
+ * <li>For {@link java.io.File}, {@link java.net.URI}, {@link java.net.URL} or
* {@link CharSequence} instances, this method returns the string after the last {@code '.'} character
* in the filename, provided that the {@code '.'} is not the first filename character. This may be an
* empty string if the filename has no extension, but never {@code null}.</li>
@@ -276,7 +276,7 @@ public class StorageConnector implements
* <ul>
* <li>{@link String}:
* <ul>
- * <li>If the {@linkplain #getStorage() storage} object is an instance of the {@link java.nio.file.Path},
+ * <li>If the {@linkplain #getStorage() storage} object is an instance of the
* {@link java.io.File}, {@link java.net.URL}, {@link java.net.URI} or {@link CharSequence} types,
* returns the string representation of their path.</li>
*
@@ -297,7 +297,7 @@ public class StorageConnector implements
* (including the {@link ImageInputStream} and {@link javax.imageio.stream.ImageOutputStream} types),
* then it is returned unchanged.</li>
*
- * <li>Otherwise if the input is an instance of {@link java.nio.file.Path}, {@link java.io.File},
+ * <li>Otherwise if the input is an instance of {@link java.io.File},
* {@link java.net.URI}, {@link java.net.URL}, {@link CharSequence}, {@link InputStream} or
* {@link java.nio.channels.ReadableByteChannel}, then an {@link ImageInputStream} backed by a
* {@link ByteBuffer} is created when first needed and returned.</li>