-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add parameter validate for PPL tool #259
add parameter validate for PPL tool #259
Conversation
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #259 +/- ##
============================================
+ Coverage 81.57% 81.62% +0.05%
- Complexity 211 216 +5
============================================
Files 13 13
Lines 1069 1083 +14
Branches 146 149 +3
============================================
+ Hits 872 884 +12
Misses 140 140
- Partials 57 59 +2 ☔ View full report in Codecov by Sentry. |
Signed-off-by: xinyual <[email protected]>
throw new IllegalArgumentException("PPL tool needs non blank model id."); | ||
} | ||
if (map.containsKey("execute")) { | ||
String execute = map.get("execute").toString().toLowerCase(Locale.ROOT); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible the map.get("execute")
is null? if yes, it could produce NPE here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I change the logic to prevent it. Please check it. From my perspective, these parameters are from register body and couldn't be null. But anyway, it's better to have it.
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
Signed-off-by: xinyual <[email protected]>
* add parameter validate for PPL tool Signed-off-by: xinyual <[email protected]> * apply spotless Signed-off-by: xinyual <[email protected]> * simplify code Signed-off-by: xinyual <[email protected]> * prevent NPE Signed-off-by: xinyual <[email protected]> * change logic Signed-off-by: xinyual <[email protected]> * apply spot Signed-off-by: xinyual <[email protected]> * fix UT Signed-off-by: xinyual <[email protected]> * apply spotless Signed-off-by: xinyual <[email protected]> --------- Signed-off-by: xinyual <[email protected]> (cherry picked from commit 571dab7) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* add parameter validate for PPL tool * apply spotless * simplify code * prevent NPE * change logic * apply spot * fix UT * apply spotless --------- (cherry picked from commit 571dab7) Signed-off-by: xinyual <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…rch-project#262) * add parameter validate for PPL tool * apply spotless * simplify code * prevent NPE * change logic * apply spot * fix UT * apply spotless --------- (cherry picked from commit 571dab7) Signed-off-by: xinyual <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Signed-off-by: yuye-aws <[email protected]>
Description
add parameter validate for PPL tool:
Issues Resolved
[List any issues this PR will resolve]
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.