aboutsummaryrefslogtreecommitdiff
path: root/guava-gwt/src/com/google/common/collect/JdkBackedImmutableMap_CustomFieldSerializer.java
diff options
context:
space:
mode:
authorcpovirk <cpovirk@google.com>2020-09-30 07:57:26 -0700
committerKurt Alfred Kluever <kak@google.com>2020-10-01 10:55:50 -0400
commit0cb89dd110ce88770207889901e95ea2ac896932 (patch)
treec011fe3f7823398371c2cec2371846fba390c6ac /guava-gwt/src/com/google/common/collect/JdkBackedImmutableMap_CustomFieldSerializer.java
parent7f164ef7e2cc536754ecdd6a26ddc3dabaa398ec (diff)
downloadguava-0cb89dd110ce88770207889901e95ea2ac896932.tar.gz
Fully remove GWT-RPC support externally.
Really, really closes https://github.com/google/guava/issues/3680. Possible future work: - Be consistent about whether we put @GwtCompatible on the remaining internal CustomFieldSerializer classes. (For those files, it probably acts only as documentation (of something that is pretty obvious :)). Our open-source build used to take action when it saw `@GwtCompatible(emulated=true)`, but (a) it doesn't anymore, (b) those files don't exist externally anymore, and (c) they weren't `emulated=true` :) I believe that our internal build requires @GwtCompatible on most files in our GWT target, but I think there's an exception for GWT-target-only sources.) - Remove some of the GwtSerializationDependencies classes. However, some of these classe are set up as *supertypes* of our prod classes, so this would require some surgery. Keeping them is harmless: It doesn't actually make the classes GWT-serializable. - Remove the usages of serializable=true on @GwtCompatible, at least externally but maybe just entirely. RELNOTES=[Guava types can no longer be sent over GWT-RPC.](https://groups.google.com/d/msg/guava-announce/zHZTFg7YF3o/rQNnwdHeEwAJ) Even the earlier, temporary way to reenable support (`guava.gwt.emergency_reenable_rpc`) no longer has an effect. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=334598649
Diffstat (limited to 'guava-gwt/src/com/google/common/collect/JdkBackedImmutableMap_CustomFieldSerializer.java')
-rw-r--r--guava-gwt/src/com/google/common/collect/JdkBackedImmutableMap_CustomFieldSerializer.java50
1 files changed, 0 insertions, 50 deletions
diff --git a/guava-gwt/src/com/google/common/collect/JdkBackedImmutableMap_CustomFieldSerializer.java b/guava-gwt/src/com/google/common/collect/JdkBackedImmutableMap_CustomFieldSerializer.java
deleted file mode 100644
index 12b3411e0..000000000
--- a/guava-gwt/src/com/google/common/collect/JdkBackedImmutableMap_CustomFieldSerializer.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2018 The Guava Authors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.google.common.collect;
-
-import static com.google.common.collect.Platform.checkGwtRpcEnabled;
-
-import com.google.gwt.user.client.rpc.SerializationException;
-import com.google.gwt.user.client.rpc.SerializationStreamReader;
-import com.google.gwt.user.client.rpc.SerializationStreamWriter;
-import com.google.gwt.user.client.rpc.core.java.util.Map_CustomFieldSerializerBase;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-/**
- * This class implements the GWT serialization of {@link JdkBackedImmutableMap}.
- *
- * @author Louis Wasserman
- */
-public class JdkBackedImmutableMap_CustomFieldSerializer {
-
- public static void deserialize(SerializationStreamReader reader, ImmutableMap<?, ?> instance) {}
-
- public static ImmutableMap<Object, Object> instantiate(SerializationStreamReader reader)
- throws SerializationException {
- checkGwtRpcEnabled();
- Map<Object, Object> entries = new LinkedHashMap<>();
- Map_CustomFieldSerializerBase.deserialize(reader, entries);
- return ImmutableMap.copyOf(entries);
- }
-
- public static void serialize(SerializationStreamWriter writer, ImmutableMap<?, ?> instance)
- throws SerializationException {
- checkGwtRpcEnabled();
- Map_CustomFieldSerializerBase.serialize(writer, instance);
- }
-}