MCPcopy Index your code
hub / github.com/assertj/assertj / areEqualArrays

Method areEqualArrays

src/main/java/org/assertj/core/util/Objects.java:47–66  ·  view source on GitHub ↗
(Object o1, Object o2)

Source from the content-addressed store, hash-verified

45 }
46
47 public static boolean areEqualArrays(Object o1, Object o2) {
48 if (!isArray(o1) || !isArray(o2)) {
49 return false;
50 }
51 if (o1 == o2) {
52 return true;
53 }
54 int size = Array.getLength(o1);
55 if (Array.getLength(o2) != size) {
56 return false;
57 }
58 for (int i = 0; i < size; i++) {
59 Object e1 = Array.get(o1, i);
60 Object e2 = Array.get(o2, i);
61 if (!areEqual(e1, e2)) {
62 return false;
63 }
64 }
65 return true;
66 }
67
68 /**
69 * Returns an array containing the names of the given types.

Callers 1

areEqualMethod · 0.95

Calls 3

areEqualMethod · 0.95
isArrayMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected