dcapwell commented on code in PR #2056:
URL: https://github.com/apache/cassandra/pull/2056#discussion_r1066310240


##########
test/simulator/main/org/apache/cassandra/simulator/paxos/HistoryChecker.java:
##########
@@ -127,16 +127,22 @@ Event setById(int id, Event event)
         return byId[id] = event;
     }
 
+    private static int eventId(int[] witnessSequence, int eventPosition)
+    {
+        return eventPosition == 0 ? -1 : witnessSequence[eventPosition - 1];
+    }
+
     void witness(Observation witness, int[] witnessSequence, int start, int 
end)
     {
         int eventPosition = witnessSequence.length;
-        int eventId = eventPosition == 0 ? -1 : witnessSequence[eventPosition 
- 1];
+        int eventId = eventId(witnessSequence, eventPosition);
         setById(witness.id, new Event(witness.id)).log.add(new 
VerboseWitness(witness.id, start, end, witnessSequence));
         Event event = get(eventPosition, eventId);
         recordWitness(event, witness, witnessSequence);
         recordVisibleBy(event, end);
         recordVisibleUntil(event, start);
 
+

Review Comment:
   the extra space?  I believe I made a change that I later removed, removing 
this extra space



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