MCPcopy Index your code
hub / github.com/ccxt/ccxt / isArrayJs

Method isArrayJs

java/lib/src/main/java/io/github/ccxt/Helpers.java:245–249  ·  view source on GitHub ↗

Null-safe Array.isArray equivalent. ast-transpiler emits `(X instanceof List) || (X.getClass().isArray())` for `Array.isArray(X)`, which NPEs when X is null (e.g. test.sharedMethods entryKeyVal coming from safeValue() that returned undefined). JS Array.isArray(null) is false; mirror that here. Used

(Object a)

Source from the content-addressed store, hash-verified

243 * 150+ call sites become null-safe in one place.
244 */
245 public static boolean isArrayJs(Object a) {
246 if (a == null) return false;
247 if (a instanceof List<?>) return true;
248 return a.getClass().isArray();
249 }
250
251 /**
252 * Direct emit target for ast-transpiler PR #48: `Array.isArray(x)` now

Callers 1

isArrayMethod · 0.95

Calls 1

isArrayMethod · 0.45

Tested by

no test coverage detected