Skip to content
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

When serializing HttpInfo, return null info if service is not started #6906

Merged
merged 1 commit into from Jul 17, 2014

Conversation

s1monw
Copy link
Contributor

@s1monw s1monw commented Jul 17, 2014

Http/TransportInfo throw NPE if the bound address is null and the info
object is serialized. There is a small window where at least the
HttpInfo can be requested before the service is fully started.

@@ -79,6 +79,7 @@ public void readFrom(StreamInput in) throws IOException {

@Override
public void writeTo(StreamOutput out) throws IOException {
assert address != null;
Copy link
Contributor

Choose a reason for hiding this comment

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

how useful is this assert? if there is a NPE on the next line it means it was null and if there is no NPE on the next line it means it was not null?

@jpountz
Copy link
Contributor

jpountz commented Jul 17, 2014

Left two very minor comments but other than that it looks good to me

@s1monw
Copy link
Contributor Author

s1monw commented Jul 17, 2014

@jpountz thx pushed a new commit

@jpountz
Copy link
Contributor

jpountz commented Jul 17, 2014

LGTM

@s1monw s1monw removed the review label Jul 17, 2014
s1monw added a commit that referenced this pull request Jul 17, 2014
@s1monw s1monw merged commit 6fc5acd into elastic:master Jul 17, 2014
@spinscale spinscale changed the title Return null info if service is not started Serialization: Return null info if service is not started Jul 23, 2014
@clintongormley clintongormley changed the title Serialization: Return null info if service is not started Internal: When serializing HttpInfo, return null info if service is not started Sep 8, 2014
@s1monw s1monw added the v1.3.3 label Sep 22, 2014
@s1monw s1monw deleted the null_info branch September 22, 2014 12:50
s1monw added a commit that referenced this pull request Sep 22, 2014
@clintongormley clintongormley changed the title Internal: When serializing HttpInfo, return null info if service is not started When serializing HttpInfo, return null info if service is not started Jun 7, 2015
mute pushed a commit to mute/elasticsearch that referenced this pull request Jul 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants