imagej / imagej/ImageJ

Extra Semi-colon

Open
#220 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
786
Forks
267
PR merge metrics
No merged PRs in 30d

Description

  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;

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

  1. 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());

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the referenced sections in ij/plugin/Memory.java and ij/plugin/frame/Editor.java, checking how each conditional and following statement is intended to behave. Confirm the reported extra semicolons against the surrounding code, then use the project's normal Java validation process to ensure the two affected behaviors remain correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
desktop
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.