From 0e4a6ee6b683ec1861ab917abdf615b386e82862 Mon Sep 17 00:00:00 2001 From: Diego Marquez Date: Wed, 8 Oct 2025 15:17:35 -0400 Subject: [PATCH] chore: remove workaround for GraalVM Object instantiation Fixes https://github.com/googleapis/google-http-java-client/issues/2105 --- .../src/main/java/com/google/api/client/util/Types.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/google-http-client/src/main/java/com/google/api/client/util/Types.java b/google-http-client/src/main/java/com/google/api/client/util/Types.java index e9d19d251..8a49b438e 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/Types.java +++ b/google-http-client/src/main/java/com/google/api/client/util/Types.java @@ -106,12 +106,6 @@ public static boolean isAssignableToOrFrom(Class classToCheck, Class anoth * an array or an interface or be abstract. If an enclosing class, it must be static. */ public static T newInstance(Class clazz) { - // This is a workaround for https://github.com/oracle/graal/issues/11429. Remove this line once - // the GraalVM team has provided a solution or workaround for this. - if (clazz.getName().equals("java.lang.Object")) { - return (T) new Object(); - } - // TODO(yanivi): investigate "sneaky" options for allocating the class that GSON uses, like // setting the constructor to be accessible, or possibly provide a factory method of a special // name