You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/10/11 14:37:21 UTC
[GitHub] [dolphinscheduler] github-code-scanning[bot] commented on a diff in pull request #12321: Reorganize some classes in common module, remove duplicate classes
github-code-scanning[bot] commented on code in PR #12321:
URL: https://github.com/apache/dolphinscheduler/pull/12321#discussion_r992414336
##########
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/utils/ProcessData.java:
##########
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package org.apache.dolphinscheduler.service.utils;
+
+import org.apache.dolphinscheduler.common.utils.CollectionUtils;
+import org.apache.dolphinscheduler.plugin.task.api.model.Property;
+import org.apache.dolphinscheduler.service.model.TaskNode;
+
+import java.util.List;
+
+/**
+ * definition json data structure
+ */
+public class ProcessData {
Review Comment:
## Inconsistent equals and hashCode
Class ProcessData overrides [equals](1) but not hashCode.
[Show more details](https://github.com/apache/dolphinscheduler/security/code-scanning/1703)
##########
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/storage/StorageOperate.java:
##########
@@ -138,7 +138,8 @@
* @param overwrite
* @throws IOException
*/
- void download(String tenantCode, String srcFilePath, String dstFile, boolean deleteSource, boolean overwrite)throws IOException;
+ void download(String tenantCode, String srcFilePath, String dstFile, boolean deleteSource,
Review Comment:
## Useless parameter
The parameter 'tenantCode' is never used.
[Show more details](https://github.com/apache/dolphinscheduler/security/code-scanning/1698)
##########
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/storage/StorageOperate.java:
##########
@@ -127,7 +126,8 @@
* @return
* @throws IOException
*/
- boolean upload(String tenantCode, String srcFile, String dstPath, boolean deleteSource, boolean overwrite) throws IOException;
+ boolean upload(String tenantCode, String srcFile, String dstPath, boolean deleteSource,
Review Comment:
## Useless parameter
The parameter 'tenantCode' is never used.
[Show more details](https://github.com/apache/dolphinscheduler/security/code-scanning/1699)
##########
dolphinscheduler-task-plugin/dolphinscheduler-task-emr/src/main/java/org/apache/dolphinscheduler/plugin/task/emr/AbstractEmrTask.java:
##########
@@ -52,20 +50,19 @@
AmazonElasticMapReduce emrClient;
String clusterId;
-
/**
* config ObjectMapper features and propertyNamingStrategy
* use UpperCamelCaseStrategy support capital letters parse
*
* @see PropertyNamingStrategy.UpperCamelCaseStrategy
*/
static final ObjectMapper objectMapper = new ObjectMapper()
- .configure(FAIL_ON_UNKNOWN_PROPERTIES, false)
- .configure(ACCEPT_EMPTY_ARRAY_AS_NULL_OBJECT, true)
- .configure(READ_UNKNOWN_ENUM_VALUES_AS_NULL, true)
- .configure(REQUIRE_SETTERS_FOR_GETTERS, true)
- .setTimeZone(TimeZone.getDefault())
- .setPropertyNamingStrategy(new PropertyNamingStrategy.UpperCamelCaseStrategy());
+ .configure(FAIL_ON_UNKNOWN_PROPERTIES, false)
+ .configure(ACCEPT_EMPTY_ARRAY_AS_NULL_OBJECT, true)
+ .configure(READ_UNKNOWN_ENUM_VALUES_AS_NULL, true)
+ .configure(REQUIRE_SETTERS_FOR_GETTERS, true)
Review Comment:
## Deprecated method or constructor invocation
Invoking [ObjectMapper.configure](1) should be avoided because it has been deprecated.
[Show more details](https://github.com/apache/dolphinscheduler/security/code-scanning/1587)
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org