Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove obsolete GWT-RPC logging code. #6590

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions android/guava/src/com/google/common/base/Platform.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,4 @@ public boolean isPcreLike() {
return true;
}
}

static void checkGwtRpcEnabled() {}
}
2 changes: 0 additions & 2 deletions android/guava/src/com/google/common/collect/Platform.java
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,5 @@ static int reduceExponentIfGwt(int exponent) {
return exponent;
}

static void checkGwtRpcEnabled() {}

private Platform() {}
}
26 changes: 0 additions & 26 deletions android/guava/src/com/google/common/primitives/Platform.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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() {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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() {}
}

This file was deleted.

21 changes: 0 additions & 21 deletions guava/src/com/google/common/base/Platform.java
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}
21 changes: 0 additions & 21 deletions guava/src/com/google/common/collect/Platform.java
Original file line number Diff line number Diff line change
Expand Up @@ -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() {}
}
48 changes: 0 additions & 48 deletions guava/src/com/google/common/primitives/Platform.java

This file was deleted.