Well spotted! We need to tall about the 'fromFile' type.. Sent from my Cyanogen phone
On Feb 22, 2017 4:53 PM, "Mungo Carstairs (Staff)" <[email protected]> wrote: A small thing, but worth watching out for as a possible source of insidious bugs that are hard to spot. Example: public NJTree(SequenceI[] sequence, AlignmentView seqData, String type, String pwtype, ScoreModelI sm, int start, int end) { ... this.type = type; ... if (!(type.equals("NJ"))) { type = "AV"; } The code at the end has no effect - it updates the parameter variable (too late), not the field of the same name. It seems not to matter here, as the third possible type value of "FromFile" doesn't reach this method (I think!). Enabling compiler warnings for 'parameter hides field', and clearing the warnings by changing the parameter name, can avoid this. I had this warning turned on but not for constructors - will change that in the shared Eclipse config file next time I am on develop. mungo [University of Dundee shield logo]<http://uod.ac.uk/sig-home> Mungo Carstairs Jalview Computational Scientist The Barton Group Division of Computational Biology School of Life Sciences University of Dundee, Dundee, Scotland, UK www.jalview.org<http://www.jalview.org> www.compbio.dundee.ac.uk<http://www.compbio.dundee.ac.uk> [email protected]<mailto:[email protected]> [University of Dundee Facebook]<http://uod.ac.uk/sig-fb> [University of Dundee Twitter] <http://uod.ac.uk/sig-tw> [University of Dundee LinkedIn] <http://uod.ac.uk/sig-li> [University of Dundee YouTube] <http://uod.ac.uk/sig-yt> [University of Dundee Instagram] <http://uod.ac.uk/sig-ig> [University of Dundee Snapchat] <http://uod.ac.uk/sig-sc> We're Scottish University of the Year again!<http://uod.ac.uk/sig-strapline> The Times / Sunday Times Good University Guide 2016 and 2017 The University of Dundee is a registered Scottish Charity, No: SC015096 The University of Dundee is a registered Scottish Charity, No: SC015096
_______________________________________________ Jalview-dev mailing list [email protected] http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-dev
