Find Comparator implementations that are not Serializable

Proprietary

Marks classes and records that implement java.util.Comparator without also being Serializable. An ordered collection keeps a reference to its comparator, so a non-serializable comparator makes an otherwise serializable TreeMap, TreeSet or PriorityQueue fail to serialize. Anonymous classes and lambdas are not marked.

io.moderne.staticanalysis.FindNonSerializableComparators
mod run . --recipe=io.moderne.staticanalysis.FindNonSerializableComparators

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.