Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development: Add check for REST endpoints to be in kebab case #9210

Merged
merged 47 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
f71989c
added initial test
SimonEntholzer Aug 12, 2024
a4c3ef7
Merge branch 'develop' into chore/add-kebab-case-for-rest-call-archit…
SimonEntholzer Aug 14, 2024
a79aa9b
fixed exercise-group REST urls
SimonEntholzer Aug 16, 2024
1d77b30
moved tests
SimonEntholzer Aug 16, 2024
6941c23
refactored
SimonEntholzer Aug 16, 2024
243ec59
fixed remaining failures
SimonEntholzer Aug 16, 2024
8342ca0
Merge branch 'develop' into chore/add-kebab-case-for-rest-call-archit…
SimonEntholzer Aug 16, 2024
fb89e20
fixed small issues
SimonEntholzer Aug 17, 2024
04470d2
Merge branch 'develop' into chore/add-kebab-case-for-rest-call-archit…
SimonEntholzer Aug 23, 2024
232e460
Merge branch 'develop' into chore/add-kebab-case-for-rest-call-archit…
SimonEntholzer Aug 27, 2024
601bc9d
Merge branch 'develop' into chore/add-kebab-case-for-rest-call-archit…
SimonEntholzer Sep 1, 2024
0d0ed21
fix url for test
SimonEntholzer Sep 1, 2024
d7591f9
fix url in jest test
SimonEntholzer Sep 1, 2024
bae73c5
merge resolving conflicts
SimonEntholzer Sep 3, 2024
38d3a2a
merge resolving conflicts
SimonEntholzer Sep 3, 2024
b8761a4
Merge branch 'develop' into chore/add-kebab-case-for-rest-call-archit…
SimonEntholzer Sep 4, 2024
c8f947c
Merge branch 'develop' into chore/add-kebab-case-for-rest-call-archit…
SimonEntholzer Sep 5, 2024
73d68f4
Merge branch 'develop' into chore/add-kebab-case-for-rest-call-archit…
SimonEntholzer Sep 5, 2024
3e252c6
Merge branch 'develop' into chore/add-kebab-case-for-rest-call-archit…
SimonEntholzer Sep 6, 2024
939fa2d
Merge branch 'develop' into chore/add-kebab-case-for-rest-call-archit…
SimonEntholzer Sep 6, 2024
7d3a2cb
Merge branch 'develop' into chore/add-kebab-case-for-rest-call-archit…
SimonEntholzer Sep 7, 2024
8712091
fix java docs
SimonEntholzer Sep 8, 2024
ff6f309
Update src/main/java/de/tum/in/www1/artemis/web/rest/AeolusTemplateRe…
SimonEntholzer Sep 9, 2024
88cf6d2
Merge branch 'develop' into chore/add-kebab-case-for-rest-call-archit…
SimonEntholzer Sep 9, 2024
31e38a2
Merge branch 'develop' into chore/add-kebab-case-for-rest-call-archit…
SimonEntholzer Sep 10, 2024
a9358fb
one regex to rule them all
SimonEntholzer Sep 10, 2024
2615458
Merge branch 'refs/heads/develop' into chore/add-kebab-case-for-rest-…
SimonEntholzer Sep 12, 2024
22fc382
simplify regex
SimonEntholzer Sep 12, 2024
24b8011
Merge branch 'develop' into chore/add-kebab-case-for-rest-call-archit…
SimonEntholzer Sep 13, 2024
2b9d217
use suggested regex
SimonEntholzer Sep 13, 2024
8d109e1
Merge branch 'develop' into chore/add-kebab-case-for-rest-call-archit…
SimonEntholzer Sep 13, 2024
b23c4af
Merge branch 'develop' into chore/add-kebab-case-for-rest-call-archit…
SimonEntholzer Sep 14, 2024
886d60a
Merge branch 'develop' into chore/add-kebab-case-for-rest-call-archit…
SimonEntholzer Sep 15, 2024
568f81e
Merge branch 'develop' into chore/add-kebab-case-for-rest-call-archit…
SimonEntholzer Sep 17, 2024
b9ab0af
Merge branch 'develop' into chore/add-kebab-case-for-rest-call-archit…
SimonEntholzer Sep 18, 2024
b472d27
Merge branch 'develop' into chore/add-kebab-case-for-rest-call-archit…
SimonEntholzer Sep 21, 2024
c03c1d1
Merge branch 'develop' into chore/add-kebab-case-for-rest-call-archit…
SimonEntholzer Sep 22, 2024
4851d33
escape the dot before json
SimonEntholzer Sep 22, 2024
c51a4a5
Merge branch 'develop' into chore/add-kebab-case-for-rest-call-archit…
SimonEntholzer Sep 27, 2024
cac0671
Merge branch 'develop' into chore/add-kebab-case-for-rest-call-archit…
SimonEntholzer Sep 27, 2024
287c187
Merge branch 'develop' into chore/add-kebab-case-for-rest-call-archit…
SimonEntholzer Sep 28, 2024
1f300e1
Merge branch 'develop' into chore/add-kebab-case-for-rest-call-archit…
SimonEntholzer Sep 28, 2024
1490b16
Merge branch 'refs/heads/develop' into chore/add-kebab-case-for-rest-…
SimonEntholzer Sep 28, 2024
7cc0f2e
Merge branch 'develop' into chore/add-kebab-case-for-rest-call-archit…
SimonEntholzer Sep 29, 2024
07f78d7
Merge branch 'develop' into chore/add-kebab-case-for-rest-call-archit…
Strohgelaender Sep 29, 2024
2e110f4
Merge branch 'develop' into chore/add-kebab-case-for-rest-call-archit…
SimonEntholzer Sep 30, 2024
02c69de
Merge branch 'develop' into chore/add-kebab-case-for-rest-call-archit…
SimonEntholzer Oct 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import java.lang.annotation.Annotation;
import java.util.Arrays;
import java.util.Collection;
import java.util.regex.Pattern;

import org.apache.commons.lang3.ClassUtils;
import org.junit.jupiter.api.BeforeAll;
Expand All @@ -35,6 +36,8 @@ public abstract class AbstractArchitectureTest {

protected static final String ARTEMIS_PACKAGE = "de.tum.in.www1.artemis";

private static final Pattern KEBAB_CASE_OR_PATH_VARIABLE_PATTERN = Pattern.compile("^([a-z]+(-[a-z]+)*|\\{[^}]+\\}|[a-z]+.json|saml2)$");

protected static JavaClasses testClasses;

protected static JavaClasses allClasses;
Expand Down Expand Up @@ -141,6 +144,23 @@ public void check(JavaMethod item, ConditionEvents events) {
};
}

protected ArchCondition<JavaMethod> useKebabCaseForRestAnnotations(DescribedPredicate<? super JavaAnnotation<?>> annotationPredicate) {
return new ArchCondition<>("use kebab case for rest mapping annotations") {

@Override
public void check(JavaMethod item, ConditionEvents events) {
var restMappingAnnotation = item.getAnnotations().stream().filter(annotationPredicate).findFirst();
if (restMappingAnnotation.isPresent()) {
boolean satisfied = Arrays.stream(((String[]) restMappingAnnotation.get().tryGetExplicitlyDeclaredProperty("value").get())[0].split("/"))
.allMatch(part -> KEBAB_CASE_OR_PATH_VARIABLE_PATTERN.matcher(part).matches());
if (!satisfied) {
events.add(violated(item, String.format("%s violates rule to use kebab case for rest call annotations", item.getFullName())));
}
}
}
};
}

/**
* Checks if the given method has a parameter with the given name.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,21 @@
toListUsage.check(allClasses);
}

@Test
void testUseKebabCaseForRestEndpoints() {
var postMapping = simpleNameAnnotation("PostMapping");
var getMapping = simpleNameAnnotation("GetMapping");
var putMapping = simpleNameAnnotation("PutMapping");
var deleteMapping = simpleNameAnnotation("DeleteMapping");
SimonEntholzer marked this conversation as resolved.
Show resolved Hide resolved

Set<DescribedPredicate<? super JavaAnnotation<?>>> allPredicates = Set.of(postMapping, getMapping, putMapping, deleteMapping);

for (var predicate : allPredicates) {
ArchRule restRequestAnnotatedMethods = methods().should(useKebabCaseForRestAnnotations(predicate));
restRequestAnnotatedMethods.check(allClasses);

Check failure on line 149 in src/test/java/de/tum/in/www1/artemis/architecture/ArchitectureTest.java

View workflow job for this annotation

GitHub Actions / Java Architecture Tests

de.tum.in.www1.artemis.architecture.ArchitectureTest ► testUseKebabCaseForRestEndpoints()

Failed test found in: build/test-results/test/TEST-de.tum.in.www1.artemis.architecture.ArchitectureTest.xml Error: java.lang.AssertionError: Architecture Violation [Priority: MEDIUM] - Rule 'methods should use kebab case for rest mapping annotations' was violated (1 times):
Raw output
java.lang.AssertionError: Architecture Violation [Priority: MEDIUM] - Rule 'methods should use kebab case for rest mapping annotations' was violated (1 times):
de.tum.in.www1.artemis.web.rest.ExerciseGroupResource.deleteExerciseGroup(java.lang.Long, java.lang.Long, java.lang.Long, boolean, boolean) violates rule to use kebab case for rest call annotations
	at com.tngtech.archunit.lang.ArchRule$Assertions.assertNoViolation(ArchRule.java:94)
	at com.tngtech.archunit.lang.ArchRule$Assertions.check(ArchRule.java:86)
	at com.tngtech.archunit.lang.ArchRule$Factory$SimpleArchRule.check(ArchRule.java:165)
	at com.tngtech.archunit.lang.syntax.ObjectsShouldInternal.check(ObjectsShouldInternal.java:81)
	at de.tum.in.www1.artemis.architecture.ArchitectureTest.testUseKebabCaseForRestEndpoints(ArchitectureTest.java:149)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:728)
	at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
	at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147)
	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)
	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:218)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:214)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:139)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:69)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
	at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:202)
	at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.executeNonConcurrentTasks(ForkJoinPoolHierarchicalTestExecutorService.java:172)
	at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.invokeAll(ForkJoinPoolHierarchicalTestExecutorService.java:152)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
	at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:202)
	at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.executeNonConcurrentTasks(ForkJoinPoolHierarchicalTestExecutorService.java:172)
	at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.invokeAll(ForkJoinPoolHierarchicalTestExecutorService.java:152)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
	at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:202)
	at java.base/java.util.concurrent.RecursiveAction.exec(RecursiveAction.java:194)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)

Check failure on line 149 in src/test/java/de/tum/in/www1/artemis/architecture/ArchitectureTest.java

View workflow job for this annotation

GitHub Actions / H2 Tests

de.tum.in.www1.artemis.architecture.ArchitectureTest ► testUseKebabCaseForRestEndpoints()

Failed test found in: build/test-results/test/TEST-de.tum.in.www1.artemis.architecture.ArchitectureTest.xml Error: java.lang.AssertionError: Architecture Violation [Priority: MEDIUM] - Rule 'methods should use kebab case for rest mapping annotations' was violated (4 times):
Raw output
java.lang.AssertionError: Architecture Violation [Priority: MEDIUM] - Rule 'methods should use kebab case for rest mapping annotations' was violated (4 times):
de.tum.in.www1.artemis.web.rest.ExerciseGroupResource.createExerciseGroup(java.lang.Long, java.lang.Long, de.tum.in.www1.artemis.domain.exam.ExerciseGroup) violates rule to use kebab case for rest call annotations
de.tum.in.www1.artemis.web.rest.LtiResource.lti13DeepLinking(java.lang.Long, java.util.Set, java.lang.String, java.lang.String) violates rule to use kebab case for rest call annotations
de.tum.in.www1.artemis.web.rest.admin.AdminLtiConfigurationResource.lti13DynamicRegistration(java.lang.String, java.lang.String) violates rule to use kebab case for rest call annotations
de.tum.in.www1.artemis.web.rest.open.PublicLtiResource.lti13LaunchRedirect(jakarta.servlet.http.HttpServletRequest, jakarta.servlet.http.HttpServletResponse) violates rule to use kebab case for rest call annotations
	at com.tngtech.archunit.lang.ArchRule$Assertions.assertNoViolation(ArchRule.java:94)
	at com.tngtech.archunit.lang.ArchRule$Assertions.check(ArchRule.java:86)
	at com.tngtech.archunit.lang.ArchRule$Factory$SimpleArchRule.check(ArchRule.java:165)
	at com.tngtech.archunit.lang.syntax.ObjectsShouldInternal.check(ObjectsShouldInternal.java:81)
	at de.tum.in.www1.artemis.architecture.ArchitectureTest.testUseKebabCaseForRestEndpoints(ArchitectureTest.java:149)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:728)
	at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
	at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147)
	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)
	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:218)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:214)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:139)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:69)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
	at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:202)
	at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.executeNonConcurrentTasks(ForkJoinPoolHierarchicalTestExecutorService.java:172)
	at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.invokeAll(ForkJoinPoolHierarchicalTestExecutorService.java:152)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
	at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:202)
	at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.executeNonConcurrentTasks(ForkJoinPoolHierarchicalTestExecutorService.java:172)
	at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.invokeAll(ForkJoinPoolHierarchicalTestExecutorService.java:152)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
	at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:202)
	at java.base/java.util.concurrent.RecursiveAction.exec(RecursiveAction.java:194)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)
}
}

@Test
void testNullnessAnnotations() {
var notNullPredicate = and(not(resideInPackageAnnotation("jakarta.validation.constraints")), simpleNameAnnotation("NotNull"));
Expand Down
Loading