(Object[] array1, Object[] array2)
| 1843 | /// same length and the elements at each index in the two arrays are |
| 1844 | /// equal according to `equals()`, `false` otherwise. |
| 1845 | public static boolean deepEquals(Object[] array1, Object[] array2) { |
| 1846 | if (array1 == array2) { |
| 1847 | return true; |
| 1848 | } |
| 1849 | if (array1 == null || array2 == null || array1.length != array2.length) { |
| 1850 | return false; |
| 1851 | } |
| 1852 | for (int i = 0; i < array1.length; i++) { |
| 1853 | Object e1 = array1[i], e2 = array2[i]; |
| 1854 | |
| 1855 | if (!deepEqualsElements(e1, e2)) { |
| 1856 | return false; |
| 1857 | } |
| 1858 | } |
| 1859 | return true; |
| 1860 | } |
| 1861 | |
| 1862 | private static boolean deepEqualsElements(Object e1, Object e2) { |
| 1863 | Class<?> cl1, cl2; |
no test coverage detected