-
Notifications
You must be signed in to change notification settings - Fork 407
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
Fix: fix dynamicRESTMapper nil pointer bug #1088
Conversation
Welcome @LaurenceLiZhixin! It looks like this is your first PR to openyurtio/openyurt 🎉 |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: LaurenceLiZhixin, rambohe-ch The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@LaurenceLiZhixin Thank you for posting pull request, please fix the failed unit tests. |
} | ||
|
||
if len(b) != 0 { | ||
} else { |
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.
How about just modify the line 80 as
dm := make(map[schema.GroupVersionResource]schema.GroupVersionKind)
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.
Ahaaa, u r right....
7bf706d
to
920dc92
Compare
I fixed it as you said. @Congrool |
Codecov Report
@@ Coverage Diff @@
## master #1088 +/- ##
==========================================
+ Coverage 53.03% 53.07% +0.03%
==========================================
Files 93 94 +1
Lines 12440 12653 +213
==========================================
+ Hits 6598 6716 +118
- Misses 5274 5367 +93
- Partials 568 570 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@LaurenceLiZhixin Thanks! |
Fix bug of RESTMapperManager.dynamicRESTMapper nil pointer.
When
_internal/restmapper/cache-crd-restmapper.conf
exist but is empty, the current implement would cause npe.