logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1566199 - /logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/ParameterizedMessage.java
Date Sun, 09 Feb 2014 03:33:50 GMT
Author: ggregory
Date: Sun Feb  9 03:33:50 2014
New Revision: 1566199

URL: http://svn.apache.org/r1566199
Log:
PMD: These nested if statements could be combined.

Modified:
    logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/ParameterizedMessage.java

Modified: logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/ParameterizedMessage.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/ParameterizedMessage.java?rev=1566199&r1=1566198&r2=1566199&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/ParameterizedMessage.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/ParameterizedMessage.java
Sun Feb  9 03:33:50 2014
@@ -329,13 +329,9 @@ public class ParameterizedMessage implem
             if (curChar == ESCAPE_CHAR) {
                 isEscaped = !isEscaped;
             } else if (curChar == DELIM_START) {
-                if (!isEscaped) {
-                    if (i < messagePattern.length() - 1) {
-                        if (messagePattern.charAt(i + 1) == DELIM_STOP) {
-                            result++;
-                            i++;
-                        }
-                    }
+                if (!isEscaped && i < messagePattern.length() - 1 && messagePattern.charAt(i
+ 1) == DELIM_STOP) {
+                    result++;
+                    i++;
                 }
                 isEscaped = false;
             } else {



Mime
View raw message