uschindler commented on code in PR #13950:
URL: https://github.com/apache/lucene/pull/13950#discussion_r1888387748
##########
lucene/core/src/java/org/apache/lucene/search/BooleanQuery.java:
##########
@@ -136,7 +152,7 @@ public List<BooleanClause> clauses() {
}
/** Return the collection of queries for the given {@link Occur}. */
- Collection<Query> getClauses(Occur occur) {
+ public Collection<Query> getClauses(Occur occur) {
return clauseSets.get(occur);
Review Comment:
there is one big problem with that: The clauses are modifiable and therefor
this breaks immutability. So we also have to also fix the collections behind to
be inmodifiable.
I checked this: the enumset behind is fine to be modifiable, as there is no
direct access.
But the inner sets are modifiable.
Please fix this!
--
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]