ILoggerFactory instances manufacture {@link Logger}
* instances by name.
@@ -56,6 +53,5 @@ public interface ILoggerFactory {
* @param name the name of the Logger to return
* @return a Logger instance
*/
- @Nonnull
- public Logger getLogger(@Nonnull String name);
+ public Logger getLogger(String name);
}
diff --git a/slf4j-api/src/main/java/org/slf4j/LoggerFactory.java b/slf4j-api/src/main/java/org/slf4j/LoggerFactory.java
index 87efaa71..81450333 100755
--- a/slf4j-api/src/main/java/org/slf4j/LoggerFactory.java
+++ b/slf4j-api/src/main/java/org/slf4j/LoggerFactory.java
@@ -33,8 +33,6 @@ import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
-import javax.annotation.Nonnull;
-
import org.slf4j.helpers.NOPLoggerFactory;
import org.slf4j.helpers.SubstituteLogger;
import org.slf4j.helpers.SubstituteLoggerFactory;
@@ -282,8 +280,7 @@ public final class LoggerFactory {
* @param name The name of the logger.
* @return logger
*/
- @Nonnull
- public static Logger getLogger(@Nonnull String name) {
+ public static Logger getLogger(String name) {
ILoggerFactory iLoggerFactory = getILoggerFactory();
return iLoggerFactory.getLogger(name);
}
@@ -304,8 +301,7 @@ public final class LoggerFactory {
*
* @see Detected logger name mismatch
*/
- @Nonnull
- public static Logger getLogger(@Nonnull Class> clazz) {
+ public static Logger getLogger(Class> clazz) {
Logger logger = getLogger(clazz.getName());
if (DETECT_LOGGER_NAME_MISMATCH) {
Class> autoComputedCallingClass = Util.getCallingClass();
@@ -330,7 +326,6 @@ public final class LoggerFactory {
*
* @return the ILoggerFactory instance in use
*/
- @Nonnull
public static ILoggerFactory getILoggerFactory() {
if (INITIALIZATION_STATE == UNINITIALIZED) {
INITIALIZATION_STATE = ONGOING_INITIALIZATION;
diff --git a/slf4j-ext/pom.xml b/slf4j-ext/pom.xml
index 5386c375..50b67839 100755
--- a/slf4j-ext/pom.xml
+++ b/slf4j-ext/pom.xml
@@ -7,7 +7,7 @@
The introduction of the @Nonnull JSR 305 annotation in SLF4J + version 1.7.8 causes the Scala compiler to fail. This is issue has + been documented in SI-5420. Given + that many Scala users will be affected by this issue for the + foreseeable future, we have decided to renounce the user of JSR 305 + annotations in SLF4J for the time being. +
+ +Spot incorrectly named loggers by setting the