java - junit null pointer exception
ringa_lee
ringa_lee 2017-06-12 09:24:06
0
3
786

java.lang.NullPointerException

at org.eclipse.jdt.internal.junit4.runner.SubForestFilter.shouldRun(SubForestFilter.java:81)
at org.junit.internal.runners.JUnit4ClassRunner.filter(JUnit4ClassRunner.java:110)
at org.junit.runner.manipulation.Filter.apply(Filter.java:47)
at org.junit.internal.requests.FilterRequest.getRunner(FilterRequest.java:34)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createFilteredTest(JUnit4TestLoader.java:77)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:68)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:43)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:444)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
ringa_lee
ringa_lee

ringa_lee

reply all(3)
typecho

I generally don’t use junit that comes with eclipse, I use the official jar

迷茫

It is recommended to paste your code.

世界只因有你

There are several situations of null pointer
1 Calling a member attribute or method of a null object
2 When using enhanced for loop
3 Automatic unboxing of packaging type

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template