The ConsumerManager.setPrefAssocSessEnc does not behave as I would expect. If I
call consumerManager.setPrefAssocSessEnc(AssociationSessionType.DH_SHA1), the
first association requested is still AssociationSessionType.DH_SHA256.
I believe this is a bug in the ConsumerManager#associate(DiscoveryInformation
discovered, int maxAttempts) implementation. The javadoc on LinkedHashMap.put
states "Associates the specified value with the specified key in this map. If
the map previously contained a mapping for this key, the old value is
replaced." Since the key DH_SHA1 already exists, it's ordering remains the same
(it's null value is just replaced with another null value) and DH_SHA1 does not
get priority.
I have attached a patch that includes a JUnit that reproduces the issue and a
fix.
Original issue reported on code.google.com by rwi...@gmail.com on 8 Jun 2010 at 3:15
Original issue reported on code.google.com by
rwi...@gmail.com
on 8 Jun 2010 at 3:15Attachments: