Skip to content

Commit

Permalink
Bump error-prone from 2.1.2 to 2.1.3
Browse files Browse the repository at this point in the history
and some code changes now required by enabling a few extra checks which
in the first round I could not enable because of un-fixable violations
in Immutables.org generated code (which could possibly have affected
YANG generated code as well later)

With with the new XepExcludedPaths, see
google/error-prone#821 (instead of
google/error-prone#808), we can ignore
/target/ so that's not a problem, anymore.

The disabled StaticOrDefaultInterfaceMethod is because I've hit it
during the build of caches/ but learnt its very Android specific, we
don't care, see
http://errorprone.info/bugpattern/StaticOrDefaultInterfaceMethod

The added FutureReturnValueIgnored is GREAT.

Change Log on
https://groups.google.com/forum/#!msg/error-prone-announce/-ExdzeDOURY/7cQqwSezCQAJ

Change-Id: I05d5497626240d1a30cc54ee3014f1dbe367fcb5
Signed-off-by: Michael Vorburger <[email protected]>
  • Loading branch information
vorburger committed Dec 19, 2017
1 parent 53bacde commit c82ecfa
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
package org.opendaylight.infrautils.inject.guice.testutils;

import com.google.inject.AbstractModule;
import com.google.inject.Binder;
import org.opendaylight.infrautils.inject.ModuleSetupRuntimeException;

/**
Expand All @@ -19,6 +20,11 @@
*/
public abstract class AbstractCheckedModule extends AbstractModule {

/**
* Configures a {@link Binder} via the exposed methods.
*
* @throws ModuleSetupRuntimeException if binding failed
*/
@Override
@SuppressWarnings("checkstyle:IllegalCatch")
protected final void configure() throws ModuleSetupRuntimeException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ private enum State {
STARTED, STOPPED
}

private AtomicReference<State> state = new AtomicReference<>(State.STOPPED);
private final AtomicReference<State> state = new AtomicReference<>(State.STOPPED);

protected abstract void start() throws Exception;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,18 @@
*/
public interface Lifecycle {

/**
* Initialize the object.
*
* @throws ModuleSetupRuntimeException if initialization failed
*/
void init() throws ModuleSetupRuntimeException;

/**
* Destroy the object.
*
* @throws ModuleSetupRuntimeException if destruction failed
*/
void destroy() throws ModuleSetupRuntimeException;

boolean isRunning();
Expand Down

0 comments on commit c82ecfa

Please sign in to comment.