History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-24172
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Normal Normal
Assignee: Bas Leijdekkers
Reporter: Alexander Chernikov
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

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

Created: 09 Jan 08 18:05   Updated: 14 Jan 08 18:19
Component/s: Code Analysis. Inspection
Fix Version/s: Selena 7.0.3, Diana 8243

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 8,089
Fixed in build: 7,642


 Description  « Hide
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.



 All   Comments   Work Log   Change History      Sort Order:
Alexander Chernikov - 14 Jan 08 18:19
7645, 8096: fix confirmed.