Signed-off-by: Michael Vorburger <mike@vorburger.ch>
*/
package org.opendaylight.infrautils.karaf;
+import com.google.errorprone.annotations.Var;
import com.google.inject.Injector;
import org.apache.karaf.shell.api.console.Registry;
import org.apache.karaf.shell.impl.action.command.ManagerImpl;
@Override
public <T> T getService(Class<T> clazz) {
- T service = super.getService(clazz);
+ @Var T service = super.getService(clazz);
if (service == null) {
service = guiceInjector.getInstance(clazz);
}
package org.opendaylight.infrautils.simple;
import com.google.inject.Module;
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.util.Set;
import javax.inject.Inject;
import org.apache.karaf.shell.api.action.Action;
private Set<Action> actions;
+ @SuppressFBWarnings("UR_UNINIT_READ") // injectMembers() DI magic is beyond FB
public ShellMain(Module mainModule) {
super(mainModule);
injector.injectMembers(this);