Github user dawidwys commented on a diff in the pull request: https://github.com/apache/flink/pull/5141#discussion_r158908424 --- Diff: flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/SharedBuffer.java --- @@ -82,9 +82,12 @@ private transient Map<K, SharedBufferPage<K, V>> pages; + private final transient List<SharedBufferEntry<K, V>> prunedEntries; --- End diff -- Not sure about the potential advantages. See e.g. this answer on SO: https://stackoverflow.com/a/18371813/4250114 . Plus the local variable is easier to reason about. Personally I am for the local variable, but if you feel this version is better, will merge it as it is.
---