dsmiley commented on code in PR #2290:
URL: https://github.com/apache/solr/pull/2290#discussion_r1498380269
##########
solr/core/src/java/org/apache/solr/handler/component/SpellCheckComponent.java:
##########
@@ -116,6 +121,7 @@ public void prepare(ResponseBuilder rb) throws IOException {
if (!params.getBool(COMPONENT_NAME, false)) {
return;
}
+ QueryLimits queryLimits = SolrRequestInfo.getRequestInfo() != null ?
SolrRequestInfo.getRequestInfo().getLimits() : QueryLimits.NONE;
Review Comment:
Seeing this null check over and over again seems always (?) unnecessary and
more verbose than it could be with a little utility method like say
QueryLimits.getCurrentOrNone().
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]