Source:
<code>public SourceResponse query(QueryRequest request) throws UnsupportedQueryException { if (request == null || request.getQuery() == null) { return new QueryResponseImpl(request, new ArrayList<>(), true, 0L); } long totalHits = 0; Map<String, Serializable> responseProps = new HashMap<>(); List<Result> results = new ArrayList<>(); SolrFilterDelegate solrFilterDelegate = filterDelegateFactory.newInstance(resolver, request.getProperties()); SolrQuery query = getSolrQuery(request, solrFilterDelegate); boolean isFacetedQuery = handleFacetRequest(query, request); query = handleSuggestionQuery(query, request); boolean userSpellcheckIsOn = userSpellcheckIsOn(request); try { QueryResponse solrResponse; Boolean doRealTimeGet = (Boolean) request.getProperties().getOrDefault(DO_REALTIME_GET, false) || filterAdapter.adapt(request.getQuery(), new RealTimeGetDelegate()); <START> if (BooleanUtils.isTrue(doRealTimeGet)) { <END> LOGGER.debug("Performing real time query"); SolrQuery realTimeQuery = getRealTimeQuery(query, solrFilterDelegate.getIds()); solrResponse = client.query(realTimeQuery, METHOD.POST); } else { query.setParam("spellcheck", userSpellcheckIsOn); solrResponse = client.query(query, METHOD.POST); } handleFacetResponse(solrResponse, responseProps, isFacetedQuery); handleSuggestionResponse(solrResponse, responseProps); SolrDocumentList docs = solrResponse.getResults(); docs = handleSpellcheck(solrResponse, responseProps, query, docs, userSpellcheckIsOn); if (docs != null) { addDocsToResults(docs, results); totalHits = docs.getNumFound(); } } catch (SolrServerException | IOException | SolrException e) { throw new UnsupportedQueryException("Could not complete solr query.", e); } return new SourceResponseImpl(request, responseProps, results, totalHits); }</code><technical_language>if this null able do if (doRealTimeGet) { autoboxed. if worked boolean primitive instead worry nullness all</technical_language>

Target:
public SourceResponse query(QueryRequest request) throws UnsupportedQueryException { if (request == null || request.getQuery() == null) { return new QueryResponseImpl(request, new ArrayList<>(), true, 0L); } long totalHits = 0; Map<String, Serializable> responseProps = new HashMap<>(); List<Result> results = new ArrayList<>(); SolrFilterDelegate solrFilterDelegate = filterDelegateFactory.newInstance(resolver, request.getProperties()); SolrQuery query = getSolrQuery(request, solrFilterDelegate); boolean isFacetedQuery = handleFacetRequest(query, request); query = handleSuggestionQuery(query, request); boolean userSpellcheckIsOn = userSpellcheckIsOn(request); try { QueryResponse solrResponse; boolean doRealTimeGet = (boolean) request.getProperties().getOrDefault(DO_REALTIME_GET, false) || BooleanUtils.toBoolean( filterAdapter.adapt(request.getQuery(), new RealTimeGetDelegate())); if (doRealTimeGet) { LOGGER.debug("Performing real time query"); SolrQuery realTimeQuery = getRealTimeQuery(query, solrFilterDelegate.getIds()); solrResponse = client.query(realTimeQuery, METHOD.POST); } else { query.setParam("spellcheck", userSpellcheckIsOn); highlighter.processPreQuery(request, query); solrResponse = client.query(query, METHOD.POST); } if (isFacetedQuery) { handleFacetResponse(solrResponse, responseProps); } handleSuggestionResponse(solrResponse, responseProps); SolrDocumentList docs = solrResponse.getResults(); docs = handleSpellcheck(request, solrResponse, responseProps, query, docs, userSpellcheckIsOn); if (docs != null) { addDocsToResults(docs, results); totalHits = docs.getNumFound(); } } catch (SolrServerException | IOException | SolrException e) { throw new UnsupportedQueryException("Could not complete solr query.", e); } return new SourceResponseImpl(request, responseProps, results, totalHits); }