rmuir opened a new issue, #11973:
URL: https://github.com/apache/lucene/issues/11973
### Description
Found by error-prone, looks rather serious to me since it impacts how the
shape is serialized to disk. How come no tests fail?
```
/home/rmuir/workspace/lucene/lucene/core/src/java/org/apache/lucene/document/ShapeDocValues.java:553:
warning: [LogicalAssignment] Assignment where a boolean expression was
expected; use == if this assignment wasn't expected or add parentheses for
clarity.
if (node.triangle.ca = true) {
```
With more context:
```
// write edge member of original shape
if (node.triangle.ab == true) {
header |= 0x10;
}
if (node.triangle.bc == true) {
header |= 0x20;
}
if (node.triangle.ca = true) { // <-- bug
header |= 0x40;
}
output.writeVInt(header);
```
After fixing this issue, we may enable error-prone `LogicalAssignment`
check, since it is the only such issue across the entire codebase:
https://errorprone.info/bugpattern/LogicalAssignment
### Version and environment details
_No response_
--
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]