You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by gg...@apache.org on 2012/10/09 13:30:23 UTC

svn commit: r1395969 - /logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/Timer.java

Author: ggregory
Date: Tue Oct  9 11:30:22 2012
New Revision: 1395969

URL: http://svn.apache.org/viewvc?rev=1395969&view=rev
Log:
This is the only place we did not use blocks for one-liners. 

Modified:
    logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/Timer.java

Modified: logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/Timer.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/Timer.java?rev=1395969&r1=1395968&r2=1395969&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/Timer.java (original)
+++ logging/log4j/log4j2/trunk/api/src/test/java/org/apache/logging/log4j/Timer.java Tue Oct  9 11:30:22 2012
@@ -229,15 +229,27 @@ public class Timer implements Serializab
 
     @Override
     public boolean equals(Object o) {
-        if (this == o) return true;
-        if (!(o instanceof Timer)) return false;
+        if (this == o) {
+            return true;
+        }
+        if (!(o instanceof Timer)) {
+            return false;
+        }
 
         final Timer timer = (Timer) o;
 
-        if (m_elapsedTime != timer.m_elapsedTime) return false;
-        if (m_startTime != timer.m_startTime) return false;
-        if (m_name != null ? !m_name.equals(timer.m_name) : timer.m_name != null) return false;
-        if (m_status != null ? !m_status.equals(timer.m_status) : timer.m_status != null) return false;
+        if (m_elapsedTime != timer.m_elapsedTime) {
+            return false;
+        }
+        if (m_startTime != timer.m_startTime) {
+            return false;
+        }
+        if (m_name != null ? !m_name.equals(timer.m_name) : timer.m_name != null) {
+            return false;
+        }
+        if (m_status != null ? !m_status.equals(timer.m_status) : timer.m_status != null) {
+            return false;
+        }
 
         return true;
     }