Skip to content

Commit

Permalink
Run spotlessApply
Browse files Browse the repository at this point in the history
  • Loading branch information
DerFrZocker committed Jul 15, 2023
1 parent 4049afd commit dba1f01
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 6 deletions.
Expand Up @@ -51,7 +51,7 @@ class PluginRegistry {
new PluginLoader(pluginSwitch).loadPlugin(DoNotMockEnforcer.class);

private final LocationFactory locationFactory =
new PluginLoader(pluginSwitch).loadPlugin(LocationFactory.class);
new PluginLoader(pluginSwitch).loadPlugin(LocationFactory.class);

PluginRegistry() {
instantiatorProvider =
Expand Down
Expand Up @@ -131,7 +131,11 @@ public Callable<?> handle(Object instance, Method origin, Object[] arguments) th
}
return new ReturnValueWrapper(
interceptor.doIntercept(
instance, origin, arguments, realMethod, Plugins.getLocationFactory().create(true)));
instance,
origin,
arguments,
realMethod,
Plugins.getLocationFactory().create(true)));
}

@Override
Expand Down
Expand Up @@ -53,7 +53,8 @@ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFo

Object doIntercept(Object mock, Method invokedMethod, Object[] arguments, RealMethod realMethod)
throws Throwable {
return doIntercept(mock, invokedMethod, arguments, realMethod, Plugins.getLocationFactory().create());
return doIntercept(
mock, invokedMethod, arguments, realMethod, Plugins.getLocationFactory().create());
}

Object doIntercept(
Expand Down
6 changes: 5 additions & 1 deletion src/main/java/org/mockito/internal/exceptions/Reporter.java
Expand Up @@ -419,7 +419,11 @@ public static MockitoAssertionError wantedButNotInvoked(
}

private static String createWantedButNotInvokedMessage(DescribedInvocation wanted) {
return join("Wanted but not invoked:", wanted.toString(), Plugins.getLocationFactory().create(), "");
return join(
"Wanted but not invoked:",
wanted.toString(),
Plugins.getLocationFactory().create(),
"");
}

public static MockitoAssertionError wantedButNotInvokedInOrder(
Expand Down
Expand Up @@ -71,7 +71,12 @@ private static InterceptedInvocation createInvocation(
RealMethod realMethod,
MockCreationSettings settings) {
return createInvocation(
mock, invokedMethod, arguments, realMethod, settings, Plugins.getLocationFactory().create());
mock,
invokedMethod,
arguments,
realMethod,
settings,
Plugins.getLocationFactory().create());
}

private static MockitoMethod createMockitoMethod(Method method, MockCreationSettings settings) {
Expand Down
Expand Up @@ -65,7 +65,8 @@ public Object apply(Class<?> type) {
MockCreationSettings<?> mockSettings =
MockUtil.getMockSettings(invocation.getMock());
Answer<?> defaultAnswer =
new ThrowsSmartNullPointer(invocation, Plugins.getLocationFactory().create());
new ThrowsSmartNullPointer(
invocation, Plugins.getLocationFactory().create());

return Mockito.mock(
type,
Expand Down

0 comments on commit dba1f01

Please sign in to comment.