Fix compilaion error
I0adf995e1 broke compilation. Change-Id: I0103c4e348733fc9f07ebe4fb0d749e2136d9a6a
This commit is contained in:
@@ -65,8 +65,12 @@ class AutoRegisterModules {
|
|||||||
this.env = env;
|
this.env = env;
|
||||||
this.scanner = scanner;
|
this.scanner = scanner;
|
||||||
this.classLoader = classLoader;
|
this.classLoader = classLoader;
|
||||||
this.sshGen = env.hasSshModule() ? env.newSshModuleGenerator() : ModuleGenerator.NOP;
|
this.sshGen = env.hasSshModule()
|
||||||
this.httpGen = env.hasHttpModule() ? env.newHttpModuleGenerator() : ModuleGenerator.NOP;
|
? env.newSshModuleGenerator()
|
||||||
|
: new ModuleGenerator.NOP();
|
||||||
|
this.httpGen = env.hasHttpModule()
|
||||||
|
? env.newHttpModuleGenerator()
|
||||||
|
: new HttpModuleGenerator.NOP();
|
||||||
}
|
}
|
||||||
|
|
||||||
AutoRegisterModules discover() throws InvalidPluginException {
|
AutoRegisterModules discover() throws InvalidPluginException {
|
||||||
|
|||||||
@@ -14,6 +14,15 @@
|
|||||||
|
|
||||||
package com.google.gerrit.server.plugins;
|
package com.google.gerrit.server.plugins;
|
||||||
|
|
||||||
|
|
||||||
public interface HttpModuleGenerator extends ModuleGenerator {
|
public interface HttpModuleGenerator extends ModuleGenerator {
|
||||||
void export(String javascript);
|
void export(String javascript);
|
||||||
|
|
||||||
|
static class NOP extends ModuleGenerator.NOP
|
||||||
|
implements HttpModuleGenerator {
|
||||||
|
@Override
|
||||||
|
public void export(String javascript) {
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ public interface ModuleGenerator {
|
|||||||
|
|
||||||
Module create() throws InvalidPluginException;
|
Module create() throws InvalidPluginException;
|
||||||
|
|
||||||
public static final ModuleGenerator NOP = new ModuleGenerator() {
|
static class NOP implements ModuleGenerator {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setPluginName(String name) {
|
public void setPluginName(String name) {
|
||||||
@@ -48,5 +48,5 @@ public interface ModuleGenerator {
|
|||||||
public Module create() throws InvalidPluginException {
|
public Module create() throws InvalidPluginException {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user