Skip to content

Commit

Permalink
Disable CannotMockFinalClass/Method in open-source.
Browse files Browse the repository at this point in the history
We want this enabled internally, but externally, Mockito can be configured to allow mocking `final` classes (and methods). It's probably a bad idea to default it on.

Fixes #3281

PiperOrigin-RevId: 456754155
  • Loading branch information
graememorgan authored and Error Prone Team committed Jun 23, 2022
1 parent 8dae573 commit 7c9cb10
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -800,8 +800,6 @@ public static ScannerSupplier errorChecks() {
BugPatternNaming.class,
ByteBufferBackingArray.class,
CacheLoaderNull.class,
CannotMockFinalClass.class,
CannotMockFinalMethod.class,
CanonicalDuration.class,
CatchAndPrintStackTrace.class,
CatchFail.class,
Expand Down Expand Up @@ -1026,6 +1024,8 @@ public static ScannerSupplier errorChecks() {
BooleanParameter.class,
BuilderReturnThis.class,
CanIgnoreReturnValueSuggester.class,
CannotMockFinalClass.class,
CannotMockFinalMethod.class,
CatchingUnchecked.class,
CheckedExceptionNotThrown.class,
ClassName.class,
Expand Down

0 comments on commit 7c9cb10

Please sign in to comment.