Source question(s)

2009-06-02
2013-08-22
  • Andreas  Wuest
    Andreas Wuest
    2009-06-02

    Hello,

    just had a look at the source and i was wondering why the function to reverse
    a list was reinverted:

    P6SpyOptions.java

    451                  private List getReverseOrderedList(List arraylist) {
    432                    List newlist = new ArrayList(arraylist.size());
    433                    for (int i = arraylist.size()-1;i >= 0; i--) {
    434                        newlist.add(arraylist.get(i));
    435                    }
    436                    return newlist;
    437                }

    As far as i can tell java.util.Collections.reverse() performs that task with fewer lines of code !
    Any chance to get a new release anytime soon (since the latest stable version is 6 years old!) ?

     
  • Pat
    Pat
    2010-12-29

    Further development at : https://github.com/patmoore/p6spy