Call to equals() always returns false
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 786
- Forks
- 267
- PR merge metrics
- No merged PRs in 30d
Description
The following should probably be reviewed:
https://github.com/imagej/ImageJ/blob/master/ij/gui/ImageWindow.java
Line 458
if (initialLoc!=null && ! bounds.equals(initialLoc) && !IJ.isMacro()
Referring to the code: bounds.equals(initialLoc)
variable bounds is of type java.awt.Rectangle
variable initialLoc is of type java.awt.Point
so the equals() method will always return false.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open ij/gui/ImageWindow.java at line 458 and inspect how bounds and initialLoc are produced before the equals call. Determine the intended location comparison for these Rectangle and Point values, then verify the resulting behavior in the relevant ImageJ GUI path. Done means the check can distinguish the intended position state and is covered by an appropriate verification.
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
- Mostly clear
- Newbie friendliness
- 45/100