DATACMNS-1449 - MethodInvocationRecorder now rejects final types.

This commit is contained in:
Oliver Drotbohm
2019-03-05 14:37:59 +01:00
parent 34507ec000
commit ea3af3dbbb
2 changed files with 11 additions and 1 deletions

View File

@@ -73,6 +73,7 @@ public class MethodInvocationRecorder {
public static <T> Recorded<T> forProxyOf(Class<T> type) {
Assert.notNull(type, "Type must not be null!");
Assert.isTrue(!Modifier.isFinal(type.getModifiers()), "Type to record invocations on must not be final!");
return new MethodInvocationRecorder().create(type);
}