> SonarCloud reports: > Remove or correct this "removeAll" call. > > void removeAll() { > items.removeAll(items); // <--- here > updateScrollbars(); > } > > Calling `removeAll()` with the same collection risks concurrent modification > exceptions. `clear()` would be correct and more efficient.
Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision: Update copyright ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/2974/files - new: https://git.openjdk.java.net/jdk/pull/2974/files/7dc5ab53..d1565744 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2974&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2974&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/2974.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/2974/head:pull/2974 PR: https://git.openjdk.java.net/jdk/pull/2974