Skip to content

Commit e42d4e8

Browse files
cpovirkGoogle Java Core Libraries
authored and
Google Java Core Libraries
committedJun 26, 2023
Remove obsolete GWT-RPC logging code.
(i.e., roll back cl/265490471) This is progress toward addressing the Java agent / `premain` problem discussed in #6566. GWT-RPC support has been gone for a while now. RELNOTES=Fixed some problems with [using Guava from a Java Agent](#6566). (But we don't test that configuration, and we don't know how well we'll be able to keep it working.) PiperOrigin-RevId: 543484764
1 parent 39c45d2 commit e42d4e8

File tree

9 files changed

+0
-174
lines changed

9 files changed

+0
-174
lines changed
 

‎android/guava/src/com/google/common/base/Platform.java

-2
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,4 @@ public boolean isPcreLike() {
107107
return true;
108108
}
109109
}
110-
111-
static void checkGwtRpcEnabled() {}
112110
}

‎android/guava/src/com/google/common/collect/Platform.java

-2
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,5 @@ static int reduceExponentIfGwt(int exponent) {
129129
return exponent;
130130
}
131131

132-
static void checkGwtRpcEnabled() {}
133-
134132
private Platform() {}
135133
}

‎android/guava/src/com/google/common/primitives/Platform.java

-26
This file was deleted.

‎guava-gwt/src-super/com/google/common/base/super/com/google/common/base/Platform.java

-11
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,5 @@ static boolean patternCompilerIsPcreLike() {
6464
throw new UnsupportedOperationException();
6565
}
6666

67-
/*
68-
* We will eventually disable GWT-RPC on the server side, but we'll leave it nominally enabled on
69-
* the client side. There's little practical difference: If it's disabled on the server, it won't
70-
* work. It's just a matter of how quickly it fails. I'm not sure if failing on the client would
71-
* be better or not, but it's harder: GWT's System.getProperty reads from a different property
72-
* list than Java's, so anyone who needs to reenable GWT-RPC in an emergency would have to figure
73-
* out how to set both properties. It's easier to have to set only one, and it might as well be
74-
* the Java property, since Guava already reads another Java property.
75-
*/
76-
static void checkGwtRpcEnabled() {}
77-
7867
private Platform() {}
7968
}

‎guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/Platform.java

-11
Original file line numberDiff line numberDiff line change
@@ -117,16 +117,5 @@ static int reduceExponentIfGwt(int exponent) {
117117
return exponent / 2;
118118
}
119119

120-
/*
121-
* We will eventually disable GWT-RPC on the server side, but we'll leave it nominally enabled on
122-
* the client side. There's little practical difference: If it's disabled on the server, it won't
123-
* work. It's just a matter of how quickly it fails. I'm not sure if failing on the client would
124-
* be better or not, but it's harder: GWT's System.getProperty reads from a different property
125-
* list than Java's, so anyone who needs to reenable GWT-RPC in an emergency would have to figure
126-
* out how to set both properties. It's easier to have to set only one, and it might as well be
127-
* the Java property, since Guava already reads another Java property.
128-
*/
129-
static void checkGwtRpcEnabled() {}
130-
131120
private Platform() {}
132121
}

‎guava-gwt/src-super/com/google/common/primitives/super/com/google/common/primitives/Platform.java

-32
This file was deleted.

‎guava/src/com/google/common/base/Platform.java

-21
Original file line numberDiff line numberDiff line change
@@ -102,25 +102,4 @@ public boolean isPcreLike() {
102102
return true;
103103
}
104104
}
105-
106-
static void checkGwtRpcEnabled() {
107-
String propertyName = "guava.gwt.emergency_reenable_rpc";
108-
109-
if (!Boolean.parseBoolean(System.getProperty(propertyName, "false"))) {
110-
throw new UnsupportedOperationException(
111-
Strings.lenientFormat(
112-
"We are removing GWT-RPC support for Guava types. You can temporarily reenable"
113-
+ " support by setting the system property %s to true. For more about system"
114-
+ " properties, see %s. For more about Guava's GWT-RPC support, see %s.",
115-
propertyName,
116-
"https://stackoverflow.com/q/5189914/28465",
117-
"https://groups.google.com/d/msg/guava-announce/zHZTFg7YF3o/rQNnwdHeEwAJ"));
118-
}
119-
logger.log(
120-
java.util.logging.Level.WARNING,
121-
"Later in 2020, we will remove GWT-RPC support for Guava types. You are seeing this"
122-
+ " warning because you are sending a Guava type over GWT-RPC, which will break. You"
123-
+ " can identify which type by looking at the class name in the attached stack trace.",
124-
new Throwable());
125-
}
126105
}

‎guava/src/com/google/common/collect/Platform.java

-21
Original file line numberDiff line numberDiff line change
@@ -138,26 +138,5 @@ static int reduceExponentIfGwt(int exponent) {
138138
return exponent;
139139
}
140140

141-
static void checkGwtRpcEnabled() {
142-
String propertyName = "guava.gwt.emergency_reenable_rpc";
143-
144-
if (!Boolean.parseBoolean(System.getProperty(propertyName, "false"))) {
145-
throw new UnsupportedOperationException(
146-
com.google.common.base.Strings.lenientFormat(
147-
"We are removing GWT-RPC support for Guava types. You can temporarily reenable"
148-
+ " support by setting the system property %s to true. For more about system"
149-
+ " properties, see %s. For more about Guava's GWT-RPC support, see %s.",
150-
propertyName,
151-
"https://stackoverflow.com/q/5189914/28465",
152-
"https://groups.google.com/d/msg/guava-announce/zHZTFg7YF3o/rQNnwdHeEwAJ"));
153-
}
154-
logger.log(
155-
java.util.logging.Level.WARNING,
156-
"Later in 2020, we will remove GWT-RPC support for Guava types. You are seeing this"
157-
+ " warning because you are sending a Guava type over GWT-RPC, which will break. You"
158-
+ " can identify which type by looking at the class name in the attached stack trace.",
159-
new Throwable());
160-
}
161-
162141
private Platform() {}
163142
}

‎guava/src/com/google/common/primitives/Platform.java

-48
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.