sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jso...@apache.org
Subject [sis] branch geoapi-4.0 updated: Portrayal : fix incoherency in presentation candidate value type
Date Mon, 25 Jan 2021 15:54:14 GMT
This is an automated email from the ASF dual-hosted git repository.

jsorel 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 96b4ea0  Portrayal : fix incoherency in presentation candidate value type
96b4ea0 is described below

commit 96b4ea05553a9066e21bc1b55dd3dd7d15d5363f
Author: jsorel <johann.sorel@geomatys.com>
AuthorDate: Mon Jan 25 16:53:54 2021 +0100

    Portrayal : fix incoherency in presentation candidate value type
---
 .../org/apache/sis/internal/map/ExceptionPresentation.java   | 12 ++++++++++++
 .../main/java/org/apache/sis/internal/map/Presentation.java  |  4 ++--
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/core/sis-portrayal/src/main/java/org/apache/sis/internal/map/ExceptionPresentation.java
b/core/sis-portrayal/src/main/java/org/apache/sis/internal/map/ExceptionPresentation.java
index fc0431b..9779118 100644
--- a/core/sis-portrayal/src/main/java/org/apache/sis/internal/map/ExceptionPresentation.java
+++ b/core/sis-portrayal/src/main/java/org/apache/sis/internal/map/ExceptionPresentation.java
@@ -16,7 +16,10 @@
  */
 package org.apache.sis.internal.map;
 
+import org.apache.sis.portrayal.MapLayer;
+import org.apache.sis.storage.Resource;
 import org.apache.sis.util.ArgumentChecks;
+import org.opengis.feature.Feature;
 
 /**
  * Produced by the portrayal engines when an exception occures.
@@ -45,6 +48,15 @@ public class ExceptionPresentation extends Presentation {
     }
 
     /**
+     * @param exception not null.
+     */
+    public ExceptionPresentation(MapLayer layer, Resource resource, Feature candidate, Exception
exception) {
+        super(layer,resource, candidate);
+        ArgumentChecks.ensureNonNull("exception", exception);
+        this.exception = exception;
+    }
+
+    /**
      * @return exception, never null
      */
     public Exception getException() {
diff --git a/core/sis-portrayal/src/main/java/org/apache/sis/internal/map/Presentation.java
b/core/sis-portrayal/src/main/java/org/apache/sis/internal/map/Presentation.java
index 092a920..c74bbda 100644
--- a/core/sis-portrayal/src/main/java/org/apache/sis/internal/map/Presentation.java
+++ b/core/sis-portrayal/src/main/java/org/apache/sis/internal/map/Presentation.java
@@ -54,7 +54,7 @@ public abstract class Presentation {
 
     private MapLayer layer;
     private Resource resource;
-    private Object candidate;
+    private Feature candidate;
 
     public Presentation() {
     }
@@ -96,7 +96,7 @@ public abstract class Presentation {
      *
      * @return can be null if the presentation is not associated to any identifiable object.
      */
-    public Object getCandidate() {
+    public Feature getCandidate() {
         return candidate;
     }
 


Mime
View raw message