From 32312a2eb20c94f875350ee69a3612ea45014007 Mon Sep 17 00:00:00 2001 From: Liam Miller-Cushon Date: Mon, 12 Feb 2024 12:42:22 -0800 Subject: [PATCH] Update Android API diff PiperOrigin-RevId: 606334307 --- .../apidiff/android_java8.binarypb | 52 +++++-------------- .../apidiff/AndroidJdkLibsCheckerTest.java | 14 +++++ 2 files changed, 27 insertions(+), 39 deletions(-) diff --git a/core/src/main/java/com/google/errorprone/bugpatterns/apidiff/android_java8.binarypb b/core/src/main/java/com/google/errorprone/bugpatterns/apidiff/android_java8.binarypb index 5b53a7a6675..79b75ae6abc 100644 --- a/core/src/main/java/com/google/errorprone/bugpatterns/apidiff/android_java8.binarypb +++ b/core/src/main/java/com/google/errorprone/bugpatterns/apidiff/android_java8.binarypb @@ -7748,9 +7748,6 @@ $jdk/internal/jrtfs/JrtFileAttributes   jdk/nashorn/api/tree/Tree - - -java/util/Base64$Decoder . , *sun/text/resources/ext/CollationData_zh_TW @@ -10904,9 +10901,6 @@ Rorg/graalvm/compiler/replacements/nodes/arithmetic/IntegerExactArithmeticSplitN ) ' %jdk/internal/misc/JavaNetSocketAccess - - -java/util/Base64 9 7 5org/graalvm/compiler/nodes/calc/CompareNode$CompareOp @@ -18014,9 +18008,6 @@ $ H F Dorg/graalvm/compiler/hotspot/CompilerConfigurationFactory$BackendMap - - -java/util/Base64$Encoder * ( &jdk/internal/loader/BuiltinClassLoader @@ -36474,7 +36465,7 @@ VT replaceAll%(Ljava/util/function/UnaryOperator;)V( spliterator()Ljava/util/Spliterator; -ÒÏ +¸µ java/lang/reflect/Method9 printModifiersIfNonzero(Ljava/lang/StringBuilder;IZ)V? getAnnotatedReceiverType#()Ljava/lang/reflect/AnnotatedType; @@ -36511,8 +36502,7 @@ replaceAll%(Ljava/util/function/UnaryOperator;)V( checkAccess7(Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;I)VV getAnnotatedReturnType0;(Ljava/lang/reflect/Type;)Ljava/lang/reflect/AnnotatedType;B getAnnotatedExceptionTypes$()[Ljava/lang/reflect/AnnotatedType;K -getGenericInfo9()Lsun/reflect/generics/repository/ConstructorRepository; -getParameterCount()IM +getGenericInfo9()Lsun/reflect/generics/repository/ConstructorRepository;M getDeclaredAnnotation4(Ljava/lang/Class;)Ljava/lang/annotation/Annotation;/ getSharedExceptionTypes()[Ljava/lang/Class;/ getSharedParameterTypes()[Ljava/lang/Class;" @@ -37542,18 +37532,12 @@ replaceAll%(Ljava/util/function/UnaryOperator;)V toArray5(Ljava/util/function/IntFunction;)[Ljava/lang/Object;5 elementAt(([Ljava/lang/Object;I)Ljava/lang/Object;( spliterator()Ljava/util/Spliterator; -¶³ +˜• *java/util/concurrent/ConcurrentLinkedQueue$ -ITEMLjava/lang/invoke/VarHandle;- -removeIf!(Ljava/util/function/Predicate;)Z- -parallelStream()Ljava/util/stream/Stream;% -stream()Ljava/util/stream/Stream;` +ITEMLjava/lang/invoke/VarHandle;` forEachFromQ(Ljava/util/function/Consumer;Ljava/util/concurrent/ConcurrentLinkedQueue$Node;)V9 -head1Ljava/util/concurrent/ConcurrentLinkedQueue$Node;@ -toArray5(Ljava/util/function/IntFunction;)[Ljava/lang/Object;$ -NEXTLjava/lang/invoke/VarHandle;+ -forEach (Ljava/util/function/Consumer;)V( - spliterator()Ljava/util/Spliterator; +head1Ljava/util/concurrent/ConcurrentLinkedQueue$Node;$ +NEXTLjava/lang/invoke/VarHandle; ™– ;org/jcp/xml/dsig/internal/dom/DOMHMACSignatureMethod$SHA384n verifyd(Ljava/security/Key;Ljavax/xml/crypto/dsig/SignedInfo;[BLjavax/xml/crypto/dsig/XMLValidateContext;)Zg @@ -48421,14 +48405,12 @@ appendSelf@(Lcom/sun/org/apache/xml/internal/security/utils/ElementProxy;)V; setElement(Lorg/w3c/dom/Element;)VZ createElementForFamilyLocal;(Ljava/lang/String;Ljava/lang/String;)Lorg/w3c/dom/Element;< setLocalAttribute'(Ljava/lang/String;Ljava/lang/String;)V -Œ‰ +b` java/io/ByteArrayInputStream readNBytes([BII)I -readNBytes(I)[B' - -transferTo(Ljava/io/OutputStream;)J +readNBytes(I)[B readAllBytes()[B fd 7com/sun/org/apache/xml/internal/utils/res/XResources_it) @@ -51831,13 +51813,11 @@ vt getPosition()I setOpcode(S)V setLength(I)V -¯¬ +†ƒ java/io/InputStream readNBytes(I)[B - readAllBytes()[B' - -transferTo(Ljava/io/OutputStream;)J* + readAllBytes()[B* nullInputStream()Ljava/io/InputStream; readNBytes([BII)I @@ -52668,11 +52648,6 @@ VT !javax/xml/transform/FactoryFinder? find7(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Object;^ newInstanceO(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/ClassLoader;Z)Ljava/lang/Object; -Á¾ -java/util/concurrent/TimeUnit" -convert(Ljava/time/Duration;)J1 - toChronoUnit!()Ljava/time/temporal/ChronoUnit;F -of@(Ljava/time/temporal/ChronoUnit;)Ljava/util/concurrent/TimeUnit; ÷ô >com/sun/org/apache/xml/internal/serializer/XSLOutputAttributes; getOutputProperty&(Ljava/lang/String;)Ljava/lang/String;B @@ -56769,10 +56744,6 @@ Icom/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_zh_CN) rp Ccom/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_zh_TW) getBaseBundleName()Ljava/lang/String; -rp -java/lang/ThreadLocalE - withInitial6(Ljava/util/function/Supplier;)Ljava/lang/ThreadLocal; - isPresent()Z [Y $sun/security/x509/CRLNumberExtension1 get*(Ljava/lang/String;)Ljava/math/BigInteger; @@ -57135,6 +57106,9 @@ PN HF 1com/sun/java/util/jar/pack/ConstantPool$Utf8Entry tagEquals(I)Z ++) +java/lang/ThreadLocal + isPresent()Z [Y 8com/sun/java/swing/plaf/motif/MotifRadioButtonMenuItemUI doNotCloseOnMouseClick()Z diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/apidiff/AndroidJdkLibsCheckerTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/apidiff/AndroidJdkLibsCheckerTest.java index 2a5c2d4b8ed..1d18b0a080d 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/apidiff/AndroidJdkLibsCheckerTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/apidiff/AndroidJdkLibsCheckerTest.java @@ -243,4 +243,18 @@ public void parallelStream() { "}") .doTest(); } + + @Test + public void base64() { + compilationHelper + .addSourceLines( + "Test.java", // + "import java.util.Base64;", + "public class Test {", + " String f(byte[] code) {", + " return Base64.getUrlEncoder().encodeToString(code);", + " }", + "}") + .doTest(); + } }