| Priority |
Normal |
| Type | Bug |
| State | Fixed |
| Assignee | Bas Leijdekkers |
| Subsystem | Code Analysis. Inspection |
| Affected versions |
No affected versions
|
| Fixed in |
No fix versions
|
| Fixed in build |
Next build |
| Build |
7562
|
| Fixed in build |
7579
|
| Severity |
0
|
IDEA-42140 |
JUnit Simplify assertion inspection too aggressive |
|
|
import junit.framework.TestCase;
public class IDEABugTest extends TestCase {
public static enum Input { value1 }
public void testAssertEqualsSimplificationShouldNotSimplifyOverridenAssertEquals() throws Exception {
assertEquals(Input.value1, null, new Exception());
assertEquals("value1", null, new Exception());
assertEquals("value1", true, new Exception());
}
@SuppressWarnings({"UnusedDeclaration"})
public static void assertEquals(Enum expectedValue1, Integer expectedValue2, Exception actual) {
}
@SuppressWarnings({"UnusedDeclaration"})
public static void assertEquals(String expectedValue1, Integer expectedValue2, Exception actual) {
}
}