Balzanka / guava-libraries

Automatically exported from code.google.com/p/guava-libraries
Apache License 2.0
0 stars 0 forks source link

Entry<TypeToken<? extends B>, B>.setValue(B) bypasses TypeToInstanceMap typesafe? #1352

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I was curious as to whether setting the value of an entry from the entry set of 
TypeToInstanceMap would disrupt the type safety that TypeToInstanceMap attempts 
to ensure.  Should these entries be immutable to protect type safety? Has this 
already been brought up?

So far, it seems as if the forwarding map returns the entry set of the backing 
hash map, which can be modified.

Original issue reported on code.google.com by jysjys1...@gmail.com on 26 Mar 2013 at 9:07

GoogleCodeExporter commented 9 years ago
Sounds like an oversight to me. Thanks for the report.

Original comment by cpov...@google.com on 26 Mar 2013 at 2:06

GoogleCodeExporter commented 9 years ago
Thanks for reporting! On it.

Original comment by be...@google.com on 26 Mar 2013 at 3:26

GoogleCodeExporter commented 9 years ago
In Guava 15

Original comment by be...@google.com on 28 Mar 2013 at 3:55

GoogleCodeExporter commented 9 years ago

Original comment by cpov...@google.com on 28 Mar 2013 at 3:56

GoogleCodeExporter commented 9 years ago
This issue has been migrated to GitHub.

It can be found at https://github.com/google/guava/issues/<issue id>

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:12

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 3 Nov 2014 at 9:08