You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Found during reviewing code while porting to the Lucene.NET project.)
The static TaskSequence.REPEAT_EXHAUST field has been perhaps accidentally left as a mutable static field. It appears that this field is only ever used a sentinel value that is not intended to be mutated, and should be marked final. As far as I can tell, there is no justification to have this field be mutable. Although this is just benchmark code, and thus I'm sure very low priority, it could potentially result in bugs if it is mutated during execution.
Version and environment details
Affects Lucene 4.0.0 through current (10.1.0)
The text was updated successfully, but these errors were encountered:
Following up on
apache#14151 and
apache#14152, I decided to grep for
other non-final public static variables in the Lucene codebase.
This change makes statics final where it is both possible and seems
appropriate. (That is, the variables really do seem to be constants.)
Description
(Found during reviewing code while porting to the Lucene.NET project.)
The static
TaskSequence.REPEAT_EXHAUST
field has been perhaps accidentally left as a mutable static field. It appears that this field is only ever used a sentinel value that is not intended to be mutated, and should be markedfinal
. As far as I can tell, there is no justification to have this field be mutable. Although this is just benchmark code, and thus I'm sure very low priority, it could potentially result in bugs if it is mutated during execution.Version and environment details
Affects Lucene 4.0.0 through current (10.1.0)
The text was updated successfully, but these errors were encountered: