Priority
Normal
Type
Bug 
State
Verified 
Assignee
Bas Leijdekkers 
Subsystem
Code Analysis. Inspection 
Affected versions
Fixed in
Fixed in build
Next build 
Build
8089
Fixed in build
7642
  • Submitted by   Alexander Chernikov
    2 years ago (09 Jan 2008 18:05)
  • Updated by   root
    3 weeks ago (17 Jan 2010 19:57)
  • Jira: IDEA-42476
    (history, comments)

IDEA-42476

IG: False "Type may be weakened" for Boolean field with autoboxing usages

0
Provide a code like:
public class WeakBoolean {
	private Boolean myBool;

	public WeakBoolean() {
		myBool = true;
	}

	public void inverse() {
		myBool = !myBool;
	}

	public void xor(boolean b) {
		myBool ^= b;
	}
}

Make sure "Type may be weakened" is On. It shows the warning "Type may be weakened to Object" for myBool.
On applying this quick fix the code becomes not compilable.

Issue was closed
Comments (1)
 
History (2)
 
Links
 
Alexander Chernikov
  Alexander Chernikov
14 Jan 2008 18:19
(2 years ago)
#permalink
7645, 8096: fix confirmed.