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 2023/01/15 10:09:06 UTC

[sis] branch geoapi-4.0 updated (2e251092f4 -> f8afbbfd5b)

This is an automated email from the ASF dual-hosted git repository.

desruisseaux pushed a change to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git


 discard 2e251092f4 Document `StandardDateFormat` has not intended for serialization. We verified that it was not used as non-transient field in a serialiable class.
     new f8afbbfd5b Document `StandardDateFormat` as not intended for serialization. We verified that it was not used as non-transient field in a serialiable class.

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (2e251092f4)
            \
             N -- N -- N   refs/heads/geoapi-4.0 (f8afbbfd5b)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:


[sis] 01/01: Document `StandardDateFormat` as not intended for serialization. We verified that it was not used as non-transient field in a serialiable class.

Posted by de...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git

commit f8afbbfd5b0194b86e07c6999eb346dd299c1336
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Sun Jan 15 11:06:35 2023 +0100

    Document `StandardDateFormat` as not intended for serialization.
    We verified that it was not used as non-transient field in a serialiable class.
    
    https://issues.apache.org/jira/browse/SIS-567
---
 .../org/apache/sis/internal/util/StandardDateFormat.java    | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/core/sis-utility/src/main/java/org/apache/sis/internal/util/StandardDateFormat.java b/core/sis-utility/src/main/java/org/apache/sis/internal/util/StandardDateFormat.java
index 8664a042b7..db27b990a7 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/internal/util/StandardDateFormat.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/internal/util/StandardDateFormat.java
@@ -62,16 +62,17 @@ import org.apache.sis.util.CharSequences;
  * only hours, or only hours and minutes, <i>etc</i>. ISO 19162 said that the timezone is restricted to UTC
  * but nevertheless allows to specify a timezone.</p>
  *
+ * <h2>Serialization</h2>
+ * Despite inheriting the {@link java.io.Serializable} interface, this class is actually not serializable
+ * because the {@link #format} field is not serializable (a constraint of {@link java.time.format}).
+ * All usages in Apache SIS should be either in transient fields or in non-serializable classes.
+ *
  * @author  Martin Desruisseaux (Geomatys)
- * @version 1.1
+ * @version 1.4
  * @since   0.6
  */
+@SuppressWarnings("serial")     // Not intended to be serialized.
 public final class StandardDateFormat extends DateFormat {
-    /**
-     * For cross-version compatibility.
-     */
-    private static final long serialVersionUID = 2764313272939921664L;
-
     /**
      * The {@value} timezone ID.
      *