NullPointerException in Buffer#write
See original GitHub issueUsing Okio 1.2.0 along with OkHttp 2.1.0, I’m seeing an NPE when reading HTTP responses:
java.lang.NullPointerException
at okio.Buffer.write(Buffer.java:854)
at okio.RealBufferedSink.write(RealBufferedSink.java:44)
at com.squareup.okhttp.internal.http.HttpConnection$FixedLengthSink.write(HttpConnection.java:300)
at okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:140)
at okio.RealBufferedSink.write(RealBufferedSink.java:69)
at com.squareup.okhttp.RequestBody$1.writeTo(RequestBody.java:72)
at com.squareup.okhttp.Call.getResponse(Call.java:237)
at com.squareup.okhttp.Call.execute(Call.java:84)
Evidently, source.head
is null. Could this be due to the older OkHttp version?
Issue Analytics
- State:
- Created 8 years ago
- Comments:14 (6 by maintainers)
Top Results From Across the Web
Java: BufferedWriter NullPointerException - Stack Overflow
I am attempting to write a method that has to take in a Writer object and use that to provide output to a...
Read more >Null Pointer Exception with BufferedWriter - Oracle Communities
Hi Guys, When I try to run this code I get a NullPointer Exception, and I can't work out why.
Read more >java.lang.NullPointerException okio.Buffer.write #6723 - GitHub
The socket field is guarded by the lock and set to null on close/failure. But it may pass send calls during socket opening....
Read more >java - why is there a NullPointerException? [SOLVED] - Daniweb
Two of the destination files are OK and one is truncated. Here is the code: import java.io.BufferedReader; import java.io.BufferedWriter; import ...
Read more >What is a NullPointerException and how do I fix it - Edureka
NullPointerException ) and what causes them? ... Java; What is a NullPointerException and how do I fix. ... BufferedWriter; import java.io.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Those come from the Android OS and its copy of Okio from a few years ago.
On Wed, Aug 14, 2019, 7:20 PM Ray Li notifications@github.com wrote:
I have that same problem. Has anyone found the solution?