[ 
https://issues.apache.org/jira/browse/SOLR-12877?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16652592#comment-16652592
 ] 

ASF subversion and git services commented on SOLR-12877:
--------------------------------------------------------

Commit 15002eba2f7b90d7323dc6a9277c61e75aea5004 in lucene-solr's branch 
refs/heads/jira/http2 from [~cpoerschke]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=15002eb ]

SOLR-12877: avoid NPE in TestTlogReplica.testRealTimeGet


> reduce test failures due to NullPointerException
> ------------------------------------------------
>
>                 Key: SOLR-12877
>                 URL: https://issues.apache.org/jira/browse/SOLR-12877
>             Project: Solr
>          Issue Type: Test
>            Reporter: Christine Poerschke
>            Priority: Minor
>
> Creating this as an umbrella ticket for fixing various NullPointerExceptions 
> e.g. encounted in this type of code pattern in tests:
> before:
> {code:java}
> Bar bar = foo.getBar(id);
> assertEquals(42, bar.size()); // if bar is null we hit a NPE here
> {code}
> after:
> {code:java}
> Bar bar = foo.getBar(id);
> assertNotNull(bar); // if bar is null the test now fails here
> assertEquals(42, bar.size());
> {code}
> The test failure itself would still remain a test failure but a slightly 
> clearer one perhaps.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to