logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1567107 - in /logging/log4j/trunk: src/main/java/org/apache/log4j/ src/main/java/org/apache/log4j/config/ src/main/java/org/apache/log4j/helpers/ src/main/java/org/apache/log4j/jdbc/ src/main/java/org/apache/log4j/jmx/ src/main/java/org/ap...
Date Tue, 11 Feb 2014 13:21:16 GMT
Author: ggregory
Date: Tue Feb 11 13:21:15 2014
New Revision: 1567107

URL: http://svn.apache.org/r1567107
Log:
Convert control statement bodies to block.

Modified:
    logging/log4j/trunk/src/main/java/org/apache/log4j/AppenderSkeleton.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/Category.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/CategoryKey.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/HTMLLayout.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/Hierarchy.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/NDC.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/PropertyConfigurator.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/RollingFileAppender.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/WriterAppender.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/config/PropertyGetter.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/config/PropertyPrinter.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/config/PropertySetter.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/AbsoluteTimeDateFormat.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/AppenderAttachableImpl.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/BoundedFIFO.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/CyclicBuffer.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/DateTimeDateFormat.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/ISO8601DateFormat.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/Loader.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/LogLog.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/OptionConverter.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/PatternConverter.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/PatternParser.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/jdbc/JDBCAppender.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/jmx/AbstractDynamicMBean.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/jmx/AppenderDynamicMBean.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/net/JMSAppender.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/net/SMTPAppender.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/net/SocketAppender.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/net/SocketHubAppender.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/net/SocketServer.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/net/SyslogAppender.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/or/RendererMap.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/pattern/LogEvent.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/spi/LocationInfo.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/spi/LoggingEvent.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/varia/LevelMatchFilter.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/varia/Roller.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/varia/StringMatchFilter.java
    logging/log4j/trunk/src/main/java/org/apache/log4j/xml/DOMConfigurator.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/StressCategory.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/VectorAppender.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/customLogger/XLogger.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/BoundedFIFOTestCase.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/CyclicBufferTestCase.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/net/SocketAppenderTest.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/net/TelnetAppenderTest.java

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/AppenderSkeleton.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/AppenderSkeleton.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/AppenderSkeleton.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/AppenderSkeleton.java Tue Feb 11 13:21:15 2014
@@ -137,8 +137,9 @@ public abstract class AppenderSkeleton i
   void finalize() {
     // An appender might be closed then garbage collected. There is no
     // point in closing twice.
-    if(this.closed) 
-      return;
+    if(this.closed) {
+        return;
+    }
 
     LogLog.debug("Finalizing appender named ["+name+"].");
     close();

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/Category.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/Category.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/Category.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/Category.java Tue Feb 11 13:21:15 2014
@@ -180,8 +180,9 @@ public class Category implements Appende
      @since 1.2 */
   public
   void assertLog(boolean assertion, String msg) {
-    if(!assertion)
-      this.error(msg);
+    if(!assertion) {
+        this.error(msg);
+    }
   }
 
 
@@ -254,8 +255,9 @@ public class Category implements Appende
     @param message the message object to log. */
   public
   void debug(Object message) {
-    if(repository.isDisabled(Level.DEBUG_INT))
-      return;
+    if(repository.isDisabled(Level.DEBUG_INT)) {
+        return;
+    }
     if(Level.DEBUG.isGreaterOrEqual(this.getEffectiveLevel())) {
       forcedLog(FQCN, Level.DEBUG, message, null);
     }
@@ -273,10 +275,12 @@ public class Category implements Appende
    @param t the exception to log, including its stack trace.  */
   public
   void debug(Object message, Throwable t) {
-    if(repository.isDisabled(Level.DEBUG_INT))
-      return;
-    if(Level.DEBUG.isGreaterOrEqual(this.getEffectiveLevel()))
-      forcedLog(FQCN, Level.DEBUG, message, t);
+    if(repository.isDisabled(Level.DEBUG_INT)) {
+        return;
+    }
+    if(Level.DEBUG.isGreaterOrEqual(this.getEffectiveLevel())) {
+        forcedLog(FQCN, Level.DEBUG, message, t);
+    }
   }
 
   /**
@@ -299,10 +303,12 @@ public class Category implements Appende
     @param message the message object to log */
   public
   void error(Object message) {
-    if(repository.isDisabled(Level.ERROR_INT))
-      return;
-    if(Level.ERROR.isGreaterOrEqual(this.getEffectiveLevel()))
-      forcedLog(FQCN, Level.ERROR, message, null);
+    if(repository.isDisabled(Level.ERROR_INT)) {
+        return;
+    }
+    if(Level.ERROR.isGreaterOrEqual(this.getEffectiveLevel())) {
+        forcedLog(FQCN, Level.ERROR, message, null);
+    }
   }
 
   /**
@@ -316,10 +322,12 @@ public class Category implements Appende
    @param t the exception to log, including its stack trace.  */
   public
   void error(Object message, Throwable t) {
-    if(repository.isDisabled(Level.ERROR_INT))
-      return;
-    if(Level.ERROR.isGreaterOrEqual(this.getEffectiveLevel()))
-      forcedLog(FQCN, Level.ERROR, message, t);
+    if(repository.isDisabled(Level.ERROR_INT)) {
+        return;
+    }
+    if(Level.ERROR.isGreaterOrEqual(this.getEffectiveLevel())) {
+        forcedLog(FQCN, Level.ERROR, message, t);
+    }
 
   }
 
@@ -359,10 +367,12 @@ public class Category implements Appende
     @param message the message object to log */
   public
   void fatal(Object message) {
-    if(repository.isDisabled(Level.FATAL_INT))
-      return;
-    if(Level.FATAL.isGreaterOrEqual(this.getEffectiveLevel()))
-      forcedLog(FQCN, Level.FATAL, message, null);
+    if(repository.isDisabled(Level.FATAL_INT)) {
+        return;
+    }
+    if(Level.FATAL.isGreaterOrEqual(this.getEffectiveLevel())) {
+        forcedLog(FQCN, Level.FATAL, message, null);
+    }
   }
 
   /**
@@ -376,10 +386,12 @@ public class Category implements Appende
    @param t the exception to log, including its stack trace.  */
   public
   void fatal(Object message, Throwable t) {
-    if(repository.isDisabled(Level.FATAL_INT))
-      return;
-    if(Level.FATAL.isGreaterOrEqual(this.getEffectiveLevel()))
-      forcedLog(FQCN, Level.FATAL, message, t);
+    if(repository.isDisabled(Level.FATAL_INT)) {
+        return;
+    }
+    if(Level.FATAL.isGreaterOrEqual(this.getEffectiveLevel())) {
+        forcedLog(FQCN, Level.FATAL, message, t);
+    }
   }
 
 
@@ -409,10 +421,11 @@ public class Category implements Appende
   synchronized
   public
   Enumeration getAllAppenders() {
-    if(aai == null)
-      return NullEnumeration.getInstance();
-    else
-      return aai.getAllAppenders();
+    if(aai == null) {
+        return NullEnumeration.getInstance();
+    } else {
+        return aai.getAllAppenders();
+    }
   }
 
   /**
@@ -423,8 +436,9 @@ public class Category implements Appende
   synchronized
   public
   Appender getAppender(String name) {
-     if(aai == null || name == null)
-      return null;
+     if(aai == null || name == null) {
+        return null;
+    }
 
      return aai.getAppender(name);
   }
@@ -440,8 +454,9 @@ public class Category implements Appende
   public
   Level getEffectiveLevel() {
     for(Category c = this; c != null; c=c.parent) {
-      if(c.level != null)
-	return c.level;
+      if(c.level != null) {
+        return c.level;
+    }
     }
     return null; // If reached will cause an NullPointerException.
   }
@@ -454,8 +469,9 @@ public class Category implements Appende
   public
   Priority getChainedPriority() {
     for(Category c = this; c != null; c=c.parent) {
-      if(c.level != null)
-	return c.level;
+      if(c.level != null) {
+        return c.level;
+    }
     }
     return null; // If reached will cause an NullPointerException.
   }
@@ -601,8 +617,9 @@ public class Category implements Appende
   public
   ResourceBundle getResourceBundle() {
     for(Category c = this; c != null; c=c.parent) {
-      if(c.resourceBundle != null)
-	return c.resourceBundle;
+      if(c.resourceBundle != null) {
+        return c.resourceBundle;
+    }
     }
     // It might be the case that there is no resource bundle
     return null;
@@ -660,10 +677,12 @@ public class Category implements Appende
     @param message the message object to log */
   public
   void info(Object message) {
-    if(repository.isDisabled(Level.INFO_INT))
-      return;
-    if(Level.INFO.isGreaterOrEqual(this.getEffectiveLevel()))
-      forcedLog(FQCN, Level.INFO, message, null);
+    if(repository.isDisabled(Level.INFO_INT)) {
+        return;
+    }
+    if(Level.INFO.isGreaterOrEqual(this.getEffectiveLevel())) {
+        forcedLog(FQCN, Level.INFO, message, null);
+    }
   }
 
   /**
@@ -677,10 +696,12 @@ public class Category implements Appende
    @param t the exception to log, including its stack trace.  */
   public
   void info(Object message, Throwable t) {
-    if(repository.isDisabled(Level.INFO_INT))
-      return;
-    if(Level.INFO.isGreaterOrEqual(this.getEffectiveLevel()))
-      forcedLog(FQCN, Level.INFO, message, t);
+    if(repository.isDisabled(Level.INFO_INT)) {
+        return;
+    }
+    if(Level.INFO.isGreaterOrEqual(this.getEffectiveLevel())) {
+        forcedLog(FQCN, Level.INFO, message, t);
+    }
   }
 
   /**
@@ -688,9 +709,9 @@ public class Category implements Appende
    */
   public
   boolean isAttached(Appender appender) {
-    if(appender == null || aai == null)
-      return false;
-    else {
+    if(appender == null || aai == null) {
+        return false;
+    } else {
       return aai.isAttached(appender);
     }
   }
@@ -731,8 +752,9 @@ public class Category implements Appende
     *   */
   public
   boolean isDebugEnabled() {
-    if(repository.isDisabled( Level.DEBUG_INT))
-      return false;
+    if(repository.isDisabled( Level.DEBUG_INT)) {
+        return false;
+    }
     return Level.DEBUG.isGreaterOrEqual(this.getEffectiveLevel());
   }
 
@@ -746,8 +768,9 @@ public class Category implements Appende
   */
   public
   boolean isEnabledFor(Priority level) {
-    if(repository.isDisabled(level.level))
-      return false;
+    if(repository.isDisabled(level.level)) {
+        return false;
+    }
     return level.isGreaterOrEqual(this.getEffectiveLevel());
   }
 
@@ -760,8 +783,9 @@ public class Category implements Appende
   */
   public
   boolean isInfoEnabled() {
-    if(repository.isDisabled(Level.INFO_INT))
-      return false;
+    if(repository.isDisabled(Level.INFO_INT)) {
+        return false;
+    }
     return Level.INFO.isGreaterOrEqual(this.getEffectiveLevel());
   }
 
@@ -806,10 +830,11 @@ public class Category implements Appende
     if(priority.isGreaterOrEqual(this.getEffectiveLevel())) {
       String pattern = getResourceBundleString(key);
       String msg;
-      if(pattern == null)
-	msg = key;
-      else
-	msg = java.text.MessageFormat.format(pattern, params);
+      if(pattern == null) {
+        msg = key;
+    } else {
+        msg = java.text.MessageFormat.format(pattern, params);
+    }
       forcedLog(FQCN, priority, msg, t);
     }
   }
@@ -822,8 +847,9 @@ public class Category implements Appende
     if(repository.isDisabled(priority.level)) {
       return;
     }
-    if(priority.isGreaterOrEqual(this.getEffectiveLevel()))
-      forcedLog(FQCN, priority, message, t);
+    if(priority.isGreaterOrEqual(this.getEffectiveLevel())) {
+        forcedLog(FQCN, priority, message, t);
+    }
   }
 
  /**
@@ -834,8 +860,9 @@ public class Category implements Appende
     if(repository.isDisabled(priority.level)) {
       return;
     }
-    if(priority.isGreaterOrEqual(this.getEffectiveLevel()))
-      forcedLog(FQCN, priority, message, null);
+    if(priority.isGreaterOrEqual(this.getEffectiveLevel())) {
+        forcedLog(FQCN, priority, message, null);
+    }
   }
 
   /**
@@ -905,8 +932,9 @@ public class Category implements Appende
   synchronized
   public
   void removeAppender(Appender appender) {
-    if(appender == null || aai == null)
-      return;
+    if(appender == null || aai == null) {
+        return;
+    }
     boolean wasAttached = aai.isAttached(appender);
     aai.removeAppender(appender);
     if (wasAttached) {
@@ -922,7 +950,9 @@ public class Category implements Appende
   synchronized
   public
   void removeAppender(String name) {
-    if(name == null || aai == null) return;
+    if(name == null || aai == null) {
+        return;
+    }
     Appender appender = aai.getAppender(name);
     aai.removeAppender(name);
     if (appender != null) {
@@ -1036,11 +1066,13 @@ public class Category implements Appende
     @param message the message object to log.  */
   public
   void warn(Object message) {
-    if(repository.isDisabled( Level.WARN_INT))
-      return;
+    if(repository.isDisabled( Level.WARN_INT)) {
+        return;
+    }
 
-    if(Level.WARN.isGreaterOrEqual(this.getEffectiveLevel()))
-      forcedLog(FQCN, Level.WARN, message, null);
+    if(Level.WARN.isGreaterOrEqual(this.getEffectiveLevel())) {
+        forcedLog(FQCN, Level.WARN, message, null);
+    }
   }
 
   /**
@@ -1054,9 +1086,11 @@ public class Category implements Appende
    @param t the exception to log, including its stack trace.  */
   public
   void warn(Object message, Throwable t) {
-    if(repository.isDisabled(Level.WARN_INT))
-      return;
-    if(Level.WARN.isGreaterOrEqual(this.getEffectiveLevel()))
-      forcedLog(FQCN, Level.WARN, message, t);
+    if(repository.isDisabled(Level.WARN_INT)) {
+        return;
+    }
+    if(Level.WARN.isGreaterOrEqual(this.getEffectiveLevel())) {
+        forcedLog(FQCN, Level.WARN, message, t);
+    }
   }
 }

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/CategoryKey.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/CategoryKey.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/CategoryKey.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/CategoryKey.java Tue Feb 11 13:21:15 2014
@@ -41,12 +41,14 @@ class CategoryKey {
   final
   public
   boolean equals(Object rArg) {
-    if(this == rArg)
-      return true;
+    if(this == rArg) {
+        return true;
+    }
     
-    if(rArg != null && CategoryKey.class == rArg.getClass()) 
-      return  name.equals(((CategoryKey)rArg ).name);
-    else 
-      return false;
+    if(rArg != null && CategoryKey.class == rArg.getClass()) {
+        return  name.equals(((CategoryKey)rArg ).name);
+    } else {
+        return false;
+    }
   }
 }

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/HTMLLayout.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/HTMLLayout.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/HTMLLayout.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/HTMLLayout.java Tue Feb 11 13:21:15 2014
@@ -198,8 +198,9 @@ public class HTMLLayout extends Layout {
   void appendThrowableAsHTML(String[] s, StringBuffer sbuf) {
     if(s != null) {
       int len = s.length;
-      if(len == 0)
-	return;
+      if(len == 0) {
+        return;
+    }
       sbuf.append(Transform.escapeTags(s[0]));
       sbuf.append(Layout.LINE_SEP);
       for(int i = 1; i < len; i++) {

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/Hierarchy.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/Hierarchy.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/Hierarchy.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/Hierarchy.java Tue Feb 11 13:21:15 2014
@@ -534,8 +534,9 @@ public class Hierarchy implements Logger
       }
     }
     // If we could not find any existing parents, then link with root.
-    if(!parentFound)
-      cat.parent = root;
+    if(!parentFound) {
+        cat.parent = root;
+    }
   }
 
   /**

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/NDC.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/NDC.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/NDC.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/NDC.java Tue Feb 11 13:21:15 2014
@@ -151,8 +151,9 @@ public class NDC {
   static
   void clear() {
     Stack stack = getCurrentStack();    
-    if(stack != null) 
-      stack.setSize(0);    
+    if(stack != null) {
+        stack.setSize(0);
+    }    
   }
 
   
@@ -174,9 +175,9 @@ public class NDC {
   static
   Stack cloneStack() {
     Stack stack = getCurrentStack();
-    if(stack == null)
-      return null;
-    else {
+    if(stack == null) {
+        return null;
+    } else {
       return (Stack) stack.clone();
     }
   }
@@ -205,8 +206,9 @@ public class NDC {
   public
   static
   void inherit(Stack stack) {
-    if(stack != null)
-      ht.put(Thread.currentThread(), stack);
+    if(stack != null) {
+        ht.put(Thread.currentThread(), stack);
+    }
   }
 
 
@@ -218,10 +220,11 @@ public class NDC {
   public
   String get() {
     Stack s = getCurrentStack();
-    if(s != null && !s.isEmpty()) 
-      return ((DiagnosticContext) s.peek()).fullMessage;
-    else
-      return null;
+    if(s != null && !s.isEmpty()) {
+        return ((DiagnosticContext) s.peek()).fullMessage;
+    } else {
+        return null;
+    }
   }
   
   /**
@@ -234,16 +237,19 @@ public class NDC {
   static
   int getDepth() {
     Stack stack = getCurrentStack();          
-    if(stack == null)
-      return 0;
-    else
-      return stack.size();      
+    if(stack == null) {
+        return 0;
+    } else {
+        return stack.size();
+    }      
   }
 
   private
   static
   void lazyRemove() {
-    if (ht == null) return;
+    if (ht == null) {
+        return;
+    }
      
     // The synchronization on ht is necessary to prevent JDK 1.2.x from
     // throwing ConcurrentModificationExceptions at us. This sucks BIG-TIME.
@@ -299,10 +305,11 @@ public class NDC {
   static
   String pop() {
     Stack stack = getCurrentStack();
-    if(stack != null && !stack.isEmpty()) 
-      return ((DiagnosticContext) stack.pop()).message;
-    else
-      return "";
+    if(stack != null && !stack.isEmpty()) {
+        return ((DiagnosticContext) stack.pop()).message;
+    } else {
+        return "";
+    }
   }
 
   /**
@@ -319,10 +326,11 @@ public class NDC {
   static
   String peek() {
     Stack stack = getCurrentStack();
-    if(stack != null && !stack.isEmpty())
-      return ((DiagnosticContext) stack.peek()).message;
-    else
-      return "";
+    if(stack != null && !stack.isEmpty()) {
+        return ((DiagnosticContext) stack.peek()).message;
+    } else {
+        return "";
+    }
   }
   
   /**
@@ -413,8 +421,9 @@ public class NDC {
   public
   void setMaxDepth(int maxDepth) {
     Stack stack = getCurrentStack();    
-    if(stack != null && maxDepth < stack.size()) 
-      stack.setSize(maxDepth);
+    if(stack != null && maxDepth < stack.size()) {
+        stack.setSize(maxDepth);
+    }
   }
   
   // =====================================================================

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/PropertyConfigurator.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/PropertyConfigurator.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/PropertyConfigurator.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/PropertyConfigurator.java Tue Feb 11 13:21:15 2014
@@ -487,8 +487,9 @@ new PropertyConfigurator().doConfigure(i
     String value = properties.getProperty(LogLog.DEBUG_KEY);
     if(value == null) {
       value = properties.getProperty("log4j.configDebug");
-      if(value != null)
-	LogLog.warn("[log4j.configDebug] is deprecated. Use [log4j.debug] instead.");
+      if(value != null) {
+        LogLog.warn("[log4j.configDebug] is deprecated. Use [log4j.debug] instead.");
+    }
     }
 
     if(value != null) {
@@ -640,9 +641,9 @@ new PropertyConfigurator().doConfigure(i
       effectiveFrefix = ROOT_CATEGORY_PREFIX;
     }
 
-    if(value == null)
-      LogLog.debug("Could not find root logger information. Is this OK?");
-    else {
+    if(value == null) {
+        LogLog.debug("Could not find root logger information. Is this OK?");
+    } else {
       Logger root = hierarchy.getRootLogger();
       synchronized(root) {
 	parseCategory(props, root, effectiveFrefix, INTERNAL_ROOT_NAME, value);
@@ -733,8 +734,9 @@ new PropertyConfigurator().doConfigure(i
     if(!(value.startsWith(",") || value.equals(""))) {
 
       // just to be on the safe side...
-      if(!st.hasMoreTokens())
-	return;
+      if(!st.hasMoreTokens()) {
+        return;
+    }
 
       String levelStr = st.nextToken();
       LogLog.debug("Level token is [" + levelStr + "].");
@@ -762,8 +764,9 @@ new PropertyConfigurator().doConfigure(i
     String appenderName;
     while(st.hasMoreTokens()) {
       appenderName = st.nextToken().trim();
-      if(appenderName == null || appenderName.equals(","))
-	continue;
+      if(appenderName == null || appenderName.equals(",")) {
+        continue;
+    }
       LogLog.debug("Parsing appender named \"" + appenderName +"\".");
       appender = parseAppender(props, appenderName);
       if(appender != null) {
@@ -827,7 +830,9 @@ new PropertyConfigurator().doConfigure(i
     				  Map.Entry entry = (Map.Entry) iter.next();
     				  int i = 0;
     				  for(; i < keys.length; i++) {
-    					  if(keys[i].equals(entry.getKey())) break;
+    					  if(keys[i].equals(entry.getKey())) {
+                            break;
+                        }
     				  }
     				  if (i == keys.length) {
     					  edited.put(entry.getKey(), entry.getValue());
@@ -979,7 +984,9 @@ class SortedKeyEnumeration implements En
       String key = (String) f.nextElement();
       for (i = 0; i < last; ++i) {
         String s = (String) keys.get(i);
-        if (key.compareTo(s) <= 0) break;
+        if (key.compareTo(s) <= 0) {
+            break;
+        }
       }
       keys.add(i, key);
     }

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/RollingFileAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/RollingFileAppender.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/RollingFileAppender.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/RollingFileAppender.java Tue Feb 11 13:21:15 2014
@@ -142,8 +142,9 @@ public class RollingFileAppender extends
     if(maxBackupIndex > 0) {
       // Delete the oldest file, to keep Windows happy.
       file = new File(fileName + '.' + maxBackupIndex);
-      if (file.exists())
-       renameSucceeded = file.delete();
+      if (file.exists()) {
+        renameSucceeded = file.delete();
+    }
 
       // Map {(maxBackupIndex - 1), ..., 2, 1} to {maxBackupIndex, ..., 3, 2}
       for (int i = maxBackupIndex - 1; i >= 1 && renameSucceeded; i--) {

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/WriterAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/WriterAppender.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/WriterAppender.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/WriterAppender.java Tue Feb 11 13:21:15 2014
@@ -200,8 +200,9 @@ public class WriterAppender extends Appe
   public
   synchronized
   void close() {
-    if(this.closed)
-      return;
+    if(this.closed) {
+        return;
+    }
     this.closed = true;
     writeFooter();
     reset();
@@ -370,8 +371,9 @@ public class WriterAppender extends Appe
   void writeHeader() {
     if(layout != null) {
       String h = layout.getHeader();
-      if(h != null && this.qw != null)
-	this.qw.write(h);
+      if(h != null && this.qw != null) {
+        this.qw.write(h);
+    }
     }
   }
   

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/config/PropertyGetter.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/config/PropertyGetter.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/config/PropertyGetter.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/config/PropertyGetter.java Tue Feb 11 13:21:15 2014
@@ -71,7 +71,9 @@ public class PropertyGetter {
   void getProperties(PropertyCallback callback, String prefix) {
     for (int i = 0; i < props.length; i++) {
       Method getter = props[i].getReadMethod();
-      if (getter == null) continue;
+      if (getter == null) {
+        continue;
+    }
       if (!isHandledType(getter.getReturnType())) {
 	//System.err.println("Ignoring " + props[i].getName() +" " + getter.getReturnType());
 	continue;

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/config/PropertyPrinter.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/config/PropertyPrinter.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/config/PropertyPrinter.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/config/PropertyPrinter.java Tue Feb 11 13:21:15 2014
@@ -66,10 +66,14 @@ public class PropertyPrinter implements 
   */
   protected
   boolean isGenAppName(String name) {
-    if (name.length() < 2 || name.charAt(0) != 'A') return false;
+    if (name.length() < 2 || name.charAt(0) != 'A') {
+        return false;
+    }
     
     for (int i = 0; i < name.length(); i++) {
-      if (name.charAt(i) < '0' || name.charAt(i) > '9') return false;
+      if (name.charAt(i) < '0' || name.charAt(i) > '9') {
+        return false;
+    }
     }
     return true;
   }

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/config/PropertySetter.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/config/PropertySetter.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/config/PropertySetter.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/config/PropertySetter.java Tue Feb 11 13:21:15 2014
@@ -189,7 +189,9 @@ public class PropertySetter {
    */
   public
   void setProperty(String name, String value) {
-    if (value == null) return;
+    if (value == null) {
+        return;
+    }
     
     name = Introspector.decapitalize(name);
     PropertyDescriptor prop = getPropertyDescriptor(name);
@@ -263,8 +265,9 @@ public class PropertySetter {
   */
   protected
   Object convertArg(String val, Class type) {
-    if(val == null)
-      return null;
+    if(val == null) {
+        return null;
+    }
 
     String v = val.trim();
     if (String.class.isAssignableFrom(type)) {
@@ -291,7 +294,9 @@ public class PropertySetter {
   
   protected
   PropertyDescriptor getPropertyDescriptor(String name) {
-    if (props == null) introspect();
+    if (props == null) {
+        introspect();
+    }
     
     for (int i = 0; i < props.length; i++) {
       if (name.equals(props[i].getName())) {

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/AbsoluteTimeDateFormat.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/AbsoluteTimeDateFormat.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/AbsoluteTimeDateFormat.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/AbsoluteTimeDateFormat.java Tue Feb 11 13:21:15 2014
@@ -126,10 +126,12 @@ public class AbsoluteTimeDateFormat exte
     
 
     
-    if(millis < 100) 
-      sbuf.append('0');
-    if(millis < 10) 
-      sbuf.append('0');
+    if(millis < 100) {
+        sbuf.append('0');
+    }
+    if(millis < 10) {
+        sbuf.append('0');
+    }
     
     sbuf.append(millis);
     return sbuf;

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/AppenderAttachableImpl.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/AppenderAttachableImpl.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/AppenderAttachableImpl.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/AppenderAttachableImpl.java Tue Feb 11 13:21:15 2014
@@ -42,14 +42,16 @@ public class AppenderAttachableImpl impl
   public
   void addAppender(Appender newAppender) {
     // Null values for newAppender parameter are strictly forbidden.
-    if(newAppender == null)
-      return;
+    if(newAppender == null) {
+        return;
+    }
     
     if(appenderList == null) {
       appenderList = new Vector(1);
     }
-    if(!appenderList.contains(newAppender))
-      appenderList.addElement(newAppender);
+    if(!appenderList.contains(newAppender)) {
+        appenderList.addElement(newAppender);
+    }
   }
 
   /**
@@ -78,10 +80,11 @@ public class AppenderAttachableImpl impl
    */
   public
   Enumeration getAllAppenders() {
-    if(appenderList == null)
-      return null;
-    else 
-      return appenderList.elements();    
+    if(appenderList == null) {
+        return null;
+    } else {
+        return appenderList.elements();
+    }    
   }
 
   /**
@@ -93,15 +96,17 @@ public class AppenderAttachableImpl impl
    */
   public
   Appender getAppender(String name) {
-     if(appenderList == null || name == null)
-      return null;
+     if(appenderList == null || name == null) {
+        return null;
+    }
 
      int size = appenderList.size();
      Appender appender;
      for(int i = 0; i < size; i++) {
        appender = (Appender) appenderList.elementAt(i);
-       if(name.equals(appender.getName()))
-	  return appender;
+       if(name.equals(appender.getName())) {
+        return appender;
+    }
      }
      return null;    
   }
@@ -114,15 +119,17 @@ public class AppenderAttachableImpl impl
      @since 1.2 */
   public 
   boolean isAttached(Appender appender) {
-    if(appenderList == null || appender == null)
-      return false;
+    if(appenderList == null || appender == null) {
+        return false;
+    }
 
      int size = appenderList.size();
      Appender a;
      for(int i = 0; i < size; i++) {
        a  = (Appender) appenderList.elementAt(i);
-       if(a == appender)
-	  return true;
+       if(a == appender) {
+        return true;
+    }
      }
      return false;    
   }
@@ -151,8 +158,9 @@ public class AppenderAttachableImpl impl
      appenders.  */
   public
   void removeAppender(Appender appender) {
-    if(appender == null || appenderList == null) 
-      return;
+    if(appender == null || appenderList == null) {
+        return;
+    }
     appenderList.removeElement(appender);    
   }
 
@@ -163,7 +171,9 @@ public class AppenderAttachableImpl impl
   */
   public
   void removeAppender(String name) {
-    if(name == null || appenderList == null) return;
+    if(name == null || appenderList == null) {
+        return;
+    }
     int size = appenderList.size();
     for(int i = 0; i < size; i++) {
       if(name.equals(((Appender)appenderList.elementAt(i)).getName())) {

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/BoundedFIFO.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/BoundedFIFO.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/BoundedFIFO.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/BoundedFIFO.java Tue Feb 11 13:21:15 2014
@@ -54,8 +54,9 @@ public class BoundedFIFO {
      there are no elements in the buffer.  */
   public
   LoggingEvent get() {
-    if(numElements == 0) 
-      return null;
+    if(numElements == 0) {
+        return null;
+    }
     
     LoggingEvent r = buf[first];
     buf[first] = null; // help garbage collection
@@ -123,8 +124,9 @@ public class BoundedFIFO {
   synchronized
   public 
   void resize(int newSize) {
-    if(newSize == maxSize) 
-      return;
+    if(newSize == maxSize) {
+        return;
+    }
 
 
    LoggingEvent[] tmp = new LoggingEvent[newSize];
@@ -155,8 +157,9 @@ public class BoundedFIFO {
    this.first=0;   
    this.numElements = len1+len2;
    this.next = this.numElements;
-   if(this.next == this.maxSize) // this should never happen, but again, it just might.
-     this.next = 0;
+   if(this.next == this.maxSize) {
+    this.next = 0;
+}
   }
 
   

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/CyclicBuffer.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/CyclicBuffer.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/CyclicBuffer.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/CyclicBuffer.java Tue Feb 11 13:21:15 2014
@@ -65,13 +65,15 @@ public class CyclicBuffer {
   public
   void add(LoggingEvent event) {    
     ea[last] = event;    
-    if(++last == maxSize)
-      last = 0;
+    if(++last == maxSize) {
+        last = 0;
+    }
 
-    if(numElems < maxSize)
-      numElems++;
-    else if(++first == maxSize)
-      first = 0;
+    if(numElems < maxSize) {
+        numElems++;
+    } else if(++first == maxSize) {
+        first = 0;
+    }
   }
 
 
@@ -84,8 +86,9 @@ public class CyclicBuffer {
   */
   public
   LoggingEvent get(int i) {
-    if(i < 0 || i >= numElems)
-      return null;
+    if(i < 0 || i >= numElems) {
+        return null;
+    }
 
     return ea[(first + i) % maxSize];
   }
@@ -106,8 +109,9 @@ public class CyclicBuffer {
       numElems--;
       r = ea[first];
       ea[first] = null;
-      if(++first == maxSize)
-	first = 0;
+      if(++first == maxSize) {
+        first = 0;
+    }
     } 
     return r;
   }
@@ -134,7 +138,9 @@ public class CyclicBuffer {
 					 "] not allowed.");
     }
     if(newSize == numElems)
-      return; // nothing to do
+     {
+        return; // nothing to do
+    }
     
     LoggingEvent[] temp = new  LoggingEvent[newSize];
 
@@ -143,8 +149,9 @@ public class CyclicBuffer {
     for(int i = 0; i < loopLen; i++) {
       temp[i] = ea[first];
       ea[first] = null;
-      if(++first == numElems) 
-	first = 0;
+      if(++first == numElems) {
+        first = 0;
+    }
     }
     ea = temp;
     first = 0;

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/DateTimeDateFormat.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/DateTimeDateFormat.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/DateTimeDateFormat.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/DateTimeDateFormat.java Tue Feb 11 13:21:15 2014
@@ -61,8 +61,9 @@ public class DateTimeDateFormat extends 
     calendar.setTime(date);
 
     int day = calendar.get(Calendar.DAY_OF_MONTH);
-    if(day < 10)
-      sbuf.append('0');
+    if(day < 10) {
+        sbuf.append('0');
+    }
     sbuf.append(day);
     sbuf.append(' ');
     sbuf.append(shortMonths[calendar.get(Calendar.MONTH)]);

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/ISO8601DateFormat.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/ISO8601DateFormat.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/ISO8601DateFormat.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/ISO8601DateFormat.java Tue Feb 11 13:21:15 2014
@@ -98,8 +98,9 @@ public class ISO8601DateFormat extends A
       sbuf.append(month);
 
       int day = calendar.get(Calendar.DAY_OF_MONTH);
-      if(day < 10)
-	sbuf.append('0');
+      if(day < 10) {
+        sbuf.append('0');
+    }
       sbuf.append(day);
 
       sbuf.append(' ');
@@ -135,10 +136,12 @@ public class ISO8601DateFormat extends A
     }
 
 
-    if (millis < 100)
-      sbuf.append('0');
-    if (millis < 10)
-      sbuf.append('0');
+    if (millis < 100) {
+        sbuf.append('0');
+    }
+    if (millis < 10) {
+        sbuf.append('0');
+    }
 
     sbuf.append(millis);
     return sbuf;

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/Loader.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/Loader.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/Loader.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/Loader.java Tue Feb 11 13:21:15 2014
@@ -44,8 +44,9 @@ public class Loader  { 
     if(prop != null) {
       int i = prop.indexOf('.');
       if(i != -1) {	
-	if(prop.charAt(i+1) != '1')
-	  java1 = false;
+	if(prop.charAt(i+1) != '1') {
+        java1 = false;
+    }
       } 
     }
     String ignoreTCLProp = OptionConverter.getSystemProperty("log4j.ignoreTCL", null);

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/LogLog.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/LogLog.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/LogLog.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/LogLog.java Tue Feb 11 13:21:15 2014
@@ -110,8 +110,9 @@ public class LogLog {
   void debug(String msg, Throwable t) {
     if(debugEnabled && !quietMode) {
       System.out.println(PREFIX+msg);
-      if(t != null)
-	t.printStackTrace(System.out);
+      if(t != null) {
+        t.printStackTrace(System.out);
+    }
     }
   }
   
@@ -124,8 +125,9 @@ public class LogLog {
   public
   static
   void error(String msg) {
-    if(quietMode)
-      return;
+    if(quietMode) {
+        return;
+    }
     System.err.println(ERR_PREFIX+msg);
   }  
 
@@ -137,8 +139,9 @@ public class LogLog {
   public
   static
   void error(String msg, Throwable t) {
-    if(quietMode)
-      return;
+    if(quietMode) {
+        return;
+    }
 
     System.err.println(ERR_PREFIX+msg);
     if(t != null) {
@@ -165,8 +168,9 @@ public class LogLog {
   public
   static
   void warn(String msg) {
-    if(quietMode)
-      return;
+    if(quietMode) {
+        return;
+    }
 
     System.err.println(WARN_PREFIX+msg);
   }  
@@ -178,8 +182,9 @@ public class LogLog {
   public
   static
   void warn(String msg, Throwable t) {
-    if(quietMode)
-      return;
+    if(quietMode) {
+        return;
+    }
 
     System.err.println(WARN_PREFIX+msg);
     if(t != null) {

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/OptionConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/OptionConverter.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/OptionConverter.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/OptionConverter.java Tue Feb 11 13:21:15 2014
@@ -72,14 +72,23 @@ public class OptionConverter {
       c = s.charAt(i++);
       if (c == '\\') {
 	c =  s.charAt(i++);
-	if(c == 'n')      c = '\n';
-	else if(c == 'r') c = '\r';
-	else if(c == 't') c = '\t';
-	else if(c == 'f') c = '\f';
-	else if(c == '\b') c = '\b';
-	else if(c == '\"') c = '\"';
-	else if(c == '\'') c = '\'';
-	else if(c == '\\') c = '\\';
+	if(c == 'n') {
+        c = '\n';
+    } else if(c == 'r') {
+        c = '\r';
+    } else if(c == 't') {
+        c = '\t';
+    } else if(c == 'f') {
+        c = '\f';
+    } else if(c == '\b') {
+        c = '\b';
+    } else if(c == '\"') {
+        c = '\"';
+    } else if(c == '\'') {
+        c = '\'';
+    } else if(c == '\\') {
+        c = '\\';
+    }
       }
       sbuf.append(c);
     }
@@ -135,13 +144,16 @@ public class OptionConverter {
   public
   static
   boolean toBoolean(String value, boolean dEfault) {
-    if(value == null)
-      return dEfault;
+    if(value == null) {
+        return dEfault;
+    }
     String trimmedVal = value.trim();
-    if("true".equalsIgnoreCase(trimmedVal))
-      return true;
-    if("false".equalsIgnoreCase(trimmedVal))
-      return false;
+    if("true".equalsIgnoreCase(trimmedVal)) {
+        return true;
+    }
+    if("false".equalsIgnoreCase(trimmedVal)) {
+        return false;
+    }
     return dEfault;
   }
 
@@ -184,8 +196,9 @@ public class OptionConverter {
   public
   static
   Level toLevel(String value, Level defaultValue) {
-    if(value == null)
-      return defaultValue;
+    if(value == null) {
+        return defaultValue;
+    }
       
     value = value.trim();
 
@@ -256,8 +269,9 @@ public class OptionConverter {
   public
   static
   long toFileSize(String value, long dEfault) {
-    if(value == null)
-      return dEfault;
+    if(value == null) {
+        return dEfault;
+    }
 
     String s = value.trim().toUpperCase();
     long multiplier = 1;
@@ -297,8 +311,9 @@ public class OptionConverter {
   static
   String findAndSubst(String key, Properties props) {
     String value = props.getProperty(key);
-    if(value == null)
-      return null;
+    if(value == null) {
+        return null;
+    }
 
     try {
       return substVars(value, props);

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/PatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/PatternConverter.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/PatternConverter.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/PatternConverter.java Tue Feb 11 13:21:15 2014
@@ -65,16 +65,17 @@ public abstract class PatternConverter {
     String s = convert(e);
 
     if(s == null) {
-      if(0 < min)
-	spacePad(sbuf, min);
+      if(0 < min) {
+        spacePad(sbuf, min);
+    }
       return;
     }
 
     int len = s.length();
 
-    if(len > max)
-      sbuf.append(s.substring(len-max));
-    else if(len < min) {
+    if(len > max) {
+        sbuf.append(s.substring(len-max));
+    } else if(len < min) {
       if(leftAlign) {	
 	sbuf.append(s);
 	spacePad(sbuf, min-len);
@@ -83,9 +84,9 @@ public abstract class PatternConverter {
 	spacePad(sbuf, min-len);
 	sbuf.append(s);
       }
+    } else {
+        sbuf.append(s);
     }
-    else
-      sbuf.append(s);
   }	
 
   static String[] SPACES = {" ", "  ", "    ", "        ", //1,2,4,8 spaces

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/PatternParser.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/PatternParser.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/PatternParser.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/PatternParser.java Tue Feb 11 13:21:15 2014
@@ -181,18 +181,18 @@ public class PatternParser {
 	  if(c >= '0' && c <= '9') {
 	    formattingInfo.min = c - '0';
 	    state = MIN_STATE;
-	  }
-	  else
-	    finalizeConverter(c);
+	  } else {
+        finalizeConverter(c);
+    }
 	} // switch
 	break;
       case MIN_STATE:
 	currentLiteral.append(c);
-	if(c >= '0' && c <= '9')
-	  formattingInfo.min = formattingInfo.min*10 + (c - '0');
-	else if(c == '.')
-	  state = DOT_STATE;
-	else {
+	if(c >= '0' && c <= '9') {
+        formattingInfo.min = formattingInfo.min*10 + (c - '0');
+    } else if(c == '.') {
+        state = DOT_STATE;
+    } else {
 	  finalizeConverter(c);
 	}
 	break;
@@ -210,9 +210,9 @@ public class PatternParser {
 	break;
       case MAX_STATE:
 	currentLiteral.append(c);
-	if(c >= '0' && c <= '9')
-	  formattingInfo.max = formattingInfo.max*10 + (c - '0');
-	else {
+	if(c >= '0' && c <= '9') {
+        formattingInfo.max = formattingInfo.max*10 + (c - '0');
+    } else {
 	  finalizeConverter(c);
 	  state = LITERAL_STATE;
 	}
@@ -248,19 +248,20 @@ public class PatternParser {
       String dateFormatStr = AbsoluteTimeDateFormat.ISO8601_DATE_FORMAT;
       DateFormat df;
       String dOpt = extractOption();
-      if(dOpt != null)
-	dateFormatStr = dOpt;
+      if(dOpt != null) {
+        dateFormatStr = dOpt;
+    }
 
       if(dateFormatStr.equalsIgnoreCase(
-                                    AbsoluteTimeDateFormat.ISO8601_DATE_FORMAT))
-	df = new  ISO8601DateFormat();
-      else if(dateFormatStr.equalsIgnoreCase(
-                                   AbsoluteTimeDateFormat.ABS_TIME_DATE_FORMAT))
-	df = new AbsoluteTimeDateFormat();
-      else if(dateFormatStr.equalsIgnoreCase(
-                              AbsoluteTimeDateFormat.DATE_AND_TIME_DATE_FORMAT))
-	df = new DateTimeDateFormat();
-      else {
+                                    AbsoluteTimeDateFormat.ISO8601_DATE_FORMAT)) {
+        df = new  ISO8601DateFormat();
+    } else if(dateFormatStr.equalsIgnoreCase(
+                                   AbsoluteTimeDateFormat.ABS_TIME_DATE_FORMAT)) {
+        df = new AbsoluteTimeDateFormat();
+    } else if(dateFormatStr.equalsIgnoreCase(
+                              AbsoluteTimeDateFormat.DATE_AND_TIME_DATE_FORMAT)) {
+        df = new DateTimeDateFormat();
+    } else {
 	try {
 	  df = new SimpleDateFormat(dateFormatStr);
 	}
@@ -526,9 +527,9 @@ public class PatternParser {
     public
     String convert(LoggingEvent event) {
       String n = getFullyQualifiedName(event);
-      if(precision <= 0)
-	return n;
-      else {
+      if(precision <= 0) {
+        return n;
+    } else {
 	int len = n.length();
 
 	// We substract 1 from 'len' when assigning to 'end' to avoid out of
@@ -537,8 +538,9 @@ public class PatternParser {
 	int end = len -1 ;
 	for(int i = precision; i > 0; i--) {
 	  end = n.lastIndexOf('.', end-1);
-	  if(end == -1)
-	    return n;
+	  if(end == -1) {
+        return n;
+    }
 	}
 	return n.substring(end+1, len);
       }

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/jdbc/JDBCAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/jdbc/JDBCAppender.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/jdbc/JDBCAppender.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/jdbc/JDBCAppender.java Tue Feb 11 13:21:15 2014
@@ -181,8 +181,9 @@ public class JDBCAppender extends org.ap
     event.getThrowableStrRep();
     buffer.add(event);
 
-    if (buffer.size() >= bufferSize)
-      flushBuffer();
+    if (buffer.size() >= bufferSize) {
+        flushBuffer();
+    }
   }
 
   /**
@@ -243,8 +244,9 @@ public class JDBCAppender extends org.ap
    * until the object is garbage collected.
    */
   protected Connection getConnection() throws SQLException {
-      if (!DriverManager.getDrivers().hasMoreElements())
-	     setDriver("sun.jdbc.odbc.JdbcOdbcDriver");
+      if (!DriverManager.getDrivers().hasMoreElements()) {
+        setDriver("sun.jdbc.odbc.JdbcOdbcDriver");
+    }
 
       if (connection == null) {
         connection = DriverManager.getConnection(databaseURL, databaseUser,
@@ -263,8 +265,9 @@ public class JDBCAppender extends org.ap
     flushBuffer();
 
     try {
-      if (connection != null && !connection.isClosed())
-          connection.close();
+      if (connection != null && !connection.isClosed()) {
+        connection.close();
+    }
     } catch (SQLException e) {
         errorHandler.error("Error closing connection", e, ErrorCode.GENERIC_FAILURE);
     }

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/jmx/AbstractDynamicMBean.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/jmx/AbstractDynamicMBean.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/jmx/AbstractDynamicMBean.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/jmx/AbstractDynamicMBean.java Tue Feb 11 13:21:15 2014
@@ -76,8 +76,9 @@ public abstract class AbstractDynamicMBe
     AttributeList resultList = new AttributeList();
 
     // if attributeNames is empty, return an empty result list
-    if (attributeNames.length == 0)
-      return resultList;
+    if (attributeNames.length == 0) {
+        return resultList;
+    }
 
     // build the result attribute list
     for (int i=0 ; i<attributeNames.length ; i++){
@@ -108,8 +109,9 @@ public abstract class AbstractDynamicMBe
     AttributeList resultList = new AttributeList();
 
     // if attributeNames is empty, nothing more to do
-    if (attributes.isEmpty())
-      return resultList;
+    if (attributes.isEmpty()) {
+        return resultList;
+    }
 
     // for each attribute, try to set it and add to the result list if successfull
     for (Iterator i = attributes.iterator(); i.hasNext();) {

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/jmx/AppenderDynamicMBean.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/jmx/AppenderDynamicMBean.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/jmx/AppenderDynamicMBean.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/jmx/AppenderDynamicMBean.java Tue Feb 11 13:21:15 2014
@@ -190,8 +190,9 @@ public class AppenderDynamicMBean extend
   }
 
   void registerLayoutMBean(Layout layout) {
-    if(layout == null)
-      return;
+    if(layout == null) {
+        return;
+    }
 
     String name = getAppenderName(appender)+",layout="+layout.getClass().getName();
     cat.debug("Adding LayoutMBean:"+name);

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/net/JMSAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/net/JMSAppender.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/net/JMSAppender.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/net/JMSAppender.java Tue Feb 11 13:21:15 2014
@@ -274,17 +274,20 @@ public class JMSAppender extends Appende
   public synchronized void close() {
     // The synchronized modifier avoids concurrent append and close operations
 
-    if(this.closed)
-      return;
+    if(this.closed) {
+        return;
+    }
 
     LogLog.debug("Closing appender ["+name+"].");
     this.closed = true;
 
     try {
-      if(topicSession != null)
-	topicSession.close();
-      if(topicConnection != null)
-	topicConnection.close();
+      if(topicSession != null) {
+        topicSession.close();
+    }
+      if(topicConnection != null) {
+        topicConnection.close();
+    }
     } catch(JMSException e) {
       LogLog.error("Error while closing JMSAppender ["+name+"].", e);
     } catch(RuntimeException e) {

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/net/SMTPAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/net/SMTPAppender.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/net/SMTPAppender.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/net/SMTPAppender.java Tue Feb 11 13:21:15 2014
@@ -342,8 +342,9 @@ public class SMTPAppender extends Append
 	  
       StringBuffer sbuf = new StringBuffer();
       String t = layout.getHeader();
-      if(t != null)
-	sbuf.append(t);
+      if(t != null) {
+        sbuf.append(t);
+    }
       int len =  cb.length();
       for(int i = 0; i < len; i++) {
 	//sbuf.append(MimeUtility.encodeText(layout.format(cb.get())));

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/net/SocketAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/net/SocketAppender.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/net/SocketAppender.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/net/SocketAppender.java Tue Feb 11 13:21:15 2014
@@ -181,8 +181,9 @@ public class SocketAppender extends Appe
    * #cleanUp} method.
    * */
   synchronized public void close() {
-    if(closed)
-      return;
+    if(closed) {
+        return;
+    }
 
     this.closed = true;
     if (advertiseViaMulticastDNS) {
@@ -216,8 +217,9 @@ public class SocketAppender extends Appe
   }
 
   void connect(InetAddress address, int port) {
-    if(this.address == null)
-      return;
+    if(this.address == null) {
+        return;
+    }
     try {
       // First, close the previous connection if any.
       cleanUp();
@@ -241,8 +243,9 @@ public class SocketAppender extends Appe
 
 
   public void append(LoggingEvent event) {
-    if(event == null)
-      return;
+    if(event == null) {
+        return;
+    }
 
     if(address==null) {
       errorHandler.error("No remote host is set for SocketAppender named \""+

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/net/SocketHubAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/net/SocketHubAppender.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/net/SocketHubAppender.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/net/SocketHubAppender.java Tue Feb 11 13:21:15 2014
@@ -155,8 +155,9 @@ public class SocketHubAppender extends A
   synchronized
   public
   void close() {
-    if(closed)
-      return;
+    if(closed) {
+        return;
+    }
 
 	LogLog.debug("closing SocketHubAppender " + getName());
     this.closed = true;
@@ -239,8 +240,9 @@ public class SocketHubAppender extends A
       }
       
       // list size changed unexpectedly? Just exit the append.
-      if (oos == null)
+      if (oos == null) {
         break;
+    }
         
       try {
       	oos.writeObject(event);

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/net/SocketServer.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/net/SocketServer.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/net/SocketServer.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/net/SocketServer.java Tue Feb 11 13:21:15 2014
@@ -102,10 +102,11 @@ public class SocketServer  {
   public
   static
   void main(String argv[]) {
-    if(argv.length == 3)
-      init(argv[0], argv[1], argv[2]);
-    else
-      usage("Wrong number of arguments.");
+    if(argv.length == 3) {
+        init(argv[0], argv[1], argv[2]);
+    } else {
+        usage("Wrong number of arguments.");
+    }
 
     try {
       cat.info("Listening on port " + port);

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/net/SyslogAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/net/SyslogAppender.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/net/SyslogAppender.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/net/SyslogAppender.java Tue Feb 11 13:21:15 2014
@@ -312,8 +312,9 @@ public class SyslogAppender extends Appe
   public
   void append(LoggingEvent event) {
 
-    if(!isAsSevereAsThreshold(event.getLevel()))
-      return;
+    if(!isAsSevereAsThreshold(event.getLevel())) {
+        return;
+    }
 
     // We must not attempt to append if sqw is null.
     if(sqw == null) {
@@ -430,8 +431,9 @@ public class SyslogAppender extends Appe
      @since 0.8.1 */
   public
   void setFacility(String facilityName) {
-    if(facilityName == null)
-      return;
+    if(facilityName == null) {
+        return;
+    }
 
     syslogFacility = getFacility(facilityName);
     if (syslogFacility == -1) {

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/or/RendererMap.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/or/RendererMap.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/or/RendererMap.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/or/RendererMap.java Tue Feb 11 13:21:15 2014
@@ -74,10 +74,11 @@ public class RendererMap {
      as a {@link String}. */
   public
   String findAndRender(Object o) {
-    if(o == null)
-      return null;
-    else
-      return get(o.getClass()).doRender(o);
+    if(o == null) {
+        return null;
+    } else {
+        return get(o.getClass()).doRender(o);
+    }
   }
 
 
@@ -86,10 +87,11 @@ public class RendererMap {
      class of the object parameter. */
   public
   ObjectRenderer get(Object o) {
-    if(o == null)
-      return null;
-    else
-      return get(o.getClass());
+    if(o == null) {
+        return null;
+    } else {
+        return get(o.getClass());
+    }
   }
 
 
@@ -153,8 +155,9 @@ public class RendererMap {
 	return r;
       }
       r = searchInterfaces(c);
-      if(r != null)
-	return r;
+      if(r != null) {
+        return r;
+    }
     }
     return defaultRenderer;
   }
@@ -169,8 +172,9 @@ public class RendererMap {
       Class[] ia = c.getInterfaces();
       for(int i = 0; i < ia.length; i++) {
 	r = searchInterfaces(ia[i]);
-	if(r != null)
-	  return r;
+	if(r != null) {
+        return r;
+    }
       }
     }
     return null;

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/pattern/LogEvent.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/pattern/LogEvent.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/pattern/LogEvent.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/pattern/LogEvent.java Tue Feb 11 13:21:15 2014
@@ -348,9 +348,9 @@ public class LogEvent implements java.io
   public
   String getRenderedMessage() {
      if(renderedMessage == null && message != null) {
-       if(message instanceof String)
-	 renderedMessage = (String) message;
-       else {
+       if(message instanceof String) {
+        renderedMessage = (String) message;
+    } else {
 	 LoggerRepository repository = logger.getLoggerRepository();
 
 	 if(repository instanceof RendererSupport) {
@@ -373,8 +373,9 @@ public class LogEvent implements java.io
 
   public
   String getThreadName() {
-    if(threadName == null)
-      threadName = (Thread.currentThread()).getName();
+    if(threadName == null) {
+        threadName = (Thread.currentThread()).getName();
+    }
     return threadName;
   }
 
@@ -397,10 +398,11 @@ public class LogEvent implements java.io
   public
   String[] getThrowableStrRep() {
 
-    if(throwableInfo ==  null)
-      return null;
-    else
-      return throwableInfo.getThrowableStrRep();
+    if(throwableInfo ==  null) {
+        return null;
+    } else {
+        return throwableInfo.getThrowableStrRep();
+    }
   }
 
 
@@ -441,8 +443,9 @@ public class LogEvent implements java.io
     readLevel(ois);
 
     // Make sure that no location info is available to Layouts
-    if(locationInfo == null)
-      locationInfo = new LocationInfo(null, null);
+    if(locationInfo == null) {
+        locationInfo = new LocationInfo(null, null);
+    }
   }
 
   private

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/spi/LocationInfo.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/spi/LocationInfo.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/spi/LocationInfo.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/spi/LocationInfo.java Tue Feb 11 13:21:15 2014
@@ -131,8 +131,9 @@ public class LocationInfo implements jav
 
     */
     public LocationInfo(Throwable t, String fqnOfCallingClass) {
-      if(t == null || fqnOfCallingClass == null)
-	return;
+      if(t == null || fqnOfCallingClass == null) {
+        return;
+    }
       if (getLineNumberMethod != null) {
           try {
               Object[] noArgs = null;
@@ -202,8 +203,9 @@ public class LocationInfo implements jav
       // than counting the stack depth which is not guaranteed to be
       // constant across JVM implementations.
       ibegin = s.lastIndexOf(fqnOfCallingClass);
-      if(ibegin == -1)
-	return;
+      if(ibegin == -1) {
+        return;
+    }
 
       //
       //   if the next character after the class name exists
@@ -222,22 +224,25 @@ public class LocationInfo implements jav
 
 
       ibegin = s.indexOf(Layout.LINE_SEP, ibegin);
-      if(ibegin == -1)
-	return;
+      if(ibegin == -1) {
+        return;
+    }
       ibegin+= Layout.LINE_SEP_LEN;
 
       // determine end of line
       iend = s.indexOf(Layout.LINE_SEP, ibegin);
-      if(iend == -1)
-	return;
+      if(iend == -1) {
+        return;
+    }
 
       // VA has a different stack trace format which doesn't
       // need to skip the inital 'at'
       if(!inVisualAge) {
 	// back up to first blank character
 	ibegin = s.lastIndexOf("at ", iend);
-	if(ibegin == -1)
-	  return;
+	if(ibegin == -1) {
+        return;
+    }
 	// Add 3 to skip "at ";
 	ibegin += 3;
       }
@@ -298,14 +303,16 @@ public class LocationInfo implements jav
     */
     public
     String getClassName() {
-      if(fullInfo == null) return NA;
+      if(fullInfo == null) {
+        return NA;
+    }
       if(className == null) {
 	// Starting the search from '(' is safer because there is
 	// potentially a dot between the parentheses.
 	int iend = fullInfo.lastIndexOf('(');
-	if(iend == -1)
-	  className = NA;
-	else {
+	if(iend == -1) {
+        className = NA;
+    } else {
 	  iend =fullInfo.lastIndexOf('.', iend);
 
 	  // This is because a stack trace in VisualAge looks like:
@@ -322,10 +329,11 @@ public class LocationInfo implements jav
 	    ibegin = fullInfo.lastIndexOf(' ', iend)+1;
           }
 
-	  if(iend == -1)
-	    className = NA;
-	  else
-	    className = this.fullInfo.substring(ibegin, iend);
+	  if(iend == -1) {
+        className = NA;
+    } else {
+        className = this.fullInfo.substring(ibegin, iend);
+    }
 	}
       }
       return className;
@@ -338,13 +346,15 @@ public class LocationInfo implements jav
     */
     public
     String getFileName() {
-      if(fullInfo == null) return NA;
+      if(fullInfo == null) {
+        return NA;
+    }
 
       if(fileName == null) {
 	int iend = fullInfo.lastIndexOf(':');
-	if(iend == -1)
-	  fileName = NA;
-	else {
+	if(iend == -1) {
+        fileName = NA;
+    } else {
 	  int ibegin = fullInfo.lastIndexOf('(', iend - 1);
 	  fileName = this.fullInfo.substring(ibegin + 1, iend);
 	}
@@ -359,15 +369,18 @@ public class LocationInfo implements jav
     */
     public
     String getLineNumber() {
-      if(fullInfo == null) return NA;
+      if(fullInfo == null) {
+        return NA;
+    }
 
       if(lineNumber == null) {
 	int iend = fullInfo.lastIndexOf(')');
 	int ibegin = fullInfo.lastIndexOf(':', iend -1);
-	if(ibegin == -1)
-	  lineNumber = NA;
-	else
-	  lineNumber = this.fullInfo.substring(ibegin + 1, iend);
+	if(ibegin == -1) {
+        lineNumber = NA;
+    } else {
+        lineNumber = this.fullInfo.substring(ibegin + 1, iend);
+    }
       }
       return lineNumber;
     }
@@ -377,14 +390,17 @@ public class LocationInfo implements jav
     */
     public
     String getMethodName() {
-      if(fullInfo == null) return NA;
+      if(fullInfo == null) {
+        return NA;
+    }
       if(methodName == null) {
 	int iend = fullInfo.lastIndexOf('(');
 	int ibegin = fullInfo.lastIndexOf('.', iend);
-	if(ibegin == -1)
-	  methodName = NA;
-	else
-	  methodName = this.fullInfo.substring(ibegin + 1, iend);
+	if(ibegin == -1) {
+        methodName = NA;
+    } else {
+        methodName = this.fullInfo.substring(ibegin + 1, iend);
+    }
       }
       return methodName;
     }

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/spi/LoggingEvent.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/spi/LoggingEvent.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/spi/LoggingEvent.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/spi/LoggingEvent.java Tue Feb 11 13:21:15 2014
@@ -358,9 +358,9 @@ public class LoggingEvent implements jav
   public
   String getRenderedMessage() {
      if(renderedMessage == null && message != null) {
-       if(message instanceof String)
-	 renderedMessage = (String) message;
-       else {
+       if(message instanceof String) {
+        renderedMessage = (String) message;
+    } else {
 	 LoggerRepository repository = logger.getLoggerRepository();
 
 	 if(repository instanceof RendererSupport) {
@@ -383,8 +383,9 @@ public class LoggingEvent implements jav
 
   public
   String getThreadName() {
-    if(threadName == null)
-      threadName = (Thread.currentThread()).getName();
+    if(threadName == null) {
+        threadName = (Thread.currentThread()).getName();
+    }
     return threadName;
   }
 
@@ -407,10 +408,11 @@ public class LoggingEvent implements jav
   public
   String[] getThrowableStrRep() {
 
-    if(throwableInfo ==  null)
-      return null;
-    else
-      return throwableInfo.getThrowableStrRep();
+    if(throwableInfo ==  null) {
+        return null;
+    } else {
+        return throwableInfo.getThrowableStrRep();
+    }
   }
 
 
@@ -463,8 +465,9 @@ public class LoggingEvent implements jav
     readLevel(ois);
 
     // Make sure that no location info is available to Layouts
-    if(locationInfo == null)
-      locationInfo = new LocationInfo(null, null);
+    if(locationInfo == null) {
+        locationInfo = new LocationInfo(null, null);
+    }
   }
 
   private

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/varia/LevelMatchFilter.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/varia/LevelMatchFilter.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/varia/LevelMatchFilter.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/varia/LevelMatchFilter.java Tue Feb 11 13:21:15 2014
@@ -93,10 +93,11 @@ public class LevelMatchFilter extends Fi
     } 
 
     if(matchOccured) {  
-      if(this.acceptOnMatch)
-	  return Filter.ACCEPT;
-      else
-	  return Filter.DENY;
+      if(this.acceptOnMatch) {
+        return Filter.ACCEPT;
+    } else {
+        return Filter.DENY;
+    }
     } else {
       return Filter.NEUTRAL;
     }

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/varia/Roller.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/varia/Roller.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/varia/Roller.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/varia/Roller.java Tue Feb 11 13:21:15 2014
@@ -60,10 +60,11 @@ public class Roller {
 
     BasicConfigurator.configure();
 
-    if(argv.length == 2) 
-      init(argv[0], argv[1]);
-    else 
-      usage("Wrong number of arguments.");
+    if(argv.length == 2) {
+        init(argv[0], argv[1]);
+    } else {
+        usage("Wrong number of arguments.");
+    }
     
     roll();
   }

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/varia/StringMatchFilter.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/varia/StringMatchFilter.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/varia/StringMatchFilter.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/varia/StringMatchFilter.java Tue Feb 11 13:21:15 2014
@@ -104,8 +104,9 @@ public class StringMatchFilter extends F
   int decide(LoggingEvent event) {
     String msg = event.getRenderedMessage();
 
-    if(msg == null ||  stringToMatch == null)
-      return Filter.NEUTRAL;
+    if(msg == null ||  stringToMatch == null) {
+        return Filter.NEUTRAL;
+    }
     
 
     if( msg.indexOf(stringToMatch) == -1 ) {

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/xml/DOMConfigurator.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/xml/DOMConfigurator.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/src/main/java/org/apache/log4j/xml/DOMConfigurator.java (original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/xml/DOMConfigurator.java Tue Feb 11 13:21:15 2014
@@ -522,11 +522,12 @@ public class DOMConfigurator implements 
 	  Element appenderRef = (Element) currentNode;
 	  Appender appender = findAppenderByReference(appenderRef);
 	  String refName =  subst(appenderRef.getAttribute(REF_ATTR));
-	  if(appender != null)
-	    LogLog.debug("Adding appender named ["+ refName+ 
+	  if(appender != null) {
+        LogLog.debug("Adding appender named ["+ refName+ 
 			 "] to category ["+cat.getName()+"].");
-	  else 
-	    LogLog.debug("Appender named ["+ refName + "] not found.");
+    } else {
+        LogLog.debug("Appender named ["+ refName + "] not found.");
+    }
 	    
 	  cat.addAppender(appender);
 	  

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/StressCategory.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/StressCategory.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/StressCategory.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/StressCategory.java Tue Feb 11 13:21:15 2014
@@ -76,14 +76,15 @@ class StressCategory {
   // On each possible permutation call createLoop
   static
   void permute(int n) {
-    if(n == LENGTH)
-      createLoop(0);
-    else
-      for(int i = n; i < LENGTH; i++) {
-	swap(names, n, i);
-	permute(n+1);
-	swap(names, n, i);	
-      }
+    if(n == LENGTH) {
+        createLoop(0);
+    } else {
+        for(int i = n; i < LENGTH; i++) {
+        swap(names, n, i);
+        permute(n+1);
+        swap(names, n, i);	
+          }
+    }
   }
 
   static
@@ -112,9 +113,9 @@ class StressCategory {
     if(n == LENGTH) {  
       //System.out.println("..............Creating cat[]...........");
       for(int i = 0; i < LENGTH; i++) {
-	if(ct[i] == null)
-	  cat[i] = null;
-	else {
+	if(ct[i] == null) {
+        cat[i] = null;
+    } else {
 	  cat[i] = Logger.getLogger(ct[i].catstr);
 	  cat[i].setLevel(ct[i].level);
 	}
@@ -131,7 +132,9 @@ class StressCategory {
       ct[n]  = new CT(names[n], null);
       createLoop(n+1);  
       
-      int r = random.nextInt(); if(r < 0) r = -r;
+      int r = random.nextInt(); if(r < 0) {
+        r = -r;
+    }
       ct[n]  = new CT(names[n], level[r%5]);
       createLoop(n+1);
     }
@@ -160,22 +163,24 @@ class StressCategory {
   static
   void ctDump() {
     for(int j = 0; j < LENGTH; j++) {
-       if(ct[j] != null) 
-	    System.out.println("ct [" + j + "] = ("+ct[j].catstr+"," + 
+       if(ct[j] != null) {
+        System.out.println("ct [" + j + "] = ("+ct[j].catstr+"," + 
 			       ct[j].level + ")");
-       else 
-	 System.out.println("ct [" + j + "] = undefined");
+    } else {
+        System.out.println("ct [" + j + "] = undefined");
+    }
     }
   }
   
   static
   void catDump() {
     for(int j = 0; j < LENGTH; j++) {
-      if(cat[j] != null)
-	System.out.println("cat[" + j + "] = (" + cat[j].name + "," +
-			   cat[j].getLevel() + ")");
-      else
-	System.out.println("cat[" + j + "] = undefined"); 
+      if(cat[j] != null) {
+        System.out.println("cat[" + j + "] = (" + cat[j].name + "," +
+        		   cat[j].getLevel() + ")");
+    } else {
+        System.out.println("cat[" + j + "] = undefined");
+    } 
     }
   }
 
@@ -194,8 +199,9 @@ class StressCategory {
     CT localCT = ct[i];
 
     // Can't perform test if logger is not instantiated
-    if(localCT == null) 
-      return true;
+    if(localCT == null) {
+        return true;
+    }
     
     // find expected level
     Level expected = getExpectedPrioriy(localCT);
@@ -216,8 +222,9 @@ class StressCategory {
   static
   Level getExpectedPrioriy(CT ctParam) {
     Level level = ctParam.level;
-    if(level != null) 
-      return level;
+    if(level != null) {
+        return level;
+    }
 
     
     String catstr = ctParam.catstr;    
@@ -230,8 +237,9 @@ class StressCategory {
       for(int j = 0; j < LENGTH; j++) {	
 	if(ct[j] != null && substr.equals(ct[j].catstr)) {
 	  Level p = ct[j].level;
-	  if(p != null) 
-	    return p;	  
+	  if(p != null) {
+        return p;
+    }	  
 	}
       }
     }

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/VectorAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/VectorAppender.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/VectorAppender.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/VectorAppender.java Tue Feb 11 13:21:15 2014
@@ -59,8 +59,9 @@ public class VectorAppender extends Appe
   }
 
   public synchronized void close() {
-    if(this.closed)
-      return;
+    if(this.closed) {
+        return;
+    }
     this.closed = true;
   }
 

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/customLogger/XLogger.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/customLogger/XLogger.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/customLogger/XLogger.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/customLogger/XLogger.java Tue Feb 11 13:21:15 2014
@@ -70,10 +70,12 @@ public class XLogger extends Logger impl
      XLevel#LETHAL}.  */
   public
   void lethal(String message, Throwable t) { 
-    if(repository.isDisabled(XLevel.LETHAL_INT)) 
-      return;
-    if(XLevel.LETHAL.isGreaterOrEqual(this.getEffectiveLevel()))
-      forcedLog(FQCN, XLevel.LETHAL, message, t);
+    if(repository.isDisabled(XLevel.LETHAL_INT)) {
+        return;
+    }
+    if(XLevel.LETHAL.isGreaterOrEqual(this.getEffectiveLevel())) {
+        forcedLog(FQCN, XLevel.LETHAL, message, t);
+    }
   }
 
   /**
@@ -81,10 +83,12 @@ public class XLogger extends Logger impl
      XLevel#LETHAL}.  */
   public
   void lethal(String message) { 
-    if(repository.isDisabled(XLevel.LETHAL_INT)) 
-      return;
-    if(XLevel.LETHAL.isGreaterOrEqual(this.getEffectiveLevel()))
-      forcedLog(FQCN, XLevel.LETHAL, message, null);
+    if(repository.isDisabled(XLevel.LETHAL_INT)) {
+        return;
+    }
+    if(XLevel.LETHAL.isGreaterOrEqual(this.getEffectiveLevel())) {
+        forcedLog(FQCN, XLevel.LETHAL, message, null);
+    }
   }
 
   static
@@ -115,10 +119,12 @@ public class XLogger extends Logger impl
   */
   public
   void trace(String message, Throwable t) { 
-    if(repository.isDisabled(XLevel.TRACE_INT))
-      return;   
-    if(XLevel.TRACE.isGreaterOrEqual(this.getEffectiveLevel()))
-      forcedLog(FQCN, XLevel.TRACE, message, t);
+    if(repository.isDisabled(XLevel.TRACE_INT)) {
+        return;
+    }   
+    if(XLevel.TRACE.isGreaterOrEqual(this.getEffectiveLevel())) {
+        forcedLog(FQCN, XLevel.TRACE, message, t);
+    }
   }
 
   /**
@@ -126,10 +132,12 @@ public class XLogger extends Logger impl
   */
   public
   void trace(String message) { 
-    if(repository.isDisabled(XLevel.TRACE_INT))
-      return;   
-    if(XLevel.TRACE.isGreaterOrEqual(this.getEffectiveLevel()))
-      forcedLog(FQCN, XLevel.TRACE, message, null);
+    if(repository.isDisabled(XLevel.TRACE_INT)) {
+        return;
+    }   
+    if(XLevel.TRACE.isGreaterOrEqual(this.getEffectiveLevel())) {
+        forcedLog(FQCN, XLevel.TRACE, message, null);
+    }
   }
 
 

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/BoundedFIFOTestCase.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/BoundedFIFOTestCase.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/BoundedFIFOTestCase.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/BoundedFIFOTestCase.java Tue Feb 11 13:21:15 2014
@@ -92,10 +92,11 @@ public class BoundedFIFOTestCase extends
 	  assertEquals(bf.length(), max - k > 0 ? max - k : 0); 
 	  Object r = bf.get();
 	  //System.out.println("Got "+r);
-	  if(k >= size) 
-	    assertNull(r);
-	  else 
-	    assertEquals(r, e[k]);
+	  if(k >= size) {
+        assertNull(r);
+    } else {
+        assertEquals(r, e[k]);
+    }
 	}
       }
       //System.out.println("Passed size="+size);
@@ -207,13 +208,16 @@ public class BoundedFIFOTestCase extends
 	  for(int r = 0; r < d; r++) {
 	  
 	    BoundedFIFO bf = new BoundedFIFO(size);
-	    for(int p0 = 0; p0 < i; p0++)
-	      bf.put(e[p0]);
+	    for(int p0 = 0; p0 < i; p0++) {
+            bf.put(e[p0]);
+        }
 
-	    for(int g = 0; g < d; g++) 
-	      bf.get();	    
-	    for(int p1 = 0; p1 < r; p1++) 
-	      bf.put(e[i+p1]);
+	    for(int g = 0; g < d; g++) {
+            bf.get();
+        }	    
+	    for(int p1 = 0; p1 < r; p1++) {
+            bf.put(e[i+p1]);
+        }
 	    
 
 	    

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/CyclicBufferTestCase.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/CyclicBufferTestCase.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/CyclicBufferTestCase.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/helpers/CyclicBufferTestCase.java Tue Feb 11 13:21:15 2014
@@ -93,8 +93,9 @@ public class CyclicBufferTestCase extend
    */
   public
   void test1() {
-    for(int bufSize = 1; bufSize <= 128; bufSize *=2) 
-      doTest1(bufSize);
+    for(int bufSize = 1; bufSize <= 128; bufSize *=2) {
+        doTest1(bufSize);
+    }
   }
 
   void doTest1(int size) {
@@ -142,8 +143,9 @@ public class CyclicBufferTestCase extend
     cb.resize(newSize);
 
     int offset = numberOfAdds - initialSize;
-    if(offset< 0)
-      offset = 0;
+    if(offset< 0) {
+        offset = 0;
+    }
 
     int len = newSize < numberOfAdds ? newSize : numberOfAdds;
     len = len < initialSize ? len : initialSize;

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/net/SocketAppenderTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/net/SocketAppenderTest.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/net/SocketAppenderTest.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/net/SocketAppenderTest.java Tue Feb 11 13:21:15 2014
@@ -81,10 +81,11 @@ public class SocketAppenderTest extends 
          * @return last appended LoggingEvent's message
          */
         public String getLastMessage() {
-            if (this.lastEvent != null)
+            if (this.lastEvent != null) {
                 return this.lastEvent.getMessage().toString();
-            else
+            } else {
                 return "";
+            }
         }
 
         private LoggingEvent lastEvent;

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/net/TelnetAppenderTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/net/TelnetAppenderTest.java?rev=1567107&r1=1567106&r2=1567107&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/net/TelnetAppenderTest.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/net/TelnetAppenderTest.java Tue Feb 11 13:21:15 2014
@@ -38,8 +38,9 @@ public class TelnetAppenderTest extends 
         InputStream i = s.getInputStream();
         while (!Thread.interrupted()) {
           int c = i.read();
-          if (c == -1)
+          if (c == -1) {
             break;
+        }
           bo.write(c);
         }
         s.close();



Mime
View raw message