@Test public void testMultiDimensionalArrayValues() { Integer[][] multiIntegerA = new Integer[][] { ia0, ia1 }; result = MessageFormatter.arrayFormat("{}{}", new Object[] { "a", multiIntegerA }).getMessage(); assertEquals("a[[1, 2, 3], [10, 20, 30]]", result); int[][] multiIntA = new int[][] { { 1, 2 }, { 10, 20 } }; result = MessageFormatter.arrayFormat("{}{}", new Object[] { "a", multiIntA }).getMessage(); assertEquals("a[[1, 2], [10, 20]]", result); float[][] multiFloatA = new float[][] { { 1, 2 }, { 10, 20 } }; result = MessageFormatter.arrayFormat("{}{}", new Object[] { "a", multiFloatA }).getMessage(); assertEquals("a[[1.0, 2.0], [10.0, 20.0]]", result); Object[][] multiOA = new Object[][] { ia0, ia1 }; result = MessageFormatter.arrayFormat("{}{}", new Object[] { "a", multiOA }).getMessage(); assertEquals("a[[1, 2, 3], [10, 20, 30]]", result); Object[][][] _3DOA = new Object[][][] { multiOA, multiOA }; result = MessageFormatter.arrayFormat("{}{}", new Object[] { "a", _3DOA }).getMessage(); assertEquals("a[[[1, 2, 3], [10, 20, 30]], [[1, 2, 3], [10, 20, 30]]]", result); }
final public static FormattingTuple arrayFormat(final String messagePattern, final Object[] argArray) { Throwable throwableCandidate = MessageFormatter.getThrowableCandidate(argArray); Object[] args = argArray; if (throwableCandidate != null) { args = MessageFormatter.trimmedCopy(argArray); } return arrayFormat(messagePattern, args, throwableCandidate); }
MessageFormatter { final public static FormattingTuple arrayFormat(final String messagePattern, final Object[] argArray) { Throwable throwableCandidate = MessageFormatter.getThrowableCandidate(argArray); Object[] args = argArray; if (throwableCandidate != null) { args = MessageFormatter.trimmedCopy(argArray); } return arrayFormat(messagePattern, args, throwableCandidate); } }
MessageFormatter { final public static FormattingTuple arrayFormat(final String messagePattern, final Object[] argArray) { Throwable throwableCandidate = MessageFormatter.getThrowableCandidate(argArray); Object[] args = argArray; if (throwableCandidate != null) { args = MessageFormatter.trimmedCopy(argArray); } return arrayFormat(messagePattern, args, throwableCandidate); }  }
MessageFormatter { final public static FormattingTuple arrayFormat(final String messagePattern, final Object[] argArray) { Throwable throwableCandidate = MessageFormatter.getThrowableCandidate(argArray); Object[] args = argArray; if (throwableCandidate != null) { args = MessageFormatter.trimmedCopy(argArray); } return arrayFormat(messagePattern, args, throwableCandidate); }  final static FormattingTuple format(String messagePattern, Object arg); final static FormattingTuple format(final String messagePattern, Object arg1, Object arg2); final static FormattingTuple arrayFormat(final String messagePattern, final Object[] argArray); final static String basicArrayFormat(final String messagePattern, final Object[] argArray); static String basicArrayFormat(NormalizedParameters np); final static FormattingTuple arrayFormat(final String messagePattern, final Object[] argArray, Throwable throwable); static Throwable getThrowableCandidate(final Object[] argArray); static Object[] trimmedCopy(final Object[] argArray); }
MessageFormatter { final public static FormattingTuple arrayFormat(final String messagePattern, final Object[] argArray) { Throwable throwableCandidate = MessageFormatter.getThrowableCandidate(argArray); Object[] args = argArray; if (throwableCandidate != null) { args = MessageFormatter.trimmedCopy(argArray); } return arrayFormat(messagePattern, args, throwableCandidate); }  final static FormattingTuple format(String messagePattern, Object arg); final static FormattingTuple format(final String messagePattern, Object arg1, Object arg2); final static FormattingTuple arrayFormat(final String messagePattern, final Object[] argArray); final static String basicArrayFormat(final String messagePattern, final Object[] argArray); static String basicArrayFormat(NormalizedParameters np); final static FormattingTuple arrayFormat(final String messagePattern, final Object[] argArray, Throwable throwable); static Throwable getThrowableCandidate(final Object[] argArray); static Object[] trimmedCopy(final Object[] argArray);  }