Skip to content

Commit 2328665

Browse files
fix: add NULL_OBJECT to util.Data to work around Graal 24 issue
1 parent 0d17261 commit 2328665

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • google-http-client/src/main/java/com/google/api/client/util

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ public class Data {
9191
/** The single instance of the magic null object for a {@link DateTime}. */
9292
public static final DateTime NULL_DATE_TIME = new DateTime(0);
9393

94+
/** The single instance of the magic null object for a {@link Object}. */
95+
public static final Object NULL_OBJECT = new Object();
96+
9497
/** Cache of the magic null object for the given Java class. */
9598
private static final ConcurrentHashMap<Class<?>, Object> NULL_CACHE =
9699
new ConcurrentHashMap<Class<?>, Object>();
@@ -109,6 +112,7 @@ public class Data {
109112
NULL_CACHE.put(BigInteger.class, NULL_BIG_INTEGER);
110113
NULL_CACHE.put(BigDecimal.class, NULL_BIG_DECIMAL);
111114
NULL_CACHE.put(DateTime.class, NULL_DATE_TIME);
115+
NULL_CACHE.put(Object.class, NULL_OBJECT);
112116
}
113117

114118
/**

0 commit comments

Comments
 (0)