rmuir commented on code in PR #15961:
URL: https://github.com/apache/lucene/pull/15961#discussion_r3092593926


##########
lucene/core/src/java/org/apache/lucene/util/automaton/CompiledAutomaton.java:
##########
@@ -509,8 +509,7 @@ public TransitionAccessor getTransitionAccessor() {
   public int hashCode() {
     final int prime = 31;
     int result = 1;
-    result = prime * result + ((runAutomaton == null) ? 0 : 
runAutomaton.hashCode());
-    result = prime * result + ((nfaRunAutomaton == null) ? 0 : 
nfaRunAutomaton.hashCode());
+    result = prime * result + normalAutomatonHashCode();

Review Comment:
   Its good. I like how the new hashcode/equals are defined... as "same 
automaton". 
   
   There were historical problems here around hashcode/equals being defined as 
"accepting same language"... which led to trouble.



-- 
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]

Reply via email to