Skip to content

Commit 9e3c57a

Browse files
chore: remove workaround for GraalVM Object instantiation (#2121)
Fixes #2105 Co-authored-by: Lawrence Qiu <[email protected]>
1 parent 9efc208 commit 9e3c57a

File tree

1 file changed

+0
-6
lines changed
  • google-http-client/src/main/java/com/google/api/client/util

1 file changed

+0
-6
lines changed

google-http-client/src/main/java/com/google/api/client/util/Types.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,6 @@ public static boolean isAssignableToOrFrom(Class<?> classToCheck, Class<?> anoth
106106
* an array or an interface or be abstract. If an enclosing class, it must be static.
107107
*/
108108
public static <T> T newInstance(Class<T> clazz) {
109-
// This is a workaround for https://github.com/oracle/graal/issues/11429. Remove this line once
110-
// the GraalVM team has provided a solution or workaround for this.
111-
if (clazz.getName().equals("java.lang.Object")) {
112-
return (T) new Object();
113-
}
114-
115109
// TODO(yanivi): investigate "sneaky" options for allocating the class that GSON uses, like
116110
// setting the constructor to be accessible, or possibly provide a factory method of a special
117111
// name

0 commit comments

Comments
 (0)