Skip to content

Instantly share code, notes, and snippets.

@dashorst
Last active December 21, 2015 06:59
Show Gist options
  • Save dashorst/6268094 to your computer and use it in GitHub Desktop.
Save dashorst/6268094 to your computer and use it in GitHub Desktop.
Test for code analysis by Eclipse
package testproject;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
public class Test {
public void deadCodeAfterAssertNotNull() {
assertNotNull(null);
fail("");
}
public void noDeadCodeAfterFail() {
fail();
assertNotNull(null);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment