pascal-lab / Tai-e

An easy-to-learn/use static analysis framework for Java
https://tai-e.pascal-lab.net/docs/index.html
GNU Lesser General Public License v3.0
1.44k stars 175 forks source link

why use TreeSet() to store TaintFlow instance? #20

Closed chennbnbnb closed 1 year ago

chennbnbnb commented 1 year ago

Hi, I notice this code use TreeSet as container of TaintFlow. TreeSet require TaintFlow must implement interface Comparable.

I wonder if it possible to replace TreeSet with HashSet, because element of HashSet doesn't have to be comparable.

zhangt2333 commented 1 year ago

For a sorted result of TaintFlows that helps dump and compare result.

chennbnbnb commented 1 year ago

thx