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

Projects
None yet
3 participants
@s1monw
Copy link
Contributor

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.

@s1monw s1monw added bug labels Jul 17, 2014

@jpountz

View changes

src/main/java/org/elasticsearch/http/HttpInfo.java Outdated
@@ -79,6 +79,7 @@ public void readFrom(StreamInput in) throws IOException {

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

This comment has been minimized.

Copy link
@jpountz

jpountz Jul 17, 2014

Contributor

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

View changes

src/main/java/org/elasticsearch/transport/TransportInfo.java Outdated
@@ -72,6 +72,7 @@ public void readFrom(StreamInput in) throws IOException {

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

This comment has been minimized.

Copy link
@jpountz

jpountz Jul 17, 2014

Contributor

remove assert?

@jpountz

This comment has been minimized.

Copy link
Contributor

commented Jul 17, 2014

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

@s1monw

This comment has been minimized.

Copy link
Contributor Author

commented Jul 17, 2014

@jpountz thx pushed a new commit

@jpountz

This comment has been minimized.

Copy link
Contributor

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 s1monw:null_info branch Sep 22, 2014

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
You can’t perform that action at this time.