Revert "Additional log on plug-in self-registration and failures."

This reverts commit c0732b1301


The commit broke server startup with:

java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
        at com.google.gerrit.extensions.registration.DynamicSet.<clinit>(DynamicSet.java:45)
        at com.google.gerrit.server.config.GerritGlobalModule.configure(GerritGlobalModule.java:146
This commit is contained in:
Martin Fick
2012-07-10 17:35:27 -07:00
committed by gerrit code review
parent c0732b1301
commit aa511c0061
3 changed files with 1 additions and 15 deletions

View File

@@ -47,11 +47,6 @@ limitations under the License.
<groupId>org.apache.tomcat</groupId>
<artifactId>servlet-api</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
</dependencies>
<build>

View File

@@ -25,9 +25,6 @@ import com.google.inject.name.Named;
import com.google.inject.util.Providers;
import com.google.inject.util.Types;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Collection;
import java.util.Iterator;
import java.util.NoSuchElementException;
@@ -42,7 +39,6 @@ import java.util.concurrent.atomic.AtomicReference;
* registrations to decide between singleton and non-singleton members.
*/
public class DynamicSet<T> implements Iterable<T> {
private static final Logger log = LoggerFactory.getLogger(DynamicSet.class);
/**
* Declare a singleton {@code DynamicSet<T>} with a binder.
* <p>
@@ -151,8 +147,7 @@ public class DynamicSet<T> implements Iterable<T> {
try {
next = p.get();
} catch (RuntimeException e) {
log.error("Cannot get iterated object from provider " + p
+ ": object discared", e);
// TODO Log failed member of DynamicSet.
}
}
}

View File

@@ -192,12 +192,10 @@ class AutoRegisterModules {
if (is("org.apache.sshd.server.Command", clazz)) {
if (sshGen != null) {
PluginLoader.log.info("Exporting " + clazz + " as SSH Command");
sshGen.export(export, clazz);
}
} else if (is("javax.servlet.http.HttpServlet", clazz)) {
if (httpGen != null) {
PluginLoader.log.info("Exporting " + clazz + " as HTTP Servlet");
httpGen.export(export, clazz);
listen(clazz, clazz);
}
@@ -249,7 +247,6 @@ class AutoRegisterModules {
TypeLiteral<?> tl = TypeLiteral.get(type);
if (env.hasDynamicSet(tl)) {
sysSingletons.add(clazz);
PluginLoader.log.info("Registering " + clazz + " to listener " + tl);
sysListen.put(tl, clazz);
} else if (env.hasDynamicMap(tl)) {
if (clazz.getAnnotation(Export.class) == null) {
@@ -258,7 +255,6 @@ class AutoRegisterModules {
clazz.getName(), rawType.getName()));
}
sysSingletons.add(clazz);
PluginLoader.log.info("Registering " + clazz + " to listener " + tl);
sysListen.put(tl, clazz);
} else {
throw new InvalidPluginException(String.format(