imagej / ImageJ

Public domain software for processing and analyzing scientific images
http://imagej.org
Other
556 stars 221 forks source link

Extra Semi-colon #220

Open scuniff opened 1 year ago

scuniff commented 1 year ago

1) ImageJ/Memory.java at master · imagej/ImageJ · GitHub

Semi-colon at end of 2’nd if statement creates an empty statement block so the return statement is always executed.

    if (max2>=limit && !IJ.is64Bit()) {
        if (!IJ.showMessageWithCancel(title, 
        "Note: setting the memory limit to a value\n"
        +"greater than "+limit+"MB on a 32-bit system\n"
        +"may cause ImageJ to fail to start. The title of\n"
        +"the Edit>Options>Memory & Threads dialog\n"
        +"box changes to \"Memory (64-bit)\" when ImageJ\n"
        +"is running on a 64-bit version of Java."));
            return;
    }

I think semi-colon should be removed:

        +"is running on a 64-bit version of Java."))
            return;

==================================

2) ImageJ/Editor.java at master · imagej/ImageJ · GitHub

Here also I think semi-colon should be removed:

    if (Menus.getFontSize()!=0) ;
        mb.setFont(Menus.getFont());

should be :

    if (Menus.getFontSize()!=0) 
        mb.setFont(Menus.getFont());