omit / linkedin-j

Automatically exported from code.google.com/p/linkedin-j
0 stars 0 forks source link

NullPointerException when post to LinkedIn Group requires moderation #136

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'm using linkedin-j 1.0.429.

I find that I get a crash when performing this:

    LinkedInApiClient.createPost(groupId, title, status);

in the case where the LinkedIn Group I'm posting to requires moderation of this 
post.

When moderation isn't required, it works fine.

When moderation *is* required, it posts fine to the group, but then linkedin-j 
crashes due to a NullPointerException as follows:

java.lang.NullPointerException
    at java.util.zip.InflaterInputStream.<init>(InflaterInputStream.java:66)
    at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:56)
    at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:67)
    at com.google.code.linkedinapi.client.impl.BaseLinkedInApiClient.getWrappedInputStream(BaseLinkedInApiClient.java:3920)
    at com.google.code.linkedinapi.client.impl.BaseLinkedInApiClient.callApiMethod(BaseLinkedInApiClient.java:3843)
    at com.google.code.linkedinapi.client.impl.BaseLinkedInApiClient.createPost(BaseLinkedInApiClient.java:3294)
    at com.foo.bar.server.LinkedInApi.updateStatus(LinkedInApi.java:214)

I'm guessing that in the case where the post requires moderation, the response 
from LinkedIn is different than in the case where moderation isn't required and 
that difference is not properly handled by linkedin-j 1.0.429.

Original issue reported on code.google.com by jjdemp...@gmail.com on 4 Apr 2013 at 4:54

GoogleCodeExporter commented 9 years ago
Any solution please .The application is crashed when this error is occurs

Original comment by it.balki...@gmail.com on 14 Jun 2013 at 1:50