Skip to content

Commit 998858f

Browse files
Stephan202ronshapiro
authored andcommitted
Document the JDK 9+ alternative to Maps#immutableEntry
Fixes #3385 RELNOTES=n/a ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=234208826
1 parent 63d0b31 commit 998858f

File tree

2 files changed

+6
-0
lines changed
  • android/guava/src/com/google/common/collect
  • guava/src/com/google/common/collect

2 files changed

+6
-0
lines changed

android/guava/src/com/google/common/collect/Maps.java

+3
Original file line numberDiff line numberDiff line change
@@ -1242,6 +1242,9 @@ public static ImmutableMap<String, String> fromProperties(Properties properties)
12421242
*
12431243
* <p>The returned entry is serializable.
12441244
*
1245+
* <p><b>Java 9 users:</b> consider using {@code java.util.Map.entry(key, value)} if the key and
1246+
* value are non-null and the entry does not need to be serializable.
1247+
*
12451248
* @param key the key to be associated with the returned entry
12461249
* @param value the value to be associated with the returned entry
12471250
*/

guava/src/com/google/common/collect/Maps.java

+3
Original file line numberDiff line numberDiff line change
@@ -1368,6 +1368,9 @@ public static ImmutableMap<String, String> fromProperties(Properties properties)
13681368
*
13691369
* <p>The returned entry is serializable.
13701370
*
1371+
* <p><b>Java 9 users:</b> consider using {@code java.util.Map.entry(key, value)} if the key and
1372+
* value are non-null and the entry does not need to be serializable.
1373+
*
13711374
* @param key the key to be associated with the returned entry
13721375
* @param value the value to be associated with the returned entry
13731376
*/

0 commit comments

Comments
 (0)