2. BX_BOXING_IMMEDIATELY_UNBOXEDhtml
double a = 100d; double d = Double.valueOf(a);
Primitive value is boxed and then immediately unboxed.java
非必要的裝箱並當即拆箱操做.框架
Intellij 也會給這樣的提示:測試
沒什麼好說的ui
3. IJU_SETUP_NO_SUPERspa
好像是個遺留問題,出如今JUnit3的時代,e.g..net
JUnit3裏會這麼作code
public class TheTest extends TestCase { // test methods ... public static Test suite() { return new TestSetup(new TestSuite(TheTest.class)) { protected void setUp() throws Exception { super.setUp(); // set-up code called only once } protected void tearDown() throws Exception { // tear-down code called only once super.tearDown(); } };
因此須要這個super.setUp()來初始化
htm
JUnit4開始大規模使用Annotation,咱們有@Before @After來作這些事。blog
固然,如今JUnit4也已經用了不少年了,諸如Spock這樣的測試框架也挺好用的~