satishjs2297 / linkedin-j

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

getConnectionsForCurrentUser does not behave in user-friendly way #81

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The following code does not behave in the way I would expect as a user:

    public Connections getConnectionsForCurrentUser(Set<ProfileField> profileFields) {
        ...
        profileFields.retainAll(CONNECTION_FIELDS);
        ...
    }

There are two problems here.  The first is that it modifies the input.  If you 
pass in a set of profile fields, you don't expect that the LinkedIN client will 
modify that set.  It would be much better to make a defensive copy before 
calling retainAll.  The other issue is that if you pass a profileField which is 
not allowed, the client simply silently drops it.  As a new user it took me a 
very long time to figure out why the specialties field was not being returned.  
An error message telling me it was not allowed would have been very helpful.

I've attached a patch which fixes both of these issues.

Original issue reported on code.google.com by benjamin...@gmail.com on 13 Nov 2011 at 6:23

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for mentioning it. I will apply the patch in the next build.

Original comment by nabeelmukhtar on 14 Nov 2011 at 9:52

GoogleCodeExporter commented 9 years ago
Hi i couldn' find any method to set scope parameter in linkedin-j-android.jar. 
can you please tell me how to set scope parameter with linkedin-j

Original comment by deepakch...@gmail.com on 2 Oct 2012 at 4:29