Skip to content

Fix bug: NullPointerException etc.#1721

Merged
davidzollo merged 5 commits intoapache:devfrom
Jave-Chen:bcai-dev-fix-bug-20200105-1720
Jan 17, 2020
Merged

Fix bug: NullPointerException etc.#1721
davidzollo merged 5 commits intoapache:devfrom
Jave-Chen:bcai-dev-fix-bug-20200105-1720

Conversation

@Jave-Chen
Copy link
Copy Markdown
Contributor

What is the purpose of the pull request

#1720 Fix bug: NullPointerException etc.

Brief change log

  1. NullPointerException
  • Add null check
  1. Use try-with-resources or close this "Scanner" in a "finally" clause.
  • Add try-with-resources on FSDataInputStream
  1. Not enough arguments.
  • Add argument with string.

@codecov-io
Copy link
Copy Markdown

codecov-io commented Jan 5, 2020

Codecov Report

Merging #1721 into dev will decrease coverage by 0.02%.
The diff coverage is 4.16%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #1721      +/-   ##
==========================================
- Coverage   21.02%   20.99%   -0.03%     
==========================================
  Files         292      292              
  Lines       14069    14082      +13     
  Branches     2321     2325       +4     
==========================================
- Hits         2958     2957       -1     
- Misses      10775    10788      +13     
- Partials      336      337       +1
Impacted Files Coverage Δ
...g/apache/dolphinscheduler/dao/utils/DagHelper.java 0% <0%> (ø) ⬆️
.../dolphinscheduler/api/service/ExecutorService.java 0.46% <0%> (-0.01%) ⬇️
...che/dolphinscheduler/alert/runner/AlertSender.java 0% <0%> (ø) ⬆️
...che/dolphinscheduler/common/utils/HadoopUtils.java 24.43% <0%> (-0.29%) ⬇️
...he/dolphinscheduler/common/model/DateInterval.java 14.28% <16.66%> (-5.72%) ⬇️
...cheduler/api/service/ProcessDefinitionService.java 29.17% <0%> (-0.16%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b9ac6d6...d67039c. Read the comment docs.

return startTime.equals(dateInterval.getStartTime()) &&
endTime.equals(dateInterval.getEndTime());
}catch (Exception e){
if (obj != null) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why use try/catch surround equals method?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check whether obj is null

Copy link
Copy Markdown
Contributor

@qiaozhanwei qiaozhanwei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@qiaozhanwei
Copy link
Copy Markdown
Contributor

please resolve conflicts

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Jan 9, 2020

SonarCloud Quality Gate failed.

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

7.7% 7.7% Coverage
0.0% 0.0% Duplication

@Jave-Chen
Copy link
Copy Markdown
Contributor Author

please resolve conflicts

done

Copy link
Copy Markdown
Contributor

@davidzollo davidzollo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@davidzollo davidzollo merged commit c522ea7 into apache:dev Jan 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants