sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1553061 - in /sis/branches/JDK7/core/sis-utility/src: main/java/org/apache/sis/io/TableAppender.java main/java/org/apache/sis/util/ThreadSafe.java main/java/org/apache/sis/xml/Namespaces.java test/java/org/apache/sis/io/EchoAppendable.java
Date Mon, 23 Dec 2013 03:07:32 GMT
Author: desruisseaux
Date: Mon Dec 23 03:07:28 2013
New Revision: 1553061

URL: http://svn.apache.org/r1553061
Log:
Minor javadoc improvement.

Modified:
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/io/TableAppender.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/ThreadSafe.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/xml/Namespaces.java
    sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/io/EchoAppendable.java

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/io/TableAppender.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/io/TableAppender.java?rev=1553061&r1=1553060&r2=1553061&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/io/TableAppender.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/io/TableAppender.java
[UTF-8] Mon Dec 23 03:07:28 2013
@@ -280,9 +280,9 @@ public class TableAppender extends Appen
          */
         int boxCount = 0;
         final char[][] box = new char[BOX.length][];
-        for (int i=0; i<BOX.length; i++) {
-            if (BOX[i][9] == horizontalChar) {
-                box[boxCount++] = BOX[i];
+        for (final char[] row : BOX) {
+            if (row[9] == horizontalChar) {
+                box[boxCount++] = row;
             }
         }
         /*
@@ -416,6 +416,7 @@ public class TableAppender extends Appen
      * </ul>
      *
      * @param  c Character to write.
+     * @return {@code this}.
      */
     @Override
     public TableAppender append(final char c) {
@@ -465,6 +466,7 @@ public class TableAppender extends Appen
      * @param  sequence The character sequence to be written.
      * @param  start    Index from which to start reading characters.
      * @param  end      Index of the character following the last character to read.
+     * @return {@code this}.
      */
     @Override
     @SuppressWarnings("fallthrough")

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/ThreadSafe.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/ThreadSafe.java?rev=1553061&r1=1553060&r2=1553061&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/ThreadSafe.java [UTF-8]
(original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/ThreadSafe.java [UTF-8]
Mon Dec 23 03:07:28 2013
@@ -24,7 +24,7 @@ import java.lang.annotation.RetentionPol
 
 
 /**
- * Identifies thread-safe SIS classes for documentation purpose only.
+ * Annotates thread-safe SIS classes for documentation purpose only.
  * Classes identified by this annotation can be shared by many threads without the need for
external synchronization.
  * This property is not inherited - subclasses shall still document if they are thread-safe.
  *

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/xml/Namespaces.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/xml/Namespaces.java?rev=1553061&r1=1553060&r2=1553061&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/xml/Namespaces.java [UTF-8]
(original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/xml/Namespaces.java [UTF-8]
Mon Dec 23 03:07:28 2013
@@ -27,6 +27,28 @@ import org.apache.sis.util.ArgumentCheck
 /**
  * Lists some namespaces URLs used by JAXB when (un)marshalling.
  *
+ * <p><strong>Warning: string constants in this class may change in any SIS version.</strong>
+ * Those constants are made available for applications who wish to use the same URLs than
SIS
+ * in their own JAXB annotations. Note that applications using those constants will have
their
+ * URLs determined by the SIS version available at compile-time, not runtime, because the
+ * {@code javac} compiler inlines string constants.</p>
+ *
+ * <p>The following table list the URLs, their usual prefix, and the SIS versions when
each URL changed.</p>
+ * <table class="sis">
+ *   <tr><th>Prefix</th> <th>XML Namespace</th>   <th>Changes
history</th></tr>
+ *   <tr><td>gco</td>    <td>{@value #GCO}</td>   <td></td></tr>
+ *   <tr><td>gfc</td>    <td>{@value #GFC}</td>   <td></td></tr>
+ *   <tr><td>gmd</td>    <td>{@value #GMD}</td>   <td></td></tr>
+ *   <tr><td>gmi</td>    <td>{@value #GMI}</td>   <td></td></tr>
+ *   <tr><td>srv</td>    <td>{@value #SRV}</td>   <td></td></tr>
+ *   <tr><td>gts</td>    <td>{@value #GTS}</td>   <td></td></tr>
+ *   <tr><td>gmx</td>    <td>{@value #GMX}</td>   <td></td></tr>
+ *   <tr><td>gml</td>    <td>{@value #GML}</td>   <td>0.4</td></tr>
+ *   <tr><td>csw</td>    <td>{@value #CSW}</td>   <td></td></tr>
+ *   <tr><td>xsi</td>    <td>{@value #XSI}</td>   <td></td></tr>
+ *   <tr><td>xlink</td>  <td>{@value #XLINK}</td> <td></td></tr>
+ * </table>
+ *
  * {@section Profiles}
  * Some countries or organizations define profiles of international standards, which may
contain
  * country-specific extensions. The namespace of such extensions are usually defined in a
separated
@@ -109,7 +131,13 @@ public final class Namespaces extends St
     /**
      * The <code>{@value}</code> URL.
      * The usual prefix for this namespace is {@code "gml"}.
-     * The current version is 3.2 (ISO 19136), but this may change in any future SIS release.
+     * The 3.2 version is equivalent to ISO 19136.
+     *
+     * <p>History</p>
+     * <table class="sis">
+     *   <tr><th>SIS version</th> <th>URL</th></tr>
+     *   <tr><td>0.3</td>         <td>http://www.opengis.net/gml</td></tr>
+     * </table>
      *
      * @category OGC
      */
@@ -118,7 +146,6 @@ public final class Namespaces extends St
     /**
      * The <code>{@value}</code> URL.
      * The usual prefix for this namespace is {@code "csw"}.
-     * The current version is 2.0.2, but this may change in any future SIS release.
      *
      * @category OGC
      */
@@ -126,6 +153,7 @@ public final class Namespaces extends St
 
     /**
      * The <code>{@value}</code> URL.
+     * The usual prefix for this namespace is {@code "xsi"}.
      * This is also defined by {@link XMLConstants#W3C_XML_SCHEMA_INSTANCE_NS_URI}.
      *
      * @category W3C

Modified: sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/io/EchoAppendable.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/io/EchoAppendable.java?rev=1553061&r1=1553060&r2=1553061&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/io/EchoAppendable.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/test/java/org/apache/sis/io/EchoAppendable.java
[UTF-8] Mon Dec 23 03:07:28 2013
@@ -52,6 +52,8 @@ public class EchoAppendable extends Appe
     /**
      * Writes a single character.
      *
+     * @param  c The character to append.
+     * @return {@code this}.
      * @throws IOException If an I/O error occurs.
      */
     @Override
@@ -65,6 +67,7 @@ public class EchoAppendable extends Appe
      * Writes a character sequence.
      *
      * @param  sequence The character sequence to be written.
+     * @return {@code this}.
      * @throws IOException If an I/O error occurs.
      */
     @Override
@@ -80,6 +83,7 @@ public class EchoAppendable extends Appe
      * @param  sequence The character sequence to be written.
      * @param  start    Index from which to start reading characters.
      * @param  end      Index of the character following the last character to read.
+     * @return {@code this}.
      * @throws IOException If an I/O error occurs.
      */
     @Override



Mime
View raw message