Navigation Menu

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

Add some @Nullable annotations and fix related compilation warnings. #7251

Closed
wants to merge 1 commit into from

Conversation

jpountz
Copy link
Contributor

@jpountz jpountz commented Aug 13, 2014

Added @Nullable to:

  • IndicesService.indexService
  • IndexService.shard
  • IndexService.shardInjector

This change doesn't try to do anything smart but just makes sure that a
*MissingException is thrown instead of a NullPointerException when the requested
object doesn't exist.

…warnings.

Added @nullable to:
 - IndicesService.indexService
 - IndexService.shard
 - IndexService.shardInjector

This change doesn't try to do anything smart but just makes sure that a
*MissingException is thrown instead of a NullPointerException when the requested
object doesn't exist.
if (indexShard != null) {
return new StoreFilesMetaData(true, shardId, indexShard.store().getMetadata().asMap());
}
return new StoreFilesMetaData(true, shardId, indexShard.store().getMetadata().asMap());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

indexShard != null is already checked above

@jpountz jpountz added the review label Aug 13, 2014
@martijnvg
Copy link
Member

LGTM

@martijnvg martijnvg removed the review label Aug 14, 2014
jpountz added a commit that referenced this pull request Aug 14, 2014
…warnings.

Added @nullable to:
 - IndicesService.indexService
 - IndexService.shard
 - IndexService.shardInjector

This change doesn't try to do anything smart but just makes sure that a
*MissingException is thrown instead of a NullPointerException when the requested
object doesn't exist.

Close #7251
@jpountz
Copy link
Contributor Author

jpountz commented Aug 14, 2014

Thanks @martijnvg

@jpountz jpountz closed this Aug 14, 2014
jpountz added a commit that referenced this pull request Aug 14, 2014
…warnings.

Added @nullable to:
 - IndicesService.indexService
 - IndexService.shard
 - IndexService.shardInjector

This change doesn't try to do anything smart but just makes sure that a
*MissingException is thrown instead of a NullPointerException when the requested
object doesn't exist.

Close #7251
@jpountz jpountz deleted the fix/indexservice_nullable branch August 14, 2014 12:56
jpountz added a commit that referenced this pull request Sep 8, 2014
…warnings.

Added @nullable to:
 - IndicesService.indexService
 - IndexService.shard
 - IndexService.shardInjector

This change doesn't try to do anything smart but just makes sure that a
*MissingException is thrown instead of a NullPointerException when the requested
object doesn't exist.

Close #7251
@clintongormley clintongormley changed the title Internal: Add some @Nullable annotations and fix related compilation warnings. Add some @Nullable annotations and fix related compilation warnings. Jun 7, 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