-
Notifications
You must be signed in to change notification settings - Fork 886
Prevent NPE in addServiceInfoToCluster() #2239
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -216,7 +216,7 @@ func (ep *endpoint) Iface() InterfaceInfo { | |
| return ep.iface | ||
| } | ||
|
|
||
| return nil | ||
| return &endpointInterface{} | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps this would work to prevent the situation, but I see there's many other places where
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, so I grepped the code specifically for
Just as a side comment:
I'm not really sure why we can have endpoints without interfaces -- I thought these were a 1-to-1 mapping conceptually. But given comments in |
||
| } | ||
|
|
||
| func (ep *endpoint) Interface() driverapi.InterfaceInfo { | ||
|
|
||
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.
Could use some input here; I started with this, but noticed there's quite some places where a "fluent" interface is used (
foo.Iface().SomeFunction()), so having to check in all places is likely problematic.