diff --git a/android/guava/src/com/google/common/base/Platform.java b/android/guava/src/com/google/common/base/Platform.java index 1967be713478..e5719cc804f2 100644 --- a/android/guava/src/com/google/common/base/Platform.java +++ b/android/guava/src/com/google/common/base/Platform.java @@ -107,6 +107,4 @@ public boolean isPcreLike() { return true; } } - - static void checkGwtRpcEnabled() {} } diff --git a/android/guava/src/com/google/common/collect/Platform.java b/android/guava/src/com/google/common/collect/Platform.java index cd4b5ba40956..f09f6d446cec 100644 --- a/android/guava/src/com/google/common/collect/Platform.java +++ b/android/guava/src/com/google/common/collect/Platform.java @@ -129,7 +129,5 @@ static int reduceExponentIfGwt(int exponent) { return exponent; } - static void checkGwtRpcEnabled() {} - private Platform() {} } diff --git a/android/guava/src/com/google/common/primitives/Platform.java b/android/guava/src/com/google/common/primitives/Platform.java deleted file mode 100644 index 83b248517993..000000000000 --- a/android/guava/src/com/google/common/primitives/Platform.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2019 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.primitives; - -import com.google.common.annotations.GwtCompatible; - -/** Methods factored out so that they can be emulated differently in GWT. */ -@GwtCompatible(emulated = true) -@ElementTypesAreNonnullByDefault -final class Platform { - static void checkGwtRpcEnabled() {} - - private Platform() {} -} diff --git a/guava-gwt/src-super/com/google/common/base/super/com/google/common/base/Platform.java b/guava-gwt/src-super/com/google/common/base/super/com/google/common/base/Platform.java index 78d35092682c..81d84cc647c9 100644 --- a/guava-gwt/src-super/com/google/common/base/super/com/google/common/base/Platform.java +++ b/guava-gwt/src-super/com/google/common/base/super/com/google/common/base/Platform.java @@ -64,16 +64,5 @@ static boolean patternCompilerIsPcreLike() { throw new UnsupportedOperationException(); } - /* - * We will eventually disable GWT-RPC on the server side, but we'll leave it nominally enabled on - * the client side. There's little practical difference: If it's disabled on the server, it won't - * work. It's just a matter of how quickly it fails. I'm not sure if failing on the client would - * be better or not, but it's harder: GWT's System.getProperty reads from a different property - * list than Java's, so anyone who needs to reenable GWT-RPC in an emergency would have to figure - * out how to set both properties. It's easier to have to set only one, and it might as well be - * the Java property, since Guava already reads another Java property. - */ - static void checkGwtRpcEnabled() {} - private Platform() {} } diff --git a/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/Platform.java b/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/Platform.java index 3bd3e3aad357..295c1d7f9a90 100644 --- a/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/Platform.java +++ b/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/Platform.java @@ -117,16 +117,5 @@ static int reduceExponentIfGwt(int exponent) { return exponent / 2; } - /* - * We will eventually disable GWT-RPC on the server side, but we'll leave it nominally enabled on - * the client side. There's little practical difference: If it's disabled on the server, it won't - * work. It's just a matter of how quickly it fails. I'm not sure if failing on the client would - * be better or not, but it's harder: GWT's System.getProperty reads from a different property - * list than Java's, so anyone who needs to reenable GWT-RPC in an emergency would have to figure - * out how to set both properties. It's easier to have to set only one, and it might as well be - * the Java property, since Guava already reads another Java property. - */ - static void checkGwtRpcEnabled() {} - private Platform() {} } diff --git a/guava-gwt/src-super/com/google/common/primitives/super/com/google/common/primitives/Platform.java b/guava-gwt/src-super/com/google/common/primitives/super/com/google/common/primitives/Platform.java deleted file mode 100644 index 7596ea284782..000000000000 --- a/guava-gwt/src-super/com/google/common/primitives/super/com/google/common/primitives/Platform.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2019 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.primitives; - -final class Platform { - /* - * We will eventually disable GWT-RPC on the server side, but we'll leave it nominally enabled on - * the client side. There's little practical difference: If it's disabled on the server, it won't - * work. It's just a matter of how quickly it fails. I'm not sure if failing on the client would - * be better or not, but it's harder: GWT's System.getProperty reads from a different property - * list than Java's, so anyone who needs to reenable GWT-RPC in an emergency would have to figure - * out how to set both properties. It's easier to have to set only one, and it might as well be - * the Java property, since Guava already reads another Java property. - */ - static void checkGwtRpcEnabled() {} - - private Platform() {} -} diff --git a/guava/src/com/google/common/base/Platform.java b/guava/src/com/google/common/base/Platform.java index d2433d65ee2e..e24df7c7d801 100644 --- a/guava/src/com/google/common/base/Platform.java +++ b/guava/src/com/google/common/base/Platform.java @@ -102,25 +102,4 @@ public boolean isPcreLike() { return true; } } - - static void checkGwtRpcEnabled() { - String propertyName = "guava.gwt.emergency_reenable_rpc"; - - if (!Boolean.parseBoolean(System.getProperty(propertyName, "false"))) { - throw new UnsupportedOperationException( - Strings.lenientFormat( - "We are removing GWT-RPC support for Guava types. You can temporarily reenable" - + " support by setting the system property %s to true. For more about system" - + " properties, see %s. For more about Guava's GWT-RPC support, see %s.", - propertyName, - "https://stackoverflow.com/q/5189914/28465", - "https://groups.google.com/d/msg/guava-announce/zHZTFg7YF3o/rQNnwdHeEwAJ")); - } - logger.log( - java.util.logging.Level.WARNING, - "Later in 2020, we will remove GWT-RPC support for Guava types. You are seeing this" - + " warning because you are sending a Guava type over GWT-RPC, which will break. You" - + " can identify which type by looking at the class name in the attached stack trace.", - new Throwable()); - } } diff --git a/guava/src/com/google/common/collect/Platform.java b/guava/src/com/google/common/collect/Platform.java index 72928125ec11..3f118764e2e8 100644 --- a/guava/src/com/google/common/collect/Platform.java +++ b/guava/src/com/google/common/collect/Platform.java @@ -138,26 +138,5 @@ static int reduceExponentIfGwt(int exponent) { return exponent; } - static void checkGwtRpcEnabled() { - String propertyName = "guava.gwt.emergency_reenable_rpc"; - - if (!Boolean.parseBoolean(System.getProperty(propertyName, "false"))) { - throw new UnsupportedOperationException( - com.google.common.base.Strings.lenientFormat( - "We are removing GWT-RPC support for Guava types. You can temporarily reenable" - + " support by setting the system property %s to true. For more about system" - + " properties, see %s. For more about Guava's GWT-RPC support, see %s.", - propertyName, - "https://stackoverflow.com/q/5189914/28465", - "https://groups.google.com/d/msg/guava-announce/zHZTFg7YF3o/rQNnwdHeEwAJ")); - } - logger.log( - java.util.logging.Level.WARNING, - "Later in 2020, we will remove GWT-RPC support for Guava types. You are seeing this" - + " warning because you are sending a Guava type over GWT-RPC, which will break. You" - + " can identify which type by looking at the class name in the attached stack trace.", - new Throwable()); - } - private Platform() {} } diff --git a/guava/src/com/google/common/primitives/Platform.java b/guava/src/com/google/common/primitives/Platform.java deleted file mode 100644 index ca31689222cd..000000000000 --- a/guava/src/com/google/common/primitives/Platform.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2019 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.primitives; - -import com.google.common.annotations.GwtCompatible; - -/** Methods factored out so that they can be emulated differently in GWT. */ -@GwtCompatible(emulated = true) -@ElementTypesAreNonnullByDefault -final class Platform { - private static final java.util.logging.Logger logger = - java.util.logging.Logger.getLogger(Platform.class.getName()); - - static void checkGwtRpcEnabled() { - String propertyName = "guava.gwt.emergency_reenable_rpc"; - - if (!Boolean.parseBoolean(System.getProperty(propertyName, "false"))) { - throw new UnsupportedOperationException( - com.google.common.base.Strings.lenientFormat( - "We are removing GWT-RPC support for Guava types. You can temporarily reenable" - + " support by setting the system property %s to true. For more about system" - + " properties, see %s. For more about Guava's GWT-RPC support, see %s.", - propertyName, - "https://stackoverflow.com/q/5189914/28465", - "https://groups.google.com/d/msg/guava-announce/zHZTFg7YF3o/rQNnwdHeEwAJ")); - } - logger.log( - java.util.logging.Level.WARNING, - "Later in 2020, we will remove GWT-RPC support for Guava types. You are seeing this" - + " warning because you are sending a Guava type over GWT-RPC, which will break. You" - + " can identify which type by looking at the class name in the attached stack trace.", - new Throwable()); - } - - private Platform() {} -}