Numberformat exception

23 views
Skip to first unread message

Gervase

unread,
Apr 5, 2012, 4:16:48 PM4/5/12
to PowerMock
In this annotation, @RunWith(PowerMockRunner.class) getting
below stack trace. Version is 1.4.12


java.lang.NumberFormatException: For input string: "9b2"
at
java.lang.NumberFormatException.forInputString(NumberFormatException.java:
48)
at java.lang.Integer.parseInt(Integer.java:458)
at java.lang.Short.parseShort(Short.java:120)
at java.lang.Short.parseShort(Short.java:78)
at
org.powermock.modules.junit4.common.internal.impl.VersionCompatibility.getJUnitVersion(VersionCompatibility.java:
38)
at
org.powermock.modules.junit4.PowerMockRunner.<init>(PowerMockRunner.java:
31)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:
39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:
27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at
org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:
31)
at
org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:
24)
at
org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:
57)
at
org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:
29)
at
org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:
57)
at
org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:
24)
at
com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:62)

Johan Haleby

unread,
Apr 5, 2012, 4:28:31 PM4/5/12
to powe...@googlegroups.com
What version of JUnit are you using?

Meredith Corporation

unread,
Apr 5, 2012, 5:14:25 PM4/5/12
to powe...@googlegroups.com
Oops...looks like 4.9.b2.... sounds like that could be the issue.

Should be 4.8.2 I guess... sorry for the false alarm.


--
You received this message because you are subscribed to the Google Groups "PowerMock" group.
To post to this group, send email to powe...@googlegroups.com.
To unsubscribe from this group, send email to powermock+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/powermock?hl=en.


Johan Haleby

unread,
Apr 6, 2012, 3:28:31 AM4/6/12
to powe...@googlegroups.com
Yes it probably is. However it's obviously a bug in the JUnit runner, I'll add it as an issue.

Regards,
/Johan
To unsubscribe from this group, send email to powermock+...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/powermock?hl=en.

--
You received this message because you are subscribed to the Google Groups "PowerMock" group.
To post to this group, send email to powe...@googlegroups.com.
To unsubscribe from this group, send email to powermock+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages