[slf4j-dev] svn commit: r936 - slf4j/trunk/slf4j-api/src/main/java/org/slf4j/impl
ceki at slf4j.org
ceki at slf4j.org
Tue Jan 8 18:38:14 CET 2008
Author: ceki
Date: Tue Jan 8 18:38:14 2008
New Revision: 936
Modified:
slf4j/trunk/slf4j-api/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
slf4j/trunk/slf4j-api/src/main/java/org/slf4j/impl/StaticMarkerBinder.java
Log:
StaticLoggerBinder and StaticMarker binding are not meant to make it into slf4j-api.jar.
We clearly state this fact in the code via UnsupportedOperationExceptions throughout the code.
Modified: slf4j/trunk/slf4j-api/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
==============================================================================
--- slf4j/trunk/slf4j-api/src/main/java/org/slf4j/impl/StaticLoggerBinder.java (original)
+++ slf4j/trunk/slf4j-api/src/main/java/org/slf4j/impl/StaticLoggerBinder.java Tue Jan 8 18:38:14 2008
@@ -44,13 +44,14 @@
public static final StaticLoggerBinder SINGLETON = new StaticLoggerBinder();
private StaticLoggerBinder() {
+ throw new UnsupportedOperationException("This code should never make it into the jar");
}
public ILoggerFactory getLoggerFactory() {
- return null;
+ throw new UnsupportedOperationException("This code should never make it into the jar");
}
public String getLoggerFactoryClassStr() {
- return StaticLoggerBinder.class.getName();
+ throw new UnsupportedOperationException("This code should never make it into the jar");
}
}
Modified: slf4j/trunk/slf4j-api/src/main/java/org/slf4j/impl/StaticMarkerBinder.java
==============================================================================
--- slf4j/trunk/slf4j-api/src/main/java/org/slf4j/impl/StaticMarkerBinder.java (original)
+++ slf4j/trunk/slf4j-api/src/main/java/org/slf4j/impl/StaticMarkerBinder.java Tue Jan 8 18:38:14 2008
@@ -36,7 +36,7 @@
*
* This class is meant to provide a *dummy* StaticMarkerBinder to the slf4j-api module.
* Real implementations are found in each SLF4J binding project, e.g. slf4j-nop,
- * slf4j-log4j12 etc.
+ * slf4j-simple, slf4j-log4j12 etc.
*
* @author Ceki Gülcü
*/
@@ -48,6 +48,7 @@
public static final StaticMarkerBinder SINGLETON = new StaticMarkerBinder();
private StaticMarkerBinder() {
+ throw new UnsupportedOperationException("This code should never make it into the jar");
}
/**
@@ -55,7 +56,7 @@
* {@link BasicMarkerFactory}.
*/
public IMarkerFactory getMarkerFactory() {
- return null;
+ throw new UnsupportedOperationException("This code should never make it into the jar");
}
/**
@@ -63,7 +64,7 @@
* {@link BasicMarkerFactory}.
*/
public String getMarkerFactoryClassStr() {
- return BasicMarkerFactory.class.getName();
+ throw new UnsupportedOperationException("This code should never make it into the jar");
}
More information about the slf4j-dev
mailing list