sandeshdate / linkedin-j

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

Set modified by PeopleApiClient.getConnectionsById(String, Set<ProfileField>, int, int) #135

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I find it alarming that:

com.google.code.linkedinapi.client.PeopleApiClient.getConnectionsById(String, 
Set<ProfileField>, int, int)

Will attempt to modify the Set you pass in. I see this as potentially a 
threadsafety issue and will fail if you pass an immutable Set like Guava's 
ImmutableSet. This is a common scenario where you make the Set of fields a 
static final.

The method should rebuild the a Hash Set only if its missing the CONNECT_FIELDS.

Original issue reported on code.google.com by adam.g...@snaphop.com on 23 Mar 2013 at 10:00