Skip to content

Commit

Permalink
style: use object to avoid calling get twice
Browse files Browse the repository at this point in the history
Co-authored-by: Christine Poerschke <[email protected]>
  • Loading branch information
ellaeln and cpoerschke authored Sep 16, 2024
1 parent fe91fca commit 8f41e2e
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,10 @@ protected void writeResponse(
throws IOException {

// make coordinator mode explicit
if (solrRsp.getValues().get(CommonParams.DEBUG) != null) {
final Object debugObj = solrRsp.getValues().get(CommonParams.DEBUG);
if (debugObj != null) {
final NamedList<Object> debug =
(NamedList<Object>) solrRsp.getValues().get(CommonParams.DEBUG);
(NamedList<Object>) debugObj;
if (debug.get(CommonParams.TRACK) != null) {
final NamedList<Object> track = (NamedList<Object>) debug.get(CommonParams.TRACK);
track.add("requestCoordinatorNode", cores.getHostName());
Expand Down

0 comments on commit 8f41e2e

Please sign in to comment.