Open GoogleCodeExporter opened 9 years ago
Don't you get the same error when running with the PowerMock runner?
Original comment by johan.ha...@gmail.com
on 12 Apr 2010 at 10:43
Nope
Original comment by loic.lac...@gmail.com
on 12 Apr 2010 at 10:44
Could you help us by providing an example test/project?
Original comment by johan.ha...@gmail.com
on 12 Apr 2010 at 10:57
The test class is instanciated by the PowerMockRunner when used, while when the
PowerMockRule is used, the default classloader is used for the test class. My
test
class contains a Logger field which is the core of the problem I found.
Original comment by loic.lac...@gmail.com
on 12 Apr 2010 at 11:10
Could you attach the test and class under test here?
Original comment by johan.ha...@gmail.com
on 12 Apr 2010 at 11:13
I'll try to pinpoint the problem ASAP and post the set of problematic classes.
Original comment by loic.lac...@gmail.com
on 12 Apr 2010 at 12:01
I tried to reduce the problem I spotted to a single class and another problem
happens.
I attached a maven project containing both the @RunWith(PowerMockRunner.class)
and the
PowerMockRule versions. A NullPointerException is thrown in the PowerMockRule
version.
I use java 1.6.0_19 win32.
Original comment by loic.lac...@gmail.com
on 12 Apr 2010 at 12:23
Attachments:
The NPE is a known issue which has been resolved in trunk already. Thanks for
the zip
though, I'll check it out.
Original comment by johan.ha...@gmail.com
on 12 Apr 2010 at 12:26
Here I could reproduce the original issue.
Original comment by loic.lac...@gmail.com
on 12 Apr 2010 at 12:39
Attachments:
Thanks, hopefully I can have a look at this tomorrow.
Original comment by johan.ha...@gmail.com
on 12 Apr 2010 at 2:10
What error do you get? I get the same print-out when using the PowerMockRunner
as
well. How ever I my JVM crash when I'm using the rule :/
Original comment by johan.ha...@gmail.com
on 13 Apr 2010 at 6:26
I get a JVM crash
Original comment by loic.lac...@gmail.com
on 21 Apr 2010 at 4:12
Original issue reported on code.google.com by
loic.lac...@gmail.com
on 12 Apr 2010 at 9:15