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:44 UTC

[isis] 01/01: 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

commit 1f48212847251e204d9e3f5c5f8c99d706123541
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     | 36 ----------------------
 1 file changed, 36 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..9750a5a713 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
@@ -63,7 +63,6 @@ public class SerializingAdapterDefault implements SerializingAdapter {
 
     @Lazy
     @Inject private ValueSemanticsResolver valueSemanticsResolver;
-    //@Inject private IdStringifierLookupService idStringifierLookupService;
 
     @Override
     public Serializable write(final @NonNull Object value) {
@@ -107,24 +106,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 +131,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));
-//    }
-
 }