mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
RedundantCollectionOperation: example in description, cosmetic fixes
Review ID: IDEA-CR-27215
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
<html>
|
||||
<body>
|
||||
Reports unnecessarily complex collection operations which have simpler alternatives.
|
||||
Reports unnecessarily complex collection operations which have simpler alternatives. E.g.
|
||||
<b>Arrays.asList(array).subList(0, 10).toArray(new String[0])</b> could be simplified to
|
||||
<b>Arrays.copyOfRange(array, 0, 10)</b> or <b>collection.containsAll(singletonList("x"))</b> could be
|
||||
simplified to <b>collection.contains("x")</b>.
|
||||
<!-- tooltip end -->
|
||||
<p><small>New in 2018.1</small></p>
|
||||
</body>
|
||||
|
||||
+4
-3
@@ -245,10 +245,11 @@ public class RedundantCollectionOperationInspection extends AbstractBaseJavaLoca
|
||||
}
|
||||
|
||||
private static class RedundantCollectionOperationFix implements LocalQuickFix {
|
||||
private RedundantCollectionOperationHandler myHandler;
|
||||
private final RedundantCollectionOperationHandler myHandler;
|
||||
|
||||
public RedundantCollectionOperationFix(
|
||||
RedundantCollectionOperationHandler handler) {myHandler = handler;}
|
||||
public RedundantCollectionOperationFix(RedundantCollectionOperationHandler handler) {
|
||||
myHandler = handler;
|
||||
}
|
||||
|
||||
@Nls
|
||||
@NotNull
|
||||
|
||||
Reference in New Issue
Block a user