mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
17 lines
606 B
HTML
17 lines
606 B
HTML
<html>
|
|
<body>
|
|
Reports code that overwrites a <code>Map</code> key, a <code>Set</code> element, or an array element in a sequence of
|
|
<code>add</code>/<code>put</code> calls or using a Java 9 factory method like <code>Set.of</code> (which will result in runtime exception).
|
|
<p>This usually occurs due to a copy-paste error.</p>
|
|
<p><b>Example:</b></p>
|
|
<pre><code>
|
|
map.put("A", 1);
|
|
map.put("B", 2);
|
|
map.put("C", 3);
|
|
map.put("D", 4);
|
|
map.put("A", 5); // duplicating key "A", overwrites the previously written entry
|
|
</code></pre>
|
|
<!-- tooltip end -->
|
|
<p><small>New in 2017.3</small></p>
|
|
</body>
|
|
</html> |