-
Notifications
You must be signed in to change notification settings - Fork 593
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
Update createProxy to return a non-optional ObjectPrx #1817
Update createProxy to return a non-optional ObjectPrx #1817
Conversation
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.
Looks good!
cpp/src/Ice/ConnectionI.cpp
Outdated
Ice::ConnectionI::createProxy(const Identity& ident) const | ||
{ | ||
// TODO: merge my other PR code | ||
|
||
// Create a reference and return a reverse proxy for this reference. | ||
ReferencePtr ref = | ||
_instance->referenceFactory()->create(ident, const_cast<ConnectionI*>(this)->shared_from_this()); | ||
|
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.
Should we assert "ref" is not null? does the reference factory ever return null
from create?
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.
That's a good question. And no, ref can never but null, and I added a few asserts in ReferenceFactory to make sure the identity's name it gets is never empty.
This PR updates createProxy/createDirectoryProxy/createIndirectProxy to return a non-nullable proxy in C++.