Project
IntelliJ IDEA
Priority
Normal
Type
Bug
Fix versions
No Fix versions
State
Fixed
Assignee
Bas Leijdekkers
Subsystem
Code Analysis. Inspection
Affected versions
No Affected versions
Fixed in build
108.65  
  • Created by   Jonas Kvarnstrom
    6 years ago (11 Aug 2005 17:08)
  • Updated by   root
    2 years ago (17 Jan 2010 20:22)
  • Jira: IDEADEV-2266
    (history, comments)
 
IDEA-29775 IG: False positive in "if statement with identical branches"
0
Issue is visible to: All Users
  The issue is visible to the selected user group only
In the following example, IG states that the if statement has identical branches even though this is clearly not the case.

package test;

public class TestIdenticalBranches
{
static class TestIdenticalBranchesSub {}
static class TestIdenticalBranchesSub2 {}
static void test() {
if (true) {
final TestIdenticalBranchesSub var = new TestIdenticalBranchesSub();
} else {
final TestIdenticalBranchesSub2 var = new TestIdenticalBranchesSub2();
}
}
}


Issue was resolved
Comments (0)
 
History
 
Linked Issues (?)
 
Issue has no comments