trautonen / coveralls-maven-plugin

Maven plugin for submitting Java code coverage reports to Coveralls web service.
MIT License
311 stars 124 forks source link

NullPointerException: charset #34

Closed stefan2904 closed 10 years ago

stefan2904 commented 10 years ago

When using version 2.2.0 on travis, I get a java.lang.NullPointerException: charset while submitting:

...
Caused by: java.lang.NullPointerException: charset
at java.io.InputStreamReader.<init>(InputStreamReader.java:115)
at org.eluder.coveralls.maven.plugin.httpclient.CoverallsClient.parseResponse(CoverallsClient.java:97)
at org.eluder.coveralls.maven.plugin.httpclient.CoverallsClient.submit(CoverallsClient.java:89)
at org.eluder.coveralls.maven.plugin.AbstractCoverallsMojo.submitData(AbstractCoverallsMojo.java:307)
at org.eluder.coveralls.maven.plugin.AbstractCoverallsMojo.execute(AbstractCoverallsMojo.java:192)

Is it possible that contentType() becomes null, because the server returns something without proper charset, and you dont check for such case?

stefan2904 commented 10 years ago

Since coveralls is back working now, your plugin does what it is supposed to do. You want to catch that exception anyway? ;-)