Jave-Chen commented on a change in pull request #1721: Fix bug:
NullPointerException etc.
URL:
https://github.com/apache/incubator-dolphinscheduler/pull/1721#discussion_r364040852
##########
File path:
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/model/DateInterval.java
##########
@@ -35,13 +35,18 @@ public DateInterval(Date beginTime, Date endTime){
@Override
public boolean equals(Object obj) {
- try{
- DateInterval dateInterval = (DateInterval) obj;
- return startTime.equals(dateInterval.getStartTime()) &&
- endTime.equals(dateInterval.getEndTime());
- }catch (Exception e){
+ if (obj != null) {
Review comment:
check whether obj is 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:
[email protected]
With regards,
Apache Git Services