-
Notifications
You must be signed in to change notification settings - Fork 928
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NullPointerException with wartremover plugin #2766
Comments
avdv
added a commit
to avdv/sbt
that referenced
this issue
Oct 1, 2016
eed3si9n
added a commit
that referenced
this issue
Oct 25, 2016
Fix #2766 sourceFile null causes NPE
avdv
added a commit
to avdv/zinc
that referenced
this issue
Oct 25, 2016
This avoids an NPE when accessing position info in case `sourcePath` or `sourceFile` are `null`. See sbt/sbt#2766 for a stack trace.
closing since fixes are already merged |
eed3si9n
pushed a commit
to eed3si9n/scala
that referenced
this issue
May 14, 2019
This avoids an NPE when accessing position info in case `sourcePath` or `sourceFile` are `null`. See sbt/sbt#2766 for a stack trace.
lrytz
pushed a commit
to lrytz/scala
that referenced
this issue
Nov 5, 2019
This avoids an NPE when accessing position info in case `sourcePath` or `sourceFile` are `null`. See sbt/sbt#2766 for a stack trace. Rewritten from sbt/zinc@e2a249a
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(See the guidelines for contributing, linked above)
steps
We're using the wartremover 1.1.1 SBT plugin in a Play 2.5.8 application, with SBT 0.13.12 and ReactiveMongo.
Sorry, but giving a reproduction is a bit hard since it seems to depend on a lot of preliminaries and we just hit this after refactoring code into different packages.
Basically, we just ran
sbt compile
in our project.problem
An NPE is thrown when the wartremover plugin is trying to report an issue:
This seems be caused by the
Position
having no sourceFile attached, as JDB yields the following result atsbt.LoggerReporter.log (LoggerReporter.scala:109)
:So, apparently the
posIn
parameter given toconvert
here is already missing that information.expectation
no exception.
The text was updated successfully, but these errors were encountered: