File tree 2 files changed +12
-2
lines changed
main/java/com/google/errorprone/scanner
test/java/com/google/errorprone/scanner
2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 24
24
import com .google .common .collect .MutableClassToInstanceMap ;
25
25
import com .google .errorprone .ErrorProneFlags ;
26
26
import com .google .errorprone .annotations .CanIgnoreReturnValue ;
27
- import com .google .inject .ProvisionException ;
28
27
import java .lang .reflect .Constructor ;
29
28
import java .util .ArrayList ;
30
29
import java .util .List ;
41
40
public final class ErrorProneInjector {
42
41
private final ClassToInstanceMap <Object > instances = MutableClassToInstanceMap .create ();
43
42
43
+ /** Indicates that there was a runtime failure while providing an instance. */
44
+ public static final class ProvisionException extends RuntimeException {
45
+ public ProvisionException (String message ) {
46
+ super (message );
47
+ }
48
+
49
+ public ProvisionException (String message , Throwable cause ) {
50
+ super (message , cause );
51
+ }
52
+ }
53
+
44
54
public static ErrorProneInjector create () {
45
55
return new ErrorProneInjector ();
46
56
}
Original file line number Diff line number Diff line change 19
19
import static com .google .common .truth .Truth .assertThat ;
20
20
import static org .junit .Assert .assertThrows ;
21
21
22
- import com .google .inject .ProvisionException ;
22
+ import com .google .errorprone . scanner . ErrorProneInjector .ProvisionException ;
23
23
import javax .inject .Inject ;
24
24
import org .junit .Test ;
25
25
import org .junit .runner .RunWith ;
You can’t perform that action at this time.
0 commit comments