8157729: examples in LinkedHashMap and LinkedHashSet class doc use raw types

Reviewed-by: darcy, naoto, lancea
This commit is contained in:
Stuart Marks 2020-09-09 00:43:48 +00:00
parent 26c7218ab9
commit 30fa8d5d34
2 changed files with 10 additions and 10 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -47,12 +47,12 @@ import java.io.IOException;
* without incurring the increased cost associated with {@link TreeMap}. It
* can be used to produce a copy of a map that has the same order as the
* original, regardless of the original map's implementation:
* <pre>
* void foo(Map m) {
* Map copy = new LinkedHashMap(m);
* <pre>{@code
* void foo(Map<String, Integer> m) {
* Map<String, Integer> copy = new LinkedHashMap<>(m);
* ...
* }
* </pre>
* }</pre>
* This technique is particularly useful if a module takes a map on input,
* copies it, and later returns results whose order is determined by that of
* the copy. (Clients generally appreciate having things returned in the same

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -42,12 +42,12 @@ package java.util;
* increased cost associated with {@link TreeSet}. It can be used to
* produce a copy of a set that has the same order as the original, regardless
* of the original set's implementation:
* <pre>
* void foo(Set s) {
* Set copy = new LinkedHashSet(s);
* <pre>{@code
* void foo(Set<String> s) {
* Set<String> copy = new LinkedHashSet<>(s);
* ...
* }
* </pre>
* }</pre>
* This technique is particularly useful if a module takes a set on input,
* copies it, and later returns results whose order is determined by that of
* the copy. (Clients generally appreciate having things returned in the same