Commit caf35b2
authored
Remove all deprecated APIs (#2418)
All of these APIs have been marked as deprecated and have been present
in Mockito for quite a while. To cleanup our API surface and reduce
technical debt, let's remove these long-deprecated methods/classes.
An overview of now-deleted classes/methods:
- org.mockito.Matchers which was an alias for
org.mockito.ArgumentMatchers
- org.mockito.ArgumentMatchers#{anyObject,anyVararg} both which were
aliases for org.mockito.ArgumentMatchers#any
- org.mockito.ArgumentMatchers#any*Of, which were aliases for the same
method name without the Of and the generic parameters (which were
ignored)
- org.mockito.ArgumentMatchers#{is}{Not}Null(Class) which took a class
which was ignored. Aliases for the same methods without the parameter
- org.mockito.MockedStatic#verify which had the parameter types reversed
- org.mockito.Mockito#verifyZeroInteractions an alias of
verifyNoMoreInteractions
- org.mockito.Mockito#debug framework integration API that we later
refactored
- org.mockito.configuration.AnnotationEngine which was leaking internal
APIs and instead users should use org.mockito.plugins.AnnotationEngine
- org.mockito.exceptions.verification.TooLittleActualInvocations fixed
the grammar from "Little" to "Few"
- Numerous internal APIs that we never officially supported and can now
be removed
- org.mockito.plugins.InstantiatorProvider which was leaking internal
APIs and instead users should use InstantiatorProvider2 (we should
probably rename back to remove the number in a future major release)
- org.mockito.runners a package that hosted several old JUnit runners
which were no longer supported. Users should instead use
org.mockito.junit.MockitoJUnitRunner which is our official JUnit4
runner.
Since these APIs are removed, this change effectively defines Mockito 4.1 parent 916e61e commit caf35b2
109 files changed
Lines changed: 158 additions & 2317 deletions
File tree
- src
- main/java/org/mockito
- configuration
- exceptions/verification
- internal
- configuration
- plugins
- creation/instance
- debugging
- exceptions
- invocation
- junit/util
- verification
- api
- invocation
- plugins
- runners
- stubbing
- test/java/org
- mockitousage
- annotation
- basicapi
- bugs
- varargs
- configuration
- customization
- debugging
- examples/use
- junitrunner
- matchers
- misuse
- plugins
- spies
- stacktrace
- stubbing
- verification
- mockito
- configuration
- internal
- configuration
- plugins
- handler
- invocation
- junit/util
- util/reflection
- runners
- subprojects
- deprecatedPluginsTest
- src/test
- java/org/mockitousage/plugins
- resources/mockito-extensions
- extTest/src/test
- java/org/mockitousage/plugins/instantiator
- resources/mockito-extensions
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | 88 | | |
98 | 89 | | |
99 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
0 commit comments