diff --git a/config/checkstyle/checkstyle-suppressions.xml b/config/checkstyle/checkstyle-suppressions.xml new file mode 100644 index 0000000..c598199 --- /dev/null +++ b/config/checkstyle/checkstyle-suppressions.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml new file mode 100644 index 0000000..6efaaf0 --- /dev/null +++ b/config/checkstyle/checkstyle.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/spotbugs/spotbugs-exclude.xml b/config/spotbugs/spotbugs-exclude.xml new file mode 100644 index 0000000..e49f56a --- /dev/null +++ b/config/spotbugs/spotbugs-exclude.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pom.xml b/pom.xml index 3234d06..f2e8188 100644 --- a/pom.xml +++ b/pom.xml @@ -174,8 +174,12 @@ 2.46.1 + + + **/package-info.java + - 1.22.0 + 1.24.0 @@ -191,6 +195,81 @@ + + + + org.apache.maven.plugins + maven-checkstyle-plugin + 3.6.0 + + + com.puppycrawl.tools + checkstyle + 10.20.0 + + + + ${maven.multiModuleProjectDirectory}/config/checkstyle/checkstyle.xml + config_loc=${maven.multiModuleProjectDirectory}/config/checkstyle + false + true + true + + + + checkstyle-check + validate + + check + + + + + + + + com.github.spotbugs + spotbugs-maven-plugin + 4.8.6.4 + + Max + Medium + ${maven.multiModuleProjectDirectory}/config/spotbugs/spotbugs-exclude.xml + true + + + + spotbugs-check + verify + + check + + + + + + + + org.jacoco + jacoco-maven-plugin + 0.8.12 + + + jacoco-prepare-agent + + prepare-agent + + + + jacoco-report + test + + report + + + + + org.codehaus.mojo flatten-maven-plugin diff --git a/spring-boot-starter/pom.xml b/spring-boot-starter/pom.xml index 4340889..f67bdb8 100644 --- a/spring-boot-starter/pom.xml +++ b/spring-boot-starter/pom.xml @@ -75,6 +75,12 @@ ${spring-boot.version} test + + org.jspecify + jspecify + 1.0.0 + provided + diff --git a/spring-boot-starter/src/main/java/dev/openan/workflow/engine/spring/package-info.java b/spring-boot-starter/src/main/java/dev/openan/workflow/engine/spring/package-info.java new file mode 100644 index 0000000..e608b77 --- /dev/null +++ b/spring-boot-starter/src/main/java/dev/openan/workflow/engine/spring/package-info.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2026 Huawei Technologies Co., Ltd. + * All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ + +/** + * Spring Boot auto-configuration for the A2A server side. + */ +@org.jspecify.annotations.NullMarked +package dev.openan.workflow.engine.spring; diff --git a/workflow-engine/pom.xml b/workflow-engine/pom.xml index d70d6ab..fa58fbe 100644 --- a/workflow-engine/pom.xml +++ b/workflow-engine/pom.xml @@ -140,6 +140,13 @@ ${slf4j.version} test + + + org.jspecify + jspecify + 1.0.0 + provided + diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/DefaultWorkflowEngineClient.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/DefaultWorkflowEngineClient.java index 0eb90de..525f125 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/DefaultWorkflowEngineClient.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/DefaultWorkflowEngineClient.java @@ -23,9 +23,22 @@ import dev.openan.workflow.engine.control.EventCallback; import dev.openan.workflow.engine.control.EventType; import dev.openan.workflow.engine.control.NegotiationStrategy; -import dev.openan.workflow.engine.model.*; +import dev.openan.workflow.engine.model.BusinessFailure; +import dev.openan.workflow.engine.model.MessageContent; +import dev.openan.workflow.engine.model.NegotiationReply; +import dev.openan.workflow.engine.model.NegotiationRequest; +import dev.openan.workflow.engine.model.ReceivedMessage; +import dev.openan.workflow.engine.model.SendMessageResult; +import dev.openan.workflow.engine.model.TaskRequest; import java.time.Duration; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletionException; import java.util.concurrent.ExecutionException; diff --git a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/package-info.java b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/package-info.java index 20bb65d..60380af 100644 --- a/workflow-engine/src/main/java/dev/openan/workflow/engine/client/package-info.java +++ b/workflow-engine/src/main/java/dev/openan/workflow/engine/client/package-info.java @@ -11,7 +11,7 @@ * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * distributed under the License is distributed on an AS IS BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. @@ -21,4 +21,5 @@ * Protocol adaptation: transport runtimes, authentication, negotiation correlation, independent * subscriptions, and wire observability. Content generation stays with the host. */ +@org.jspecify.annotations.NullMarked package dev.openan.workflow.engine.client;