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 2021/02/19 10:02:46 UTC
[GitHub] [incubator-dolphinscheduler] zhanguohao commented on a change in pull request #4802: [BUG][API]Fix format2Duration when parameter has one is null
zhanguohao commented on a change in pull request #4802:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/4802#discussion_r579066594
##########
File path: dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/DateUtils.java
##########
@@ -259,6 +259,9 @@ public static String format2Readable(long ms) {
* @return format time
*/
public static String format2Duration(Date d1, Date d2) {
+ if (d1 == null || d2 == null) {
+ return "";
Review comment:
Better to `return null`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org