sonatype-lift[bot] commented on code in PR #1144:
URL: https://github.com/apache/solr/pull/1144#discussion_r1008157315
##########
solr/core/src/java/org/apache/solr/handler/admin/ZookeeperInfoHandler.java:
##########
@@ -425,29 +430,39 @@ public void handleRequestBody(SolrQueryRequest req,
SolrQueryResponse rsp) throw
} finally {
printer.close();
}
- rsp.getValues().add(RawResponseWriter.CONTENT, printer);
+ V2ApiUtils.squashIntoSolrResponseWithoutHeader(rsp,
zookeeperAPI.listZookeeperFiles());
Review Comment:
đŦ 2 similar findings have been found in this PR
---
*THREAD_SAFETY_VIOLATION:* Unprotected write. Non-private method
`ZookeeperInfoHandler.handleRequestBody(...)` indirectly mutates container
`util.Utils.storedReflectData` via call to `Map.put(...)` outside of
synchronization.
Reporting because this access may occur on a background thread.
---
<details><summary><b>đ Expand here to view all instances of this
finding</b></summary><br/>
<div align="center">
| **File Path** | **Line Number** |
| ------------- | ------------- |
| solr/core/src/java/org/apache/solr/handler/admin/api/ZookeeperAPI.java |
[134](https://github.com/joshgog/solr/blob/0af4e981b3be910f01409484e1d415a6b6fa029b/solr/core/src/java/org/apache/solr/handler/admin/api/ZookeeperAPI.java#L134)|
| solr/core/src/java/org/apache/solr/handler/admin/api/ZookeeperAPI.java |
[140](https://github.com/joshgog/solr/blob/0af4e981b3be910f01409484e1d415a6b6fa029b/solr/core/src/java/org/apache/solr/handler/admin/api/ZookeeperAPI.java#L140)|
<p><a
href="https://lift.sonatype.com/results/github.com/apache/solr/01GGFEX76KEV7RKRM2MBK80GAZ?t=Infer|THREAD_SAFETY_VIOLATION"
target="_blank">Visit the Lift Web Console</a> to find more details in your
report.</p></div></details>
---
<details><summary><b>âšī¸ Learn about @sonatype-lift commands</b></summary>
You can reply with the following commands. For example, reply with
***@sonatype-lift ignoreall*** to leave out all findings.
| **Command** | **Usage** |
| ------------- | ------------- |
| `@sonatype-lift ignore` | Leave out the above finding from this PR |
| `@sonatype-lift ignoreall` | Leave out all the existing findings from this
PR |
| `@sonatype-lift exclude <file\|issue\|path\|tool>` | Exclude specified
`file\|issue\|path\|tool` from Lift findings by updating your config.toml file |
**Note:** When talking to LiftBot, you need to **refresh** the page to see
its response.
<sub>[Click here](https://github.com/apps/sonatype-lift/installations/new)
to add LiftBot to another repo.</sub></details>
---
Was this a good recommendation?
[ [đ Not
relevant](https://www.sonatype.com/lift-comment-rating?comment=349049586&lift_comment_rating=1)
] - [ [đ Won't
fix](https://www.sonatype.com/lift-comment-rating?comment=349049586&lift_comment_rating=2)
] - [ [đ Not critical, will
fix](https://www.sonatype.com/lift-comment-rating?comment=349049586&lift_comment_rating=3)
] - [ [đ Critical, will
fix](https://www.sonatype.com/lift-comment-rating?comment=349049586&lift_comment_rating=4)
] - [ [đ Critical, fixing
now](https://www.sonatype.com/lift-comment-rating?comment=349049586&lift_comment_rating=5)
]
--
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]