Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maps.uniqueIndex should size the new Map better #47

Closed
GoogleCodeExporter opened this issue Apr 7, 2015 · 3 comments
Closed

Maps.uniqueIndex should size the new Map better #47

GoogleCodeExporter opened this issue Apr 7, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

Maps.uniqueIndex sizes the new collection based on the size of the list, when 
it should could call 
capacity on the list.

Line 508 should read
      newMap = new HashMap<K, V>(capacity(collection.size()));


Original issue reported on code.google.com by stevent...@gmail.com on 20 Jan 2008 at 4:57

@GoogleCodeExporter
Copy link
Author

Also Sets.newHashSet (line 326) and newConcurrentHashSet should call 
Maps.capacity, or a new function in Sets 
that does what Maps.capacity does without the call to Math.max

Original comment by stevent...@gmail.com on 27 Jan 2008 at 10:24

@GoogleCodeExporter
Copy link
Author

Original comment by kevin...@gmail.com on 30 Jan 2008 at 5:04

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

fixed internally and should show up externally shortly.

Original comment by kevin...@gmail.com on 27 May 2008 at 6:49

  • Changed state: Fixed
  • Added labels: 1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant