Skip to content

Commit 8df849d

Browse files
cpovirkGoogle Java Core Libraries
authored andcommitted
...plus one https://errorprone.info/bugpattern/UnusedMethod warning. RELNOTES=n/a PiperOrigin-RevId: 726481058
1 parent cbf6f7f commit 8df849d

File tree

13 files changed

+12
-8
lines changed

13 files changed

+12
-8
lines changed

android/guava/src/com/google/common/cache/CacheStats.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public long missCount() {
140140
* requestCount}, or {@code 0.0} when {@code requestCount == 0}. Note that {@code hitRate +
141141
* missRate =~ 1.0}. Cache misses include all requests which weren't cache hits, including
142142
* requests which resulted in either successful or failed loading attempts, and requests which
143-
* waited for other threads to finish loading. It is thus the case that {@code missCount >=
143+
* waited for other threads to finish loading. It is thus the case that {@code missCount >=
144144
* loadSuccessCount + loadExceptionCount}. Multiple concurrent misses for the same key will result
145145
* in a single load operation.
146146
*/

android/guava/src/com/google/common/escape/ArrayBasedUnicodeEscaper.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
* @since 15.0
4242
*/
4343
@GwtCompatible
44+
@SuppressWarnings("EscapedEntity") // We do mean for the user to see "&" etc.
4445
public abstract class ArrayBasedUnicodeEscaper extends UnicodeEscaper {
4546
// The replacement array (see ArrayBasedEscaperMap).
4647
private final char[][] replacements;

android/guava/src/com/google/common/escape/CharEscaper.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
* @since 15.0
4141
*/
4242
@GwtCompatible
43+
@SuppressWarnings("EscapedEntity") // We do mean for the user to see "<" etc.
4344
public abstract class CharEscaper extends Escaper {
4445
/** Constructor for use by subclasses. */
4546
protected CharEscaper() {}

android/guava/src/com/google/common/escape/Escaper.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
*/
5757
@DoNotMock("Use Escapers.nullEscaper() or another methods from the *Escapers classes")
5858
@GwtCompatible
59+
@SuppressWarnings("EscapedEntity") // We do mean for the user to see "<" etc.
5960
public abstract class Escaper {
6061
// TODO(dbeaumont): evaluate custom implementations, considering package private constructor.
6162
/** Constructor for use by subclasses. */

android/guava/src/com/google/common/escape/UnicodeEscaper.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
* @since 15.0
5151
*/
5252
@GwtCompatible
53+
@SuppressWarnings("EscapedEntity") // We do mean for the user to see "<" etc.
5354
public abstract class UnicodeEscaper extends Escaper {
5455
/** The amount of padding (chars) to use when growing the escape buffer. */
5556
private static final int DEST_PAD = 32;

android/guava/src/com/google/common/xml/XmlEscapers.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ public static Escaper xmlContentEscaper() {
9393
* <p>This escaper does not treat surrogate pairs specially and does not perform Unicode
9494
* validation on its input.
9595
*/
96+
@SuppressWarnings("EscapedEntity") // We do mean for the user to see &#x9;" etc.
9697
public static Escaper xmlAttributeEscaper() {
9798
return XML_ATTRIBUTE_ESCAPER;
9899
}

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
import com.google.common.annotations.GwtCompatible;
1919
import java.lang.ref.WeakReference;
2020
import java.util.Locale;
21-
import java.util.ServiceConfigurationError;
22-
import java.util.logging.Level;
2321
import java.util.logging.Logger;
2422
import java.util.regex.Pattern;
2523
import org.jspecify.annotations.Nullable;
@@ -104,10 +102,6 @@ private static PatternCompiler loadPatternCompiler() {
104102
return new JdkPatternCompiler();
105103
}
106104

107-
private static void logPatternCompilerError(ServiceConfigurationError e) {
108-
logger.log(Level.WARNING, "Error loading regex compiler, falling back to next option", e);
109-
}
110-
111105
private static final class JdkPatternCompiler implements PatternCompiler {
112106
@Override
113107
public CommonPattern compile(String pattern) {

guava/src/com/google/common/cache/CacheStats.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public long missCount() {
140140
* requestCount}, or {@code 0.0} when {@code requestCount == 0}. Note that {@code hitRate +
141141
* missRate =~ 1.0}. Cache misses include all requests which weren't cache hits, including
142142
* requests which resulted in either successful or failed loading attempts, and requests which
143-
* waited for other threads to finish loading. It is thus the case that {@code missCount &gt;=
143+
* waited for other threads to finish loading. It is thus the case that {@code missCount >=
144144
* loadSuccessCount + loadExceptionCount}. Multiple concurrent misses for the same key will result
145145
* in a single load operation.
146146
*/

guava/src/com/google/common/escape/ArrayBasedUnicodeEscaper.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
* @since 15.0
4242
*/
4343
@GwtCompatible
44+
@SuppressWarnings("EscapedEntity") // We do mean for the user to see "&amp;" etc.
4445
public abstract class ArrayBasedUnicodeEscaper extends UnicodeEscaper {
4546
// The replacement array (see ArrayBasedEscaperMap).
4647
private final char[][] replacements;

guava/src/com/google/common/escape/CharEscaper.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
* @since 15.0
4141
*/
4242
@GwtCompatible
43+
@SuppressWarnings("EscapedEntity") // We do mean for the user to see "&lt;" etc.
4344
public abstract class CharEscaper extends Escaper {
4445
/** Constructor for use by subclasses. */
4546
protected CharEscaper() {}

0 commit comments

Comments
 (0)