[slf4j-dev] [GIT] SLF4J: Simple Logging Facade for Java branch master updated. v_1.7.1-2-g3b040e3

Gitbot git-noreply at pixie.qos.ch
Mon Sep 17 23:36:48 CEST 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "SLF4J: Simple Logging Facade for Java".

The branch, master has been updated
       via  3b040e36ff55b7e98fe16e09a4c813d3dab524d6 (commit)
      from  7747f1ec4f37b4a104d671c0b97663701f1b7c47 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.qos.ch/gitweb/?p=slf4j.git;a=commit;h=3b040e36ff55b7e98fe16e09a4c813d3dab524d6
http://github.com/ceki/slf4j/commit/3b040e36ff55b7e98fe16e09a4c813d3dab524d6

commit 3b040e36ff55b7e98fe16e09a4c813d3dab524d6
Author: Ceki Gulcu <ceki at qos.ch>
Date:   Mon Sep 17 23:36:12 2012 +0200

    improved javadocs

diff --git a/jcl-over-slf4j/src/main/java/org/apache/commons/logging/Log.java b/jcl-over-slf4j/src/main/java/org/apache/commons/logging/Log.java
index 7b42509..50f6d48 100644
--- a/jcl-over-slf4j/src/main/java/org/apache/commons/logging/Log.java
+++ b/jcl-over-slf4j/src/main/java/org/apache/commons/logging/Log.java
@@ -102,6 +102,8 @@ public interface Log {
      * <p> Call this method to prevent having to perform expensive operations
      * (for example, <code>String</code> concatenation)
      * when the log level is more than info. </p>
+     * 
+     * @return true if info enabled, false otherwise
      */
     public boolean isInfoEnabled();
 
@@ -112,6 +114,8 @@ public interface Log {
      * <p> Call this method to prevent having to perform expensive operations
      * (for example, <code>String</code> concatenation)
      * when the log level is more than trace. </p>
+     * 
+     * @return true if trace enabled, false otherwise
      */
     public boolean isTraceEnabled();
 
diff --git a/jcl-over-slf4j/src/main/java/org/apache/commons/logging/LogFactory.java b/jcl-over-slf4j/src/main/java/org/apache/commons/logging/LogFactory.java
index cb9ac8a..779ad5b 100644
--- a/jcl-over-slf4j/src/main/java/org/apache/commons/logging/LogFactory.java
+++ b/jcl-over-slf4j/src/main/java/org/apache/commons/logging/LogFactory.java
@@ -140,8 +140,8 @@ public abstract class LogFactory {
    * Return the configuration attribute with the specified name (if any), or
    * <code>null</code> if there is no such attribute.
    * 
-   * @param name
-   *                Name of the attribute to return
+   * @param name Name of the attribute to return
+   * @return configuration attribute
    */
   public abstract Object getAttribute(String name);
 
@@ -149,6 +149,8 @@ public abstract class LogFactory {
    * Return an array containing the names of all currently defined configuration
    * attributes. If there are no such attributes, a zero length array is
    * returned.
+   * 
+   * @return names of all currently defined configuration attributes
    */
   public abstract String[] getAttributeNames();
 
diff --git a/jul-to-slf4j/src/main/java/org/slf4j/bridge/SLF4JBridgeHandler.java b/jul-to-slf4j/src/main/java/org/slf4j/bridge/SLF4JBridgeHandler.java
index c69c9d0..c41fa99 100644
--- a/jul-to-slf4j/src/main/java/org/slf4j/bridge/SLF4JBridgeHandler.java
+++ b/jul-to-slf4j/src/main/java/org/slf4j/bridge/SLF4JBridgeHandler.java
@@ -146,7 +146,7 @@ public class SLF4JBridgeHandler extends Handler {
   /**
    * Returns true if SLF4JBridgeHandler has been previously installed, returns false otherwise.
    *
-   * @return
+   * @return true if SLF4JBridgeHandler is already installed, false other wise
    * @throws SecurityException
    */
   public static boolean isInstalled() throws SecurityException {
diff --git a/pom.xml b/pom.xml
index 30d2be2..a57ff6c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -216,14 +216,14 @@
                 <linkJavadoc>true</linkJavadoc>
               </configuration>
             </plugin>
+
             <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-javadoc-plugin</artifactId>
               <version>2.8</version>
               <configuration>
-                <aggregate>true</aggregate>
-                <excludePackageNames>org.slf4j.migrator:org.slf4j.migrator.*
-                </excludePackageNames>
+                <!--<aggregate>true</aggregate>-->
+                <excludePackageNames>org.slf4j.migrator:org.slf4j.migrator.*</excludePackageNames>
                 <links>
                   <link>
                     http://java.sun.com/j2se/1.5.0/docs/api
@@ -238,7 +238,7 @@
                   <group>
                     <title>SLF4J extensions</title>
                     <packages>
-                      org.slf4j.profiler:org.slf4j.ext:org.slf4j.instrumentation:org.slf4j.agent
+                      org.slf4j.cal10n:org.slf4j.profiler:org.slf4j.ext:org.slf4j.instrumentation:org.slf4j.agent
                     </packages>
                   </group>
 
@@ -248,15 +248,17 @@
                   </group>
 
                   <group>
-                    <title>Apache log4j</title>
-                    <packages>org.apache.log4j</packages>
+                    <title>java.util.logging (JUL) to SLF4J bridge</title>
+                    <packages>org.slf4j.bridge</packages>
                   </group>
 
                   <group>
-                    <title>java.util.logging (JUL) to SLF4J bridge</title>
-                    <packages>org.slf4j.bridge</packages>
+                    <title>Apache log4j</title>
+                    <packages>org.apache.log4j:org.apache.log4j.*</packages>
                   </group>
 
+
+
                 </groups>
               </configuration>
             </plugin>
@@ -275,53 +277,6 @@
         <maven.test.skip>true</maven.test.skip>
       </properties>
     </profile>
-    <profile>
-      <id>osgi</id>
-      <modules>
-        <module>osgi-over-slf4j</module>
-        <module>slf4j-osgi-test-bundle</module>
-        <module>slf4j-osgi-integration-test</module>
-      </modules>
-
-      <repositories>
-        <repository>
-          <id>m2apache.snapshots</id>
-          <url>http://people.apache.org/repo/m2-snapshot-repository</url>
-          <releases>
-            <enabled>false</enabled>
-          </releases>
-          <snapshots>
-            <enabled>true</enabled>
-          </snapshots>
-        </repository>
-
-        <repository>
-          <id>springframework.org</id>
-          <name>Springframework Maven SNAPSHOT Repository</name>
-          <url>http://static.springframework.org/maven2-snapshots/</url>
-          <snapshots>
-            <enabled>true</enabled>
-          </snapshots>
-        </repository>
-
-      </repositories>
-
-      <pluginRepositories>
-        <pluginRepository>
-          <id>apache.snapshots</id>
-          <name>Apache Snapshot Plugin Repository</name>
-          <url>http://people.apache.org/repo/m2-snapshot-repository</url>
-          <releases>
-            <enabled>false</enabled>
-          </releases>
-          <snapshots>
-            <enabled>true</enabled>
-          </snapshots>
-        </pluginRepository>
-      </pluginRepositories>
-
-    </profile>
-
 
     <profile>
       <id>javadocjar</id>
diff --git a/slf4j-api/src/main/java/org/slf4j/ILoggerFactory.java b/slf4j-api/src/main/java/org/slf4j/ILoggerFactory.java
index 9b259f9..4b5eb27 100644
--- a/slf4j-api/src/main/java/org/slf4j/ILoggerFactory.java
+++ b/slf4j-api/src/main/java/org/slf4j/ILoggerFactory.java
@@ -52,6 +52,7 @@ public interface ILoggerFactory {
    * return the same logger instance regardless of the requested name.
    * 
    * @param name the name of the Logger to return
+   * @return a Logger instance 
    */
   public Logger getLogger(String name);
 }
diff --git a/slf4j-api/src/main/java/org/slf4j/IMarkerFactory.java b/slf4j-api/src/main/java/org/slf4j/IMarkerFactory.java
index a7dc61c..8ec5a75 100644
--- a/slf4j-api/src/main/java/org/slf4j/IMarkerFactory.java
+++ b/slf4j-api/src/main/java/org/slf4j/IMarkerFactory.java
@@ -53,7 +53,8 @@ public interface IMarkerFactory {
   /**
    * Checks if the marker with the name already exists. If name is null, then false 
    * is returned.
-   * 
+   *  
+   * @param name logger name to check for
    * @return true id the marker exists, false otherwise. 
    */
   boolean exists(String name);
@@ -73,7 +74,8 @@ public interface IMarkerFactory {
   
   /**
    * Create a marker which is detached (even at birth) from this IMarkerFactory.
-   *
+   * 
+   * @param name marker name
    * @return a dangling marker
    * @since 1.5.1
    */
diff --git a/slf4j-api/src/main/java/org/slf4j/Logger.java b/slf4j-api/src/main/java/org/slf4j/Logger.java
index 8853285..e39727c 100644
--- a/slf4j-api/src/main/java/org/slf4j/Logger.java
+++ b/slf4j-api/src/main/java/org/slf4j/Logger.java
@@ -52,6 +52,13 @@ package org.slf4j;
  * }
  * </pre>
  *
+ * Be sure to read the FAQ entry relating to <a href="../../../faq.html#logging_performance">parameterized
+ * logging</a>. Note that logging statements can be parameterized in
+ * <a href="../../../faq.html#paramException">presence of an exception/throwable</a>.
+ *
+ * <p>Once you are comfortable using loggers, i.e. instances of this interface, consider using
+ * <a href="MDC.html">MDC</a> as well as <a href="Marker.html">Markers</a>.</p>
+ *
  * @author Ceki Gülcü
  */
 public interface Logger {
@@ -66,6 +73,7 @@ public interface Logger {
 
   /**
    * Return the name of this <code>Logger</code> instance.
+   * @return name of this logger instance 
    */
   public String getName();
 
@@ -148,6 +156,9 @@ public interface Logger {
    * marker data is also taken into account.
    *
    * @param marker The marker data to take into consideration
+   * @return True if this Logger is enabled for the TRACE level,
+   *         false otherwise.
+   *         
    * @since 1.4
    */
   public boolean isTraceEnabled(Marker marker);
@@ -285,6 +296,8 @@ public interface Logger {
    * marker data is also taken into account.
    *
    * @param marker The marker data to take into consideration
+   * @return True if this Logger is enabled for the DEBUG level,
+   *         false otherwise. 
    */
   public boolean isDebugEnabled(Marker marker);
 
@@ -415,6 +428,7 @@ public interface Logger {
    * data is also taken into consideration.
    *
    * @param marker The marker data to take into consideration
+   * @return true if this logger is warn enabled, false otherwise 
    */
   public boolean isInfoEnabled(Marker marker);
 
@@ -544,6 +558,8 @@ public interface Logger {
    * data is also taken into consideration.
    *
    * @param marker The marker data to take into consideration
+   * @return True if this Logger is enabled for the WARN level,
+   *         false otherwise.
    */
   public boolean isWarnEnabled(Marker marker);
 
@@ -671,6 +687,8 @@ public interface Logger {
    * marker data is also taken into consideration.
    *
    * @param marker The marker data to take into consideration
+   * @return True if this Logger is enabled for the ERROR level,
+   *         false otherwise.
    */
   public boolean isErrorEnabled(Marker marker);
 
diff --git a/slf4j-api/src/main/java/org/slf4j/MDC.java b/slf4j-api/src/main/java/org/slf4j/MDC.java
index ed61b1f..bdb30e8 100644
--- a/slf4j-api/src/main/java/org/slf4j/MDC.java
+++ b/slf4j-api/src/main/java/org/slf4j/MDC.java
@@ -45,7 +45,7 @@ import org.slf4j.spi.MDCAdapter;
  * and slf4j-nop, {@link NOPMDCAdapter} will be used.
  *
  * <p>
- * Thus, as a SLF4J user, you can take advantage of MDC in the presence of log4j
+ * Thus, as a SLF4J user, you can take advantage of MDC in the presence of log4j,
  * logback, or java.util.logging, but without forcing these systems as
  * dependencies upon your users.
  * 
@@ -90,13 +90,16 @@ public class MDC {
   }
 
   /**
-   * Put a context value (the <code>val</code> parameter) as identified with the
-   * <code>key</code> parameter into the current thread's context map. The
+   * Put a diagnostic context value (the <code>val</code> parameter) as identified with the
+   * <code>key</code> parameter into the current thread's diagnostic context map. The
    * <code>key</code> parameter cannot be null. The <code>val</code> parameter
    * can be null only if the underlying implementation supports it.
    * 
    * <p>
    * This method delegates all work to the MDC of the underlying logging system.
+   *
+   * @param key non-null key 
+   * @param val value to put in the map
    * 
    * @throws IllegalArgumentException
    *           in case the "key" parameter is null
@@ -114,12 +117,13 @@ public class MDC {
   }
 
   /**
-   * Get the context identified by the <code>key</code> parameter. The
+   * Get the diagnostic context identified by the <code>key</code> parameter. The
    * <code>key</code> parameter cannot be null.
    * 
    * <p>
    * This method delegates all work to the MDC of the underlying logging system.
-   * 
+   *
+   * @param key  
    * @return the string value identified by the <code>key</code> parameter.
    * @throws IllegalArgumentException
    *           in case the "key" parameter is null
@@ -137,11 +141,12 @@ public class MDC {
   }
 
   /**
-   * Remove the the context identified by the <code>key</code> parameter using
+   * Remove the diagnostic context identified by the <code>key</code> parameter using
    * the underlying system's MDC implementation. The <code>key</code> parameter
    * cannot be null. This method does nothing if there is no previous value
    * associated with <code>key</code>.
-   * 
+   *
+   * @param key  
    * @throws IllegalArgumentException
    *           in case the "key" parameter is null
    */
diff --git a/slf4j-api/src/main/java/org/slf4j/Marker.java b/slf4j-api/src/main/java/org/slf4j/Marker.java
index 1349c40..3d59b52 100644
--- a/slf4j-api/src/main/java/org/slf4j/Marker.java
+++ b/slf4j-api/src/main/java/org/slf4j/Marker.java
@@ -115,8 +115,7 @@ public interface Marker extends Serializable {
    * 
    * If 'name' is null the returned value is always false.
    * 
-   * @param other
-   *                The marker to test for inclusion.
+   * @param name The marker name to test for inclusion.
    * @return Whether this marker contains the other marker.
    */
   public boolean contains(String name);
diff --git a/slf4j-api/src/main/java/org/slf4j/MarkerFactory.java b/slf4j-api/src/main/java/org/slf4j/MarkerFactory.java
index 84cb4e8..84cfcb6 100644
--- a/slf4j-api/src/main/java/org/slf4j/MarkerFactory.java
+++ b/slf4j-api/src/main/java/org/slf4j/MarkerFactory.java
@@ -74,6 +74,7 @@ public class MarkerFactory {
   /**
    * Create a marker which is detached (even at birth) from the MarkerFactory.
    *
+   * @param name the name of the marker
    * @return a dangling marker
    * @since 1.5.1
    */
diff --git a/slf4j-api/src/main/java/org/slf4j/helpers/NOPLogger.java b/slf4j-api/src/main/java/org/slf4j/helpers/NOPLogger.java
index b36be30..a1709dd 100644
--- a/slf4j-api/src/main/java/org/slf4j/helpers/NOPLogger.java
+++ b/slf4j-api/src/main/java/org/slf4j/helpers/NOPLogger.java
@@ -80,7 +80,7 @@ public class NOPLogger extends MarkerIgnoringBase {
   }
 
   /** A NOP implementation.  */
-  public final void trace(String format, Object[] argArray) {
+  public final void trace(String format, Object... argArray) {
     // NOP
   }
   
@@ -113,7 +113,7 @@ public class NOPLogger extends MarkerIgnoringBase {
   }
 
   /** A NOP implementation.  */
-  public final void debug(String format, Object[] argArray) {
+  public final void debug(String format, Object... argArray) {
     // NOP
   }
   
@@ -150,7 +150,7 @@ public class NOPLogger extends MarkerIgnoringBase {
   }
   
   /** A NOP implementation.  */
-  public final void info(String format, Object[] argArray) {
+  public final void info(String format, Object... argArray) {
     // NOP
   }
 
@@ -185,7 +185,7 @@ public class NOPLogger extends MarkerIgnoringBase {
   }
   
   /** A NOP implementation.  */
-  public final void warn(String format, Object[] argArray) {
+  public final void warn(String format, Object... argArray) {
     // NOP
   }
 
@@ -217,7 +217,7 @@ public class NOPLogger extends MarkerIgnoringBase {
   }
   
   /** A NOP implementation.  */
-  public final void error(String format, Object[] argArray) {
+  public final void error(String format, Object... argArray) {
     // NOP
   }
 
diff --git a/slf4j-ext/src/main/java/org/slf4j/cal10n/LocLoggerFactory.java b/slf4j-ext/src/main/java/org/slf4j/cal10n/LocLoggerFactory.java
index de1f562..4e21dac 100644
--- a/slf4j-ext/src/main/java/org/slf4j/cal10n/LocLoggerFactory.java
+++ b/slf4j-ext/src/main/java/org/slf4j/cal10n/LocLoggerFactory.java
@@ -56,7 +56,7 @@ public class LocLoggerFactory {
    * Get an LocLogger instance by name.
    * 
    * @param name
-   * @return
+   * @return LocLogger instance by name.
    */
   public LocLogger getLocLogger(String name) {
     return new LocLogger(LoggerFactory.getLogger(name), imc);
@@ -67,9 +67,8 @@ public class LocLoggerFactory {
    * after the class.
    * 
    * @param clazz
-   * @return
+   * @return LocLogger instance by class
    */
-  @SuppressWarnings("unchecked")
   public LocLogger getLocLogger(Class clazz) {
     return getLocLogger(clazz.getName());
   }
diff --git a/slf4j-ext/src/main/java/org/slf4j/ext/package.html b/slf4j-ext/src/main/java/org/slf4j/cal10n/package.html
similarity index 58%
copy from slf4j-ext/src/main/java/org/slf4j/ext/package.html
copy to slf4j-ext/src/main/java/org/slf4j/cal10n/package.html
index f9ea74a..39cfc8d 100644
--- a/slf4j-ext/src/main/java/org/slf4j/ext/package.html
+++ b/slf4j-ext/src/main/java/org/slf4j/cal10n/package.html
@@ -1,12 +1,12 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 
-<html> 
+<html>
   <head>
     <title></title>
   </head>
 
 
-  <body>    
-    <p>SLF4J API extensions</p>    
-  </body> 
+  <body>
+    <p>SLF4J API extensions</p>
+  </body>
 </html>
diff --git a/slf4j-ext/src/main/java/org/slf4j/ext/EventData.java b/slf4j-ext/src/main/java/org/slf4j/ext/EventData.java
index c936a2e..7430548 100755
--- a/slf4j-ext/src/main/java/org/slf4j/ext/EventData.java
+++ b/slf4j-ext/src/main/java/org/slf4j/ext/EventData.java
@@ -97,6 +97,7 @@ public class EventData implements Serializable {
   /**
    * Serialize all the EventData items into an XML representation.
    * 
+   * @param map the Map to transform
    * @return an XML String containing all the EventDAta items.
    */
   public static String toXML(Map<String, Object> map) {
diff --git a/slf4j-ext/src/main/java/org/slf4j/ext/LoggerWrapper.java b/slf4j-ext/src/main/java/org/slf4j/ext/LoggerWrapper.java
index c1aeaff..29a881d 100644
--- a/slf4j-ext/src/main/java/org/slf4j/ext/LoggerWrapper.java
+++ b/slf4j-ext/src/main/java/org/slf4j/ext/LoggerWrapper.java
@@ -130,17 +130,17 @@ public class LoggerWrapper implements Logger {
   /**
    * Delegate to the appropriate method of the underlying logger.
    */
-  public void trace(String format, Object[] argArray) {
+  public void trace(String format, Object... args) {
     if (!logger.isTraceEnabled())
       return;
 
     if (instanceofLAL) {
-      String formattedMessage = MessageFormatter.arrayFormat(format, argArray)
+      String formattedMessage = MessageFormatter.arrayFormat(format, args)
           .getMessage();
       ((LocationAwareLogger) logger).log(null, fqcn,
-          LocationAwareLogger.TRACE_INT, formattedMessage, argArray, null);
+          LocationAwareLogger.TRACE_INT, formattedMessage, args, null);
     } else {
-      logger.trace(format, argArray);
+      logger.trace(format, args);
     }
   }
 
@@ -210,16 +210,16 @@ public class LoggerWrapper implements Logger {
   /**
    * Delegate to the appropriate method of the underlying logger.
    */
-  public void trace(Marker marker, String format, Object[] argArray) {
+  public void trace(Marker marker, String format, Object... args) {
     if (!logger.isTraceEnabled(marker))
       return;
     if (instanceofLAL) {
-      String formattedMessage = MessageFormatter.arrayFormat(format, argArray)
+      String formattedMessage = MessageFormatter.arrayFormat(format, args)
           .getMessage();
       ((LocationAwareLogger) logger).log(marker, fqcn,
-          LocationAwareLogger.TRACE_INT, formattedMessage, argArray, null);
+          LocationAwareLogger.TRACE_INT, formattedMessage, args, null);
     } else {
-      logger.trace(marker, format, argArray);
+      logger.trace(marker, format, args);
     }
   }
 
@@ -305,7 +305,7 @@ public class LoggerWrapper implements Logger {
   /**
    * Delegate to the appropriate method of the underlying logger.
    */
-  public void debug(String format, Object[] argArray) {
+  public void debug(String format, Object... argArray) {
     if (!logger.isDebugEnabled())
       return;
 
@@ -384,7 +384,7 @@ public class LoggerWrapper implements Logger {
   /**
    * Delegate to the appropriate method of the underlying logger.
    */
-  public void debug(Marker marker, String format, Object[] argArray) {
+  public void debug(Marker marker, String format, Object... argArray) {
     if (!logger.isDebugEnabled(marker))
       return;
     if (instanceofLAL) {
@@ -480,17 +480,17 @@ public class LoggerWrapper implements Logger {
   /**
    * Delegate to the appropriate method of the underlying logger.
    */
-  public void info(String format, Object[] argArray) {
+  public void info(String format, Object... args) {
     if (!logger.isInfoEnabled())
       return;
 
     if (instanceofLAL) {
-      String formattedMessage = MessageFormatter.arrayFormat(format, argArray)
+      String formattedMessage = MessageFormatter.arrayFormat(format, args)
           .getMessage();
       ((LocationAwareLogger) logger).log(null, fqcn,
-          LocationAwareLogger.INFO_INT, formattedMessage, argArray, null);
+          LocationAwareLogger.INFO_INT, formattedMessage, args, null);
     } else {
-      logger.info(format, argArray);
+      logger.info(format, args);
     }
   }
 
@@ -560,16 +560,16 @@ public class LoggerWrapper implements Logger {
   /**
    * Delegate to the appropriate method of the underlying logger.
    */
-  public void info(Marker marker, String format, Object[] argArray) {
+  public void info(Marker marker, String format, Object... args) {
     if (!logger.isInfoEnabled(marker))
       return;
     if (instanceofLAL) {
-      String formattedMessage = MessageFormatter.arrayFormat(format, argArray)
+      String formattedMessage = MessageFormatter.arrayFormat(format, args)
           .getMessage();
       ((LocationAwareLogger) logger).log(marker, fqcn,
-          LocationAwareLogger.INFO_INT, formattedMessage, argArray, null);
+          LocationAwareLogger.INFO_INT, formattedMessage, args, null);
     } else {
-      logger.info(marker, format, argArray);
+      logger.info(marker, format, args);
     }
   }
 
@@ -652,17 +652,17 @@ public class LoggerWrapper implements Logger {
   /**
    * Delegate to the appropriate method of the underlying logger.
    */
-  public void warn(String format, Object[] argArray) {
+  public void warn(String format, Object... args) {
     if (!logger.isWarnEnabled())
       return;
 
     if (instanceofLAL) {
-      String formattedMessage = MessageFormatter.arrayFormat(format, argArray)
+      String formattedMessage = MessageFormatter.arrayFormat(format, args)
           .getMessage();
       ((LocationAwareLogger) logger).log(null, fqcn,
-          LocationAwareLogger.WARN_INT, formattedMessage, argArray, null);
+          LocationAwareLogger.WARN_INT, formattedMessage, args, null);
     } else {
-      logger.warn(format, argArray);
+      logger.warn(format, args);
     }
   }
 
@@ -732,16 +732,16 @@ public class LoggerWrapper implements Logger {
   /**
    * Delegate to the appropriate method of the underlying logger.
    */
-  public void warn(Marker marker, String format, Object[] argArray) {
+  public void warn(Marker marker, String format, Object... args) {
     if (!logger.isWarnEnabled(marker))
       return;
     if (instanceofLAL) {
-      String formattedMessage = MessageFormatter.arrayFormat(format, argArray)
+      String formattedMessage = MessageFormatter.arrayFormat(format, args)
           .getMessage();
       ((LocationAwareLogger) logger).log(marker, fqcn,
-          LocationAwareLogger.WARN_INT, formattedMessage, argArray, null);
+          LocationAwareLogger.WARN_INT, formattedMessage, args, null);
     } else {
-      logger.warn(marker, format, argArray);
+      logger.warn(marker, format, args);
     }
   }
 
@@ -827,17 +827,17 @@ public class LoggerWrapper implements Logger {
   /**
    * Delegate to the appropriate method of the underlying logger.
    */
-  public void error(String format, Object[] argArray) {
+  public void error(String format, Object... args) {
     if (!logger.isErrorEnabled())
       return;
 
     if (instanceofLAL) {
-      String formattedMessage = MessageFormatter.arrayFormat(format, argArray)
+      String formattedMessage = MessageFormatter.arrayFormat(format, args)
           .getMessage();
       ((LocationAwareLogger) logger).log(null, fqcn,
-          LocationAwareLogger.ERROR_INT, formattedMessage, argArray, null);
+          LocationAwareLogger.ERROR_INT, formattedMessage, args, null);
     } else {
-      logger.error(format, argArray);
+      logger.error(format, args);
     }
   }
 
@@ -907,16 +907,16 @@ public class LoggerWrapper implements Logger {
   /**
    * Delegate to the appropriate method of the underlying logger.
    */
-  public void error(Marker marker, String format, Object[] argArray) {
+  public void error(Marker marker, String format, Object... args) {
     if (!logger.isErrorEnabled(marker))
       return;
     if (instanceofLAL) {
-      String formattedMessage = MessageFormatter.arrayFormat(format, argArray)
+      String formattedMessage = MessageFormatter.arrayFormat(format, args)
           .getMessage();
       ((LocationAwareLogger) logger).log(marker, fqcn,
-          LocationAwareLogger.ERROR_INT, formattedMessage, argArray, null);
+          LocationAwareLogger.ERROR_INT, formattedMessage, args, null);
     } else {
-      logger.error(marker, format, argArray);
+      logger.error(marker, format, args);
     }
   }
 
diff --git a/slf4j-ext/src/main/java/org/slf4j/ext/XLoggerFactory.java b/slf4j-ext/src/main/java/org/slf4j/ext/XLoggerFactory.java
index afd623e..04452d4 100644
--- a/slf4j-ext/src/main/java/org/slf4j/ext/XLoggerFactory.java
+++ b/slf4j-ext/src/main/java/org/slf4j/ext/XLoggerFactory.java
@@ -32,10 +32,10 @@ import org.slf4j.LoggerFactory;
  * {@link LoggerFactory} producing {@link XLogger} instances.
  * 
  * <p>Contrary to {@link LoggerFactory#getLogger(String)} method of 
- * {@link LoggerFactory}, each call to {@link getXLogger} 
- * produces a new instance of XLogger. This should not matter because an 
- * XLogger instance does not have any state beyond that of the Logger instance 
- * it wraps.
+ * {@link LoggerFactory}, each call to {@link #getXLogger(String)} 
+ * produces a new instance of <code>XLogger</code>. This should not matter 
+ * because an <code>XLogger</code> instance does not have any state beyond that of 
+ * the {@link org.slf4j.Logger Logger} instance it wraps.
  * 
  * @author Ralph Goers
  * @author Ceki Gülcü
@@ -46,7 +46,7 @@ public class XLoggerFactory {
    * Get an XLogger instance by name.
    * 
    * @param name
-   * @return
+   * @return XLogger instance 
    */
   public static XLogger getXLogger(String name) {
     return new XLogger(LoggerFactory.getLogger(name));
@@ -57,9 +57,8 @@ public class XLoggerFactory {
    * will be named after the class.
    * 
    * @param clazz
-   * @return
+   * @return XLogger instance by name
    */
-  @SuppressWarnings("unchecked")
   public static XLogger getXLogger(Class clazz) {
     return getXLogger(clazz.getName());
   }
diff --git a/slf4j-ext/src/main/java/org/slf4j/ext/package.html b/slf4j-ext/src/main/java/org/slf4j/ext/package.html
index f9ea74a..5c55a91 100644
--- a/slf4j-ext/src/main/java/org/slf4j/ext/package.html
+++ b/slf4j-ext/src/main/java/org/slf4j/ext/package.html
@@ -7,6 +7,6 @@
 
 
   <body>    
-    <p>SLF4J API extensions</p>    
+    <p>Localized logging using the <a href="http://cal10n.qos.ch">CAL10N</a> API.</p>
   </body> 
 </html>
diff --git a/slf4j-ext/src/main/java/org/slf4j/profiler/SpacePadder.java b/slf4j-ext/src/main/java/org/slf4j/profiler/SpacePadder.java
index 8e5d4dc..804cf88 100644
--- a/slf4j-ext/src/main/java/org/slf4j/profiler/SpacePadder.java
+++ b/slf4j-ext/src/main/java/org/slf4j/profiler/SpacePadder.java
@@ -60,6 +60,9 @@ public class SpacePadder {
   
   /**
    * Fast space padding method.
+   * 
+   * @param sbuf the buffer to pad
+   * @param length the target size of the buffer after padding
    */
   final static public void spacePad(StringBuffer sbuf, int length) {
     while (length >= 32) {
diff --git a/slf4j-jcl/src/main/java/org/slf4j/impl/StaticMDCBinder.java b/slf4j-jcl/src/main/java/org/slf4j/impl/StaticMDCBinder.java
index ebdbeba..4972927 100644
--- a/slf4j-jcl/src/main/java/org/slf4j/impl/StaticMDCBinder.java
+++ b/slf4j-jcl/src/main/java/org/slf4j/impl/StaticMDCBinder.java
@@ -46,7 +46,9 @@ public class StaticMDCBinder {
   
   /**
    * Currently this method always returns an instance of 
-   * {@link StaticMDCBinder}.
+   * {@link NOPMDCAdapter}.
+   * 
+   * @return instance of NOPMDCAdapter
    */
   public MDCAdapter getMDCA() {
      return new NOPMDCAdapter();
diff --git a/slf4j-log4j12/src/test/java/org/slf4j/InvocationTest.java b/slf4j-log4j12/src/test/java/org/slf4j/InvocationTest.java
index 4044dec..ddd4d2b 100644
--- a/slf4j-log4j12/src/test/java/org/slf4j/InvocationTest.java
+++ b/slf4j-log4j12/src/test/java/org/slf4j/InvocationTest.java
@@ -159,7 +159,7 @@ public class InvocationTest extends TestCase {
   }
   
   public void testMDCContextMapValues() {
-    Map map = new HashMap();
+    Map<String, String> map = new HashMap<String, String>();
     map.put("ka", "va");
     map.put("kb", "vb");
     
diff --git a/slf4j-migrator/src/main/java/org/slf4j/migrator/ProjectConverter.java b/slf4j-migrator/src/main/java/org/slf4j/migrator/ProjectConverter.java
index 3499c39..a0ddead 100644
--- a/slf4j-migrator/src/main/java/org/slf4j/migrator/ProjectConverter.java
+++ b/slf4j-migrator/src/main/java/org/slf4j/migrator/ProjectConverter.java
@@ -57,9 +57,9 @@ public class ProjectConverter {
    * Ask for concrete matcher implementation depending on the conversion mode
    * Ask for user confirmation to convert the selected source directory if valid
    * Ask for user confirmation in case of number of files to convert > 1000
-   * 
-   * @return true if init operation complete
-   * @throws IOException
+   *
+   * @param conversionType 
+   * @param progressListener 
    */
   public ProjectConverter(int conversionType, ProgressListener progressListener) {
     this.progressListener = progressListener;
diff --git a/slf4j-simple/src/main/java/org/slf4j/impl/SimpleLogger.java b/slf4j-simple/src/main/java/org/slf4j/impl/SimpleLogger.java
index 1354994..6f4493b 100644
--- a/slf4j-simple/src/main/java/org/slf4j/impl/SimpleLogger.java
+++ b/slf4j-simple/src/main/java/org/slf4j/impl/SimpleLogger.java
@@ -466,7 +466,7 @@ public class SimpleLogger extends MarkerIgnoringBase {
    * Perform double parameter substitution before logging the message of level
    * TRACE according to the format outlined above.
    */
-  public void trace(String format, Object[] argArray) {
+  public void trace(String format, Object... argArray) {
     formatAndLog(LOG_LEVEL_TRACE, format, argArray);
   }
 
@@ -508,7 +508,7 @@ public class SimpleLogger extends MarkerIgnoringBase {
    * Perform double parameter substitution before logging the message of level
    * DEBUG according to the format outlined above.
    */
-  public void debug(String format, Object[] argArray) {
+  public void debug(String format, Object... argArray) {
     formatAndLog(LOG_LEVEL_DEBUG, format, argArray);
   }
 
@@ -550,7 +550,7 @@ public class SimpleLogger extends MarkerIgnoringBase {
    * Perform double parameter substitution before logging the message of level
    * INFO according to the format outlined above.
    */
-  public void info(String format, Object[] argArray) {
+  public void info(String format, Object... argArray) {
     formatAndLog(LOG_LEVEL_INFO, format, argArray);
   }
 
@@ -592,7 +592,7 @@ public class SimpleLogger extends MarkerIgnoringBase {
    * Perform double parameter substitution before logging the message of level
    * WARN according to the format outlined above.
    */
-  public void warn(String format, Object[] argArray) {
+  public void warn(String format, Object... argArray) {
     formatAndLog(LOG_LEVEL_WARN, format, argArray);
   }
 
@@ -634,7 +634,7 @@ public class SimpleLogger extends MarkerIgnoringBase {
    * Perform double parameter substitution before logging the message of level
    * ERROR according to the format outlined above.
    */
-  public void error(String format, Object[] argArray) {
+  public void error(String format, Object... argArray) {
     formatAndLog(LOG_LEVEL_ERROR, format, argArray);
   }
 
diff --git a/slf4j-site/src/site/pages/manual.html b/slf4j-site/src/site/pages/manual.html
index afd1b69..490bdb9 100644
--- a/slf4j-site/src/site/pages/manual.html
+++ b/slf4j-site/src/site/pages/manual.html
@@ -281,7 +281,13 @@ SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further detail
       addition to <em>logback-classic-${logback.version}.jar</em>,
       this will pull <em>slf4j-api-${project.version}.jar</em> as well
       as <em>logback-core-${logback.version}.jar</em> into your
-      project.</p>
+      project. Note that explicitly declaring a dependency on
+      <em>logback-core-${logback.version}</em> or
+      <em>slf4j-api-${project.version}.jar</em> is not wrong and may
+      be necessary to impose the correct version of said artifacts by
+      virtue of Maven's "nearest definition" dependency mediation
+      rule.
+      </p>
 
 <pre class="prettyprint source"><dependency> 
   <groupId>ch.qos.logback</groupId>
@@ -297,7 +303,13 @@ SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further detail
       <em>pom.xml</em> file as shown below. In addition to
       <em>slf4j-log4j12-${project.version}.jar</em>, this will pull
       <em>slf4j-api-${project.version}.jar</em> as well as
-      <em>log4j-${log4j.version}.jar</em> into your project.</p>
+      <em>log4j-${log4j.version}.jar</em> into your project.  Note
+      that explicitly declaring a dependency on
+      <em>log4j-${log4j.version}.jar</em> or
+      <em>slf4j-api-${project.version}.jar</em> is not wrong and may
+      be necessary to impose the correct version of said artifacts by
+      virtue of Maven's "nearest definition" dependency mediation
+      rule.</p>
 
 <pre class="prettyprint source"><dependency> 
   <groupId>org.slf4j</groupId>
@@ -313,7 +325,12 @@ SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further detail
       "org.slf4j:slf4j-jdk14" as a dependency in your <em>pom.xml</em>
       file as shown below. In addition to
       <em>slf4j-jdk14-${project.version}.jar</em>, this will pull
-      <em>slf4j-api-${project.version}.jar</em> into your project.</p>
+      <em>slf4j-api-${project.version}.jar</em> into your project.
+      Note that explicitly declaring a dependency on
+      <em>slf4j-api-${project.version}.jar</em> is not wrong and may
+      be necessary to impose the correct version of said artifact by
+      virtue of Maven's "nearest definition" dependency mediation
+      rule.</p>
 
 <pre class="prettyprint source"><dependency> 
   <groupId>org.slf4j</groupId>
diff --git a/slf4j-site/src/site/pages/news.html b/slf4j-site/src/site/pages/news.html
index b011698..386fdaf 100644
--- a/slf4j-site/src/site/pages/news.html
+++ b/slf4j-site/src/site/pages/news.html
@@ -29,6 +29,16 @@
 
    <hr noshade="noshade" size="1"/>
 
+   <h3>14th of September, 2012 - Release of SLF4J 1.7.2</h3>
+
+   <p>Fixed <a
+   href="http://bugzilla.slf4j.org/show_bug.cgi?id=272">bug
+   272</a>. All <code>Logger</code> implementations shipping with
+   SLF4J use <code>Object...</code> instead of <code>Object[]</code>
+   to avoid compiler warnings.</p>
+
+   <hr noshade="noshade" size="1"/>
+
    <h3>14th of September, 2012 - Release of SLF4J 1.7.1</h3>
 
    <p><a

-----------------------------------------------------------------------

Summary of changes:
 .../main/java/org/apache/commons/logging/Log.java  |    4 +
 .../org/apache/commons/logging/LogFactory.java     |    6 +-
 .../java/org/slf4j/bridge/SLF4JBridgeHandler.java  |    2 +-
 pom.xml                                            |   65 +++----------------
 .../src/main/java/org/slf4j/ILoggerFactory.java    |    1 +
 .../src/main/java/org/slf4j/IMarkerFactory.java    |    6 +-
 slf4j-api/src/main/java/org/slf4j/Logger.java      |   18 +++++
 slf4j-api/src/main/java/org/slf4j/MDC.java         |   19 ++++--
 slf4j-api/src/main/java/org/slf4j/Marker.java      |    3 +-
 .../src/main/java/org/slf4j/MarkerFactory.java     |    1 +
 .../src/main/java/org/slf4j/helpers/NOPLogger.java |   10 ++--
 .../java/org/slf4j/cal10n/LocLoggerFactory.java    |    5 +-
 .../org/slf4j/{profiler => cal10n}/package.html    |    7 +-
 .../src/main/java/org/slf4j/ext/EventData.java     |    1 +
 .../src/main/java/org/slf4j/ext/LoggerWrapper.java |   68 ++++++++++----------
 .../main/java/org/slf4j/ext/XLoggerFactory.java    |   13 ++--
 slf4j-ext/src/main/java/org/slf4j/ext/package.html |    2 +-
 .../main/java/org/slf4j/profiler/SpacePadder.java  |    3 +
 .../main/java/org/slf4j/impl/StaticMDCBinder.java  |    4 +-
 .../src/test/java/org/slf4j/InvocationTest.java    |    2 +-
 .../java/org/slf4j/migrator/ProjectConverter.java  |    6 +-
 .../src/main/java/org/slf4j/impl/SimpleLogger.java |   10 ++--
 slf4j-site/src/site/pages/manual.html              |   23 ++++++-
 slf4j-site/src/site/pages/news.html                |   10 +++
 24 files changed, 153 insertions(+), 136 deletions(-)
 copy slf4j-ext/src/main/java/org/slf4j/{profiler => cal10n}/package.html (64%)


hooks/post-receive
-- 
SLF4J: Simple Logging Facade for Java


More information about the slf4j-dev mailing list