Pil0tXia commented on code in PR #4447:
URL: https://github.com/apache/eventmesh/pull/4447#discussion_r1333233310
##########
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/RemoteSubscribeEventProcessor.java:
##########
@@ -144,32 +141,32 @@ public void handler(HandlerService.HandlerSpecific
handlerSpecific, HttpRequest
}
// validate URL
- // try {
- // if (!IPUtils.isValidDomainOrIp(url,
eventMeshHttpConfiguration.getEventMeshIpv4BlackList(),
- //
eventMeshHttpConfiguration.getEventMeshIpv6BlackList())) {
- // httpLogger.error("subscriber url {} is not valid",
url);
- //
handlerSpecific.sendErrorResponse(EventMeshRetCode.EVENTMESH_PROTOCOL_BODY_ERR,
responseHeaderMap,
- // responseBodyMap, null);
- // return;
- // }
- // } catch (Exception e) {
- // httpLogger.error("subscriber url {} is not valid, error
{}", url, e.getMessage());
- //
handlerSpecific.sendErrorResponse(EventMeshRetCode.EVENTMESH_PROTOCOL_BODY_ERR,
responseHeaderMap,
- // responseBodyMap, null);
- // return;
- // }
+ // try {
+ // if (!IPUtils.isValidDomainOrIp(url,
eventMeshHttpConfiguration.getEventMeshIpv4BlackList(),
+ // eventMeshHttpConfiguration.getEventMeshIpv6BlackList())) {
+ // httpLogger.error("subscriber url {} is not valid", url);
Review Comment:
Code snippets commented using the Ctrl+/ shortcut will lose their original
formatting. Code snippets wrapped within multi-line comments are not affected.
##########
eventmesh-trace-plugin/build.gradle:
##########
@@ -13,4 +13,5 @@
* 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.
- */
\ No newline at end of file
+ */
+spotlessJava.enabled false
Review Comment:
Some modules are excluded from Spotless in this way.
##########
eventmesh-sdks/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl/eventmeshmessage/EventMeshMessageTCPPubClient.java:
##########
@@ -151,10 +151,8 @@ public EventMeshTCPPubHandler(ConcurrentHashMap<Object,
RequestContext> contexts
public void callback(EventMeshMessage eventMeshMessage,
ChannelHandlerContext ctx) {
if (callback != null) {
callback.handle(eventMeshMessage).ifPresent(
- responseMessage ->
- ctx.writeAndFlush(
- MessageUtils.buildPackage(responseMessage,
Command.RESPONSE_TO_SERVER))
- );
+ responseMessage -> ctx.writeAndFlush(
+ MessageUtils.buildPackage(responseMessage,
Command.RESPONSE_TO_SERVER)));
}
Review Comment:
`ctx.writeAndFlush` has been inlined. @mxsm

##########
build.gradle:
##########
@@ -102,6 +105,27 @@ allprojects {
}
testImplementation "junit:junit:4.13.2"
}
+
+ spotless {
+ enforceCheck false
+ java {
+ target project.fileTree(project.projectDir) {
+ include '**/*.java'
+ exclude '**/org/apache/eventmesh/**/protos**'
+ exclude
'**/org/apache/eventmesh/connector/openfunction/client/EventMeshGrpcService**'
+ exclude
'**/org/apache/eventmesh/connector/openfunction/client/CallbackServiceGrpc**'
+ exclude '**/org/apache/eventmesh/connector/jdbc/antlr**'
+ exclude '**/org/apache/eventmesh/common/protocol/grpc**'
+ exclude
'**/org/apache/eventmesh/connector/jdbc/source/dialect/snapshot/AbstractSnapshotEngine.java'
+ }
+ importOrder
('\\#org.apache.eventmesh','\\#org.apache','\\#java','\\#javax','\\#org','\\#io','\\#net','\\#junit','\\#com','\\#lombok',
+
'org.apache.eventmesh','org.apache','java','javax','org','io','net','junit','com','lombok')
+ licenseHeaderFile rootProject.file('style/checkstyle-header1.txt')
+
eclipse().configFile("${rootDir}/style/format/eventmesh-spotless-formatter.xml")
+ removeUnusedImports()
+ }
+ }
+ spotlessJava.dependsOn(compileJava, javadoc, compileTestJava, test,
processResources, processTestResources)
Review Comment:
Some files have been excluded in the Gradle script, and there is a
possibility that newly added files may also need to be excluded.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]