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


The following commit(s) were added to refs/heads/geoapi-4.0 by this push:
     new cc19c1f3d5 Remove unnecessary `abstract Object readResolve()` for 
avoiding compiler warning.
cc19c1f3d5 is described below

commit cc19c1f3d5b751640f5932aeb9f75b8b15515981
Author: Martin Desruisseaux <martin.desruisse...@geomatys.com>
AuthorDate: Sun Aug 21 19:10:35 2022 +0200

    Remove unnecessary `abstract Object readResolve()` for avoiding compiler 
warning.
---
 .../main/java/org/apache/sis/internal/feature/Geometries.java    | 9 ---------
 .../main/java/org/apache/sis/internal/feature/esri/Factory.java  | 2 +-
 .../main/java/org/apache/sis/internal/feature/j2d/Factory.java   | 2 +-
 .../main/java/org/apache/sis/internal/feature/jts/Factory.java   | 2 +-
 4 files changed, 3 insertions(+), 12 deletions(-)

diff --git 
a/core/sis-feature/src/main/java/org/apache/sis/internal/feature/Geometries.java
 
b/core/sis-feature/src/main/java/org/apache/sis/internal/feature/Geometries.java
index 1040107663..548acb9dc7 100644
--- 
a/core/sis-feature/src/main/java/org/apache/sis/internal/feature/Geometries.java
+++ 
b/core/sis-feature/src/main/java/org/apache/sis/internal/feature/Geometries.java
@@ -16,7 +16,6 @@
  */
 package org.apache.sis.internal.feature;
 
-import java.io.ObjectStreamException;
 import java.io.Serializable;
 import java.nio.ByteBuffer;
 import java.util.Optional;
@@ -604,14 +603,6 @@ public abstract class Geometries<G> implements 
Serializable {
      */
     protected abstract GeometryWrapper<G> createWrapper(G geometry);
 
-    /**
-     * Invoked at deserialization time for obtaining the unique instance of 
this {@code Geometries} class.
-     *
-     * @return the unique {@code Geometries} instance for this class.
-     * @throws ObjectStreamException if the object state is invalid.
-     */
-    protected abstract Object readResolve() throws ObjectStreamException;
-
     /**
      * Returns an error message for an unsupported operation. This error 
message is used by non-abstract methods
      * in {@code Geometries} subclasses, after we identified the geometry 
library implementation to use but that
diff --git 
a/core/sis-feature/src/main/java/org/apache/sis/internal/feature/esri/Factory.java
 
b/core/sis-feature/src/main/java/org/apache/sis/internal/feature/esri/Factory.java
index 6437cb9537..297e7582fc 100644
--- 
a/core/sis-feature/src/main/java/org/apache/sis/internal/feature/esri/Factory.java
+++ 
b/core/sis-feature/src/main/java/org/apache/sis/internal/feature/esri/Factory.java
@@ -66,8 +66,8 @@ public final class Factory extends Geometries<Geometry> {
      * Invoked at deserialization time for obtaining the unique instance of 
this {@code Geometries} class.
      *
      * @return {@link #INSTANCE}.
+     * @throws ObjectStreamException if the object state is invalid.
      */
-    @Override
     protected Object readResolve() throws ObjectStreamException {
         return INSTANCE;
     }
diff --git 
a/core/sis-feature/src/main/java/org/apache/sis/internal/feature/j2d/Factory.java
 
b/core/sis-feature/src/main/java/org/apache/sis/internal/feature/j2d/Factory.java
index 607d7f1f0d..78357153fa 100644
--- 
a/core/sis-feature/src/main/java/org/apache/sis/internal/feature/j2d/Factory.java
+++ 
b/core/sis-feature/src/main/java/org/apache/sis/internal/feature/j2d/Factory.java
@@ -61,8 +61,8 @@ public final class Factory extends Geometries<Shape> {
      * Invoked at deserialization time for obtaining the unique instance of 
this {@code Geometries} class.
      *
      * @return {@link #INSTANCE}.
+     * @throws ObjectStreamException if the object state is invalid.
      */
-    @Override
     protected Object readResolve() throws ObjectStreamException {
         return INSTANCE;
     }
diff --git 
a/core/sis-feature/src/main/java/org/apache/sis/internal/feature/jts/Factory.java
 
b/core/sis-feature/src/main/java/org/apache/sis/internal/feature/jts/Factory.java
index 1daf3ca475..8b6267952a 100644
--- 
a/core/sis-feature/src/main/java/org/apache/sis/internal/feature/jts/Factory.java
+++ 
b/core/sis-feature/src/main/java/org/apache/sis/internal/feature/jts/Factory.java
@@ -78,8 +78,8 @@ public final class Factory extends Geometries<Geometry> {
      * Invoked at deserialization time for obtaining the unique instance of 
this {@code Geometries} class.
      *
      * @return {@link #INSTANCE}.
+     * @throws ObjectStreamException if the object state is invalid.
      */
-    @Override
     protected Object readResolve() throws ObjectStreamException {
         return INSTANCE;
     }

Reply via email to