You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/11/24 14:44:03 UTC

[GitHub] [lucene] rmuir opened a new issue, #11973: ShapeDocValues wrong serialization

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: issues-unsubscribe@lucene.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene] rmuir closed issue #11973: ShapeDocValues wrong serialization

Posted by GitBox <gi...@apache.org>.
rmuir closed issue #11973: ShapeDocValues wrong serialization
URL: https://github.com/apache/lucene/issues/11973


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org