You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2022/08/02 05:19:07 UTC

[isis] branch master updated: ISIS-3103: minor: removing commented out intermediate code

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

ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git


The following commit(s) were added to refs/heads/master by this push:
     new 622efbff60 ISIS-3103: minor: removing commented out intermediate code
622efbff60 is described below

commit 622efbff608da8ddcfd5c98523cf6a6c2581472d
Author: Andi Huber <ah...@apache.org>
AuthorDate: Tue Aug 2 07:19:02 2022 +0200

    ISIS-3103: minor: removing commented out intermediate code
---
 .../serializing/SerializingAdapterDefault.java     | 35 ----------------------
 1 file changed, 35 deletions(-)

diff --git a/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/serializing/SerializingAdapterDefault.java b/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/serializing/SerializingAdapterDefault.java
index 2a4917de74..d69bf30940 100644
--- a/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/serializing/SerializingAdapterDefault.java
+++ b/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/serializing/SerializingAdapterDefault.java
@@ -107,24 +107,12 @@ public class SerializingAdapterDefault implements SerializingAdapter {
                               valueClass, decomposition.toJson()));
         }
 
-//        // otherwise, perhaps the value itself is a StringifiedValueMemento, in which case we treat it as a
-//        // memento for a non-predefined-serializable value to be reconstructed
-//        if(value instanceof StringifiedValueMemento) {
-//            return fromStringifiedValueMemento(valueClass, (StringifiedValueMemento) value);
-//        }
-
         // otherwise, the value was directly stored/written, so just recover as is
         return _Casts.uncheckedCast(value);
     }
 
     // -- HELPER
 
-//    @Value(staticConstructor = "of")
-//    private static final class StringifiedValueMemento implements Serializable {
-//        private static final long serialVersionUID = 1L;
-//        private final String stringifiedValue;
-//    }
-
     private <T> Optional<ValueDecomposition> toValueDecomposition(
             final @NonNull T value) {
 
@@ -144,27 +132,4 @@ public class SerializingAdapterDefault implements SerializingAdapter {
                 .map(vs->vs.compose(decomposition));
     }
 
-//    private <T> StringifiedValueMemento toStringifiedValueMemento(
-//            final @NonNull T value) {
-//
-//        final Class<T> valueClass = _Casts.uncheckedCast(value.getClass());
-//
-//        return idStringifierLookupService.lookup(valueClass)
-//            .map(idStringifier->idStringifier.enstring(value))
-//            .map(stringifiedValue->StringifiedValueMemento.of(stringifiedValue))
-//            .orElseThrow(()->
-//                _Exceptions.unrecoverable("cannot create a memento for object of type %s", valueClass));
-//    }
-//
-//    private <T> T fromStringifiedValueMemento(
-//            final @NonNull Class<T> valueClass,
-//            final @NonNull StringifiedValueMemento memento) {
-//
-//        return idStringifierLookupService.lookup(valueClass)
-//                .map(idStringifier->idStringifier.destring(memento.getStringifiedValue(), null))
-//                .orElseThrow(()->
-//                    _Exceptions.unrecoverable("cannot restore object of type %s from memento '%s'",
-//                            valueClass, memento));
-//    }
-
 }