From 2154d864157e7a49e0b893c38ea9f83c06ec3cad Mon Sep 17 00:00:00 2001 From: Benedikt Ritter Date: Tue, 7 May 2013 06:54:35 +0000 Subject: [PATCH] Comment why a anonymous subclass is used here git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1479780 13f79535-47bb-0310-9956-ffa450edef68 --- .../commons/lang3/exception/ContextedRuntimeExceptionTest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/test/java/org/apache/commons/lang3/exception/ContextedRuntimeExceptionTest.java b/src/test/java/org/apache/commons/lang3/exception/ContextedRuntimeExceptionTest.java index 7eca04205..aecb7979d 100644 --- a/src/test/java/org/apache/commons/lang3/exception/ContextedRuntimeExceptionTest.java +++ b/src/test/java/org/apache/commons/lang3/exception/ContextedRuntimeExceptionTest.java @@ -79,6 +79,7 @@ public class ContextedRuntimeExceptionTest extends AbstractExceptionContextTest< @Test public void testContextedExceptionStringThrowableContext() { + // Use an anonymous subclass to make sure users can provide custom implementations exceptionContext = new ContextedRuntimeException(TEST_MESSAGE_2, new Exception(TEST_MESSAGE), new DefaultExceptionContext() {}); final String message = exceptionContext.getMessage(); final String trace = ExceptionUtils.getStackTrace(exceptionContext);