0 Replies Latest reply on Jan 4, 2014 11:47 AM by Philippe Marschall

    SimpleRole#equals(Object)

    Philippe Marschall Expert

      Is there a reason SimpleRole#equals(Object) uses Class#cast(Object) instead of a normal Java cast? We did some profiling of our application and this method showed up.

       

      A related issue seems to be that SimpleRoleGroup#roles is a ArrayList rather than a Set so every add* method has to call java.util.ArrayList#indexOf(Object) which has linear rather than constant complexity.