[exo-jcr-commits] exo-jcr SVN: r5994 - in kernel/branches/2.3.x/patch/2.3.8-GA: KER-183 and 1 other directory.
do-not-reply at jboss.org
do-not-reply at jboss.org
Fri Mar 30 04:27:12 EDT 2012
Author: andrew.plotnikov
Date: 2012-03-30 04:27:11 -0400 (Fri, 30 Mar 2012)
New Revision: 5994
Added:
kernel/branches/2.3.x/patch/2.3.8-GA/KER-183/
kernel/branches/2.3.x/patch/2.3.8-GA/KER-183/KER-183.patch
Log:
KER-183: patch proposed
Added: kernel/branches/2.3.x/patch/2.3.8-GA/KER-183/KER-183.patch
===================================================================
--- kernel/branches/2.3.x/patch/2.3.8-GA/KER-183/KER-183.patch (rev 0)
+++ kernel/branches/2.3.x/patch/2.3.8-GA/KER-183/KER-183.patch 2012-03-30 08:27:11 UTC (rev 5994)
@@ -0,0 +1,41 @@
+Index: exo.kernel.commons/src/test/java/org/exoplatform/commons/utils/TestLogMessageFormatter.java
+===================================================================
+--- exo.kernel.commons/src/test/java/org/exoplatform/commons/utils/TestLogMessageFormatter.java (revision 5990)
++++ exo.kernel.commons/src/test/java/org/exoplatform/commons/utils/TestLogMessageFormatter.java (working copy)
+@@ -57,4 +57,17 @@
+ assertEquals(t, LogMessageFormatter.getThrowable(new Object(), t));
+ assertEquals(t, LogMessageFormatter.getThrowable("Just testing{}", new Object(), t));
+ }
++
++ public void testMessageIsNull() throws Exception
++ {
++ LogMessageFormatter.getMessage("Hello, World {} ", new A());
++ }
++
++ class A
++ {
++ public String toString()
++ {
++ return null;
++ }
++ }
+ }
+Index: exo.kernel.commons/src/main/java/org/exoplatform/services/log/impl/LogMessageFormatter.java
+===================================================================
+--- exo.kernel.commons/src/main/java/org/exoplatform/services/log/impl/LogMessageFormatter.java (revision 5990)
++++ exo.kernel.commons/src/main/java/org/exoplatform/services/log/impl/LogMessageFormatter.java (working copy)
+@@ -41,13 +41,11 @@
+ {
+ if (i != argsArray.length - 1 || !(argsArray[i] instanceof Throwable))
+ {
+- str = REPLACE_PATTERN.matcher(str).replaceFirst(String.valueOf(argsArray[i]));
++ str = REPLACE_PATTERN.matcher(str).replaceFirst(String.valueOf(argsArray[i].toString()));
+ }
+ }
+ }
+ return str;
+-
+-
+ }
+
+ public static Throwable getThrowable(Object... argsArray)
More information about the exo-jcr-commits
mailing list