tailorlala / guava-libraries

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

Sets.newHashSet Javadoc should suggest use of diamond operator #1851

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Lists.newArrayList and Maps.newHashMap include blurbs like:

   * <p><b>Note for Java 7 and later:</b> if {@code elements} is a {@link
   * Collection}, you don't need this method. Use the {@code ArrayList}
   * {@linkplain ArrayList#ArrayList(Collection) constructor} directly, taking
   * advantage of the new <a href="http://goo.gl/iz2Wi">"diamond" syntax</a>.

Sets.newHashSet should include a similar note.

Original issue reported on code.google.com by arg...@gmail.com on 19 Sep 2014 at 5:34

GoogleCodeExporter commented 9 years ago
Indeed, a lot of things still need this, thanks for the kick.

Original comment by kevinb@google.com on 19 Sep 2014 at 5:41

GoogleCodeExporter commented 9 years ago
modernizer-maven-plugin has a more complete list of there:

https://github.com/andrewgaul/modernizer-maven-plugin/blob/master/src/main/resou
rces/modernizer.xml

Original comment by arg...@gmail.com on 23 Sep 2014 at 1:47

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:08

GoogleCodeExporter commented 9 years ago

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

GoogleCodeExporter commented 9 years ago

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