Use consistent wording in precondition error messages
This commit is contained in:
@@ -44,8 +44,8 @@ class InvocationsRecorderClassTransformer implements ClassFileTransformer {
|
||||
private final String[] ignoredPackages;
|
||||
|
||||
public InvocationsRecorderClassTransformer(String[] instrumentedPackages, String[] ignoredPackages) {
|
||||
Assert.notNull(instrumentedPackages, "instrumentedPackages should not be null");
|
||||
Assert.notNull(ignoredPackages, "ignoredPackages should not be null");
|
||||
Assert.notNull(instrumentedPackages, "instrumentedPackages must not be null");
|
||||
Assert.notNull(ignoredPackages, "ignoredPackages must not be null");
|
||||
this.instrumentedPackages = rewriteToAsmFormat(instrumentedPackages);
|
||||
this.ignoredPackages = rewriteToAsmFormat(ignoredPackages);
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public class RuntimeHintsInvocationsAssert extends AbstractAssert<RuntimeHintsIn
|
||||
* @throws AssertionError if any of the recorded invocations has no match in the provided hints
|
||||
*/
|
||||
public void match(RuntimeHints runtimeHints) {
|
||||
Assert.notNull(runtimeHints, "RuntimeHints should not be null");
|
||||
Assert.notNull(runtimeHints, "RuntimeHints must not be null");
|
||||
configureRuntimeHints(runtimeHints);
|
||||
List<RecordedInvocation> noMatchInvocations =
|
||||
this.actual.recordedInvocations().filter(invocation -> !invocation.matches(runtimeHints)).toList();
|
||||
@@ -84,7 +84,7 @@ public class RuntimeHintsInvocationsAssert extends AbstractAssert<RuntimeHintsIn
|
||||
}
|
||||
|
||||
public ListAssert<RecordedInvocation> notMatching(RuntimeHints runtimeHints) {
|
||||
Assert.notNull(runtimeHints, "RuntimeHints should not be null");
|
||||
Assert.notNull(runtimeHints, "RuntimeHints must not be null");
|
||||
configureRuntimeHints(runtimeHints);
|
||||
return ListAssert.assertThatStream(this.actual.recordedInvocations()
|
||||
.filter(invocation -> !invocation.matches(runtimeHints)));
|
||||
|
||||
@@ -48,7 +48,7 @@ public final class RuntimeHintsRecorder {
|
||||
* @return the recorded invocations
|
||||
*/
|
||||
public synchronized static RuntimeHintsInvocations record(Runnable action) {
|
||||
Assert.notNull(action, "Runnable action should not be null");
|
||||
Assert.notNull(action, "Runnable action must not be null");
|
||||
Assert.isTrue(RuntimeHintsAgent.isLoaded(), "RuntimeHintsAgent should be loaded in the current JVM");
|
||||
RuntimeHintsRecorder recorder = new RuntimeHintsRecorder();
|
||||
RecordedInvocationsPublisher.addListener(recorder.listener);
|
||||
|
||||
Reference in New Issue
Block a user