mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-05 01:50:56 +07:00
[java] Update inspection descriptions
GitOrigin-RevId: 1c55fac4ca08678e76aee02962ddf12153dd51cd
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d830ccbf28
commit
170c838207
@@ -163,7 +163,7 @@ scope.package=Package {0}
|
||||
access.can.be.0=Access can be {0}
|
||||
access.to.field.code.ref.code.outside.of.declared.guards.loc=Access to field <code>#ref</code> outside of declared guards #loc
|
||||
call.to.method.code.ref.code.outside.of.declared.guards.loc=Call to method <code>#ref()</code> outside of declared guards #loc
|
||||
annotate.as.safevarargs=Annotate as @SafeVarargs
|
||||
annotate.as.safevarargs=Annotate as '@SafeVarargs'
|
||||
annotate.overridden.methods.parameters.family.name=Annotate overridden method parameters
|
||||
annotate.overridden.methods.parameters=Annotate overridden method parameters as ''@{0}''
|
||||
anonymous.ref.loc.can.be.replaced.with.0=Anonymous #ref #loc can be replaced with {0}
|
||||
@@ -335,7 +335,7 @@ junit.rule.classrule.option=Report @ClassRule problems
|
||||
junit.rule.rule.option=Report @Rule problems
|
||||
make.0.default.annotation=Make "{0}" default annotation
|
||||
make.default.the.last.case.family.name=Make 'default' the last case
|
||||
make.final.and.annotate.as.safevarargs=Make final and annotate as @SafeVarargs
|
||||
make.final.and.annotate.as.safevarargs=Make final and annotate as '@SafeVarargs'
|
||||
method.reference.mapped.to.comparator=Method reference mapped to Comparator interface does not fulfill the Comparator contract
|
||||
module.0.with.language.level.1.depends.on.module.2.with.language.level.3=Module {0} with language level {1} depends on module {2} with language level {3}
|
||||
non.final.field.code.ref.code.in.immutable.class.loc=Non-final field <code>#ref</code> in @Immutable class #loc
|
||||
|
||||
@@ -291,8 +291,8 @@ add.exception.from.field.initializer.to.constructor.throws.family.text=Add excep
|
||||
java.8.map.api.inspection.fix.text=Replace with ''{0}'' method call
|
||||
java.8.map.api.inspection.description=Can be replaced with single ''Map.{0}'' method call
|
||||
java.8.map.api.inspection.fix.family.name=Replace with single Map method call
|
||||
java.8.collection.removeif.inspection.description=The loop could be replaced with Collection.removeIf
|
||||
java.8.collection.removeif.inspection.fix.name=Replace the loop with Collection.removeIf
|
||||
java.8.collection.removeif.inspection.description=The loop can be replaced with 'Collection.removeIf'
|
||||
java.8.collection.removeif.inspection.fix.name=Replace the loop with 'Collection.removeIf'
|
||||
java.8.list.sort.inspection.description=Collections.sort could be replaced with List.sort
|
||||
java.8.list.sort.inspection.fix.name=Replace with List.sort
|
||||
|
||||
|
||||
@@ -1,21 +1,28 @@
|
||||
<html>
|
||||
<body>
|
||||
Reports Comparators defined as lambda expressions which could be expressed using
|
||||
Reports cases where a <code>Comparator</code> is defined as a lambda expression which could be expressed using
|
||||
methods like <code>Comparator.comparing()</code>.
|
||||
<p>Some comparators like <code>(person1, person2) -> person1.getName().compareTo(person2.getName())</code>
|
||||
could be simplified like this: <code>Comparator.comparing(Person::getName)</code>.</p>
|
||||
<p>Also suggests to replace chain comparisons with Comparator.thenComparing(), e.g.
|
||||
<code>
|
||||
int res = o1.first.compareTo(o2.first);
|
||||
if(res == 0) res = o1.second.compareTo(o2.second);
|
||||
if(res == 0) res = o1.third - o2.third;
|
||||
return res;
|
||||
</code> will be replaced with
|
||||
<code>
|
||||
objs.sort(Comparator.comparing((Obj o) -> o.first).thenComparing(o -> o.second).thenComparingInt(o -> o.third));
|
||||
</code>
|
||||
</p>
|
||||
This inspection also reports chain comparisons which can be replaced by <code>Comparator.thenComparing()</code>.
|
||||
<!-- tooltip end -->
|
||||
<p>Example:</p>
|
||||
<pre>
|
||||
myList.sort((person1, person2) -> person1.getName().compareTo(person2.getName()));
|
||||
|
||||
myList2.sort((person1, person2) -> {
|
||||
int res = person1.first().compareTo(person2.first());
|
||||
if(res == 0) res = person1.second().compareTo(person2.second());
|
||||
if(res == 0) res = person1.third() - person2.third();
|
||||
return res;
|
||||
});
|
||||
</pre>
|
||||
<p>After the quick-fixes are applied, the result looks like this:</p>
|
||||
<pre>
|
||||
myList.sort(Comparator.comparing(Person::getName));
|
||||
|
||||
myList2.sort(Comparator.comparing(Person::first)
|
||||
.thenComparing(Person::second)
|
||||
.thenComparingInt(Person::third));
|
||||
</pre>
|
||||
<p><small>New in 2016.3</small></p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +1,8 @@
|
||||
<html>
|
||||
<body>
|
||||
Reports loops which could be collapsed into single <code>Collection.removeIf</code> call.
|
||||
<p>For example:</p>
|
||||
Reports loops which can be collapsed into a single <code>Collection.removeIf</code> call.
|
||||
<!-- tooltip end -->
|
||||
<p>Example:</p>
|
||||
<pre>
|
||||
for (Iterator<String> it = collection.iterator(); it.hasNext(); ) {
|
||||
String aValue = it.next();
|
||||
@@ -10,8 +11,13 @@ Reports loops which could be collapsed into single <code>Collection.removeIf</co
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
<!-- tooltip end -->
|
||||
<p>This inspection only reports if the language level of the project or module is 8 or higher</p>
|
||||
<p>After the quick-fix is applied, the result looks like this:</p>
|
||||
<pre>
|
||||
collection.removeIf(aValue -> shouldBeRemoved(aValue));
|
||||
</pre>
|
||||
<p>
|
||||
This inspection only reports if the language level of the project or module is 8 or higher
|
||||
</p>
|
||||
<p><small>New in 2016.3</small></p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,8 +1,31 @@
|
||||
<html>
|
||||
<body>
|
||||
Reports all methods with variable arity which can be annotated as @SafeVarargs.
|
||||
@SafeVarargs annotation suppresses unchecked warnings about parameterized array creation at call sites.
|
||||
<p>
|
||||
Reports all methods with variable arity which can be annotated as <code>@SafeVarargs</code>.
|
||||
<code>@SafeVarargs</code> annotation suppresses unchecked warnings about parameterized array creation at call sites.
|
||||
<!-- tooltip end -->
|
||||
<p>Example:</p>
|
||||
<pre>
|
||||
public class Foo<T> {
|
||||
private List<T> list = new ArrayList<>();
|
||||
|
||||
public final void safeVarargs(T... elements) {
|
||||
Collections.addAll(list, elements);
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
<p>After the quick-fix is applied, the result looks like this:</p>
|
||||
<pre>
|
||||
public class Foo<T> {
|
||||
private List<T> list = new ArrayList<>();
|
||||
|
||||
@SafeVarargs
|
||||
public final void safeVarargs(T... elements) {
|
||||
Collections.addAll(list, elements);
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
<p>
|
||||
This annotation is not supported under Java 1.6 or earlier JVMs.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<body>
|
||||
Suggests to replace string literals with text blocks.
|
||||
Suggests to replace <code>String</code> literals with text blocks.
|
||||
<p>
|
||||
Requirements:
|
||||
<ul>
|
||||
@@ -11,16 +11,16 @@ Requirements:
|
||||
Use the <b>Apply to single string literals</b> option to suggest the fix for single literals containing line breaks.
|
||||
<p>
|
||||
<!-- tooltip end -->
|
||||
Example:
|
||||
<pre><code>
|
||||
<p>Example:</p>
|
||||
<pre>
|
||||
String html = "<html>\n" +
|
||||
" <body>\n" +
|
||||
" <p>Hello, world</p>\n" +
|
||||
" </body>\n" +
|
||||
"</html>\n";
|
||||
</code></pre>
|
||||
<p>can be replaced with</p>
|
||||
<pre><code>
|
||||
</pre>
|
||||
<p>After the quick-fix is applied, the result looks like this:</p>
|
||||
<pre>
|
||||
String html = """
|
||||
<html>
|
||||
<body>
|
||||
@@ -28,7 +28,7 @@ Example:
|
||||
</body>
|
||||
</html>
|
||||
""";
|
||||
</code></pre>
|
||||
</pre>
|
||||
<p>This inspection only reports if the configured language level is 15 or higher.</p>
|
||||
<p><small>New in 2019.3</small></p>
|
||||
</body>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.comparingInt" "true"
|
||||
// "Replace with 'Comparator.comparingInt'" "true"
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.comparingInt" "true"
|
||||
// "Replace with 'Comparator.comparingInt'" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.comparingInt" "true"
|
||||
// "Replace with 'Comparator.comparingInt'" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.comparing" "true"
|
||||
// "Replace with 'Comparator.comparing'" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator chain" "true"
|
||||
// "Replace with 'Comparator' chain" "true"
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator chain" "true"
|
||||
// "Replace with 'Comparator' chain" "true"
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator chain" "true"
|
||||
// "Replace with 'Comparator' chain" "true"
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator chain" "true"
|
||||
// "Replace with 'Comparator' chain" "true"
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator chain" "true"
|
||||
// "Replace with 'Comparator' chain" "true"
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator chain" "true"
|
||||
// "Replace with 'Comparator' chain" "true"
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.comparingInt" "true"
|
||||
// "Replace with 'Comparator.comparingInt'" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.comparingInt" "true"
|
||||
// "Replace with 'Comparator.comparingInt'" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.comparingDouble" "true"
|
||||
// "Replace with 'Comparator.comparingDouble'" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.comparingDouble" "true"
|
||||
// "Replace with 'Comparator.comparingDouble'" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.comparing" "true"
|
||||
// "Replace with 'Comparator.comparing'" "true"
|
||||
|
||||
import java.util.Comparator;
|
||||
public class MyTest {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.comparing" "true"
|
||||
// "Replace with 'Comparator.comparing'" "true"
|
||||
|
||||
import java.util.Comparator;
|
||||
public class MyTest {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.comparing" "true"
|
||||
// "Replace with 'Comparator.comparing'" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.comparingInt" "true"
|
||||
// "Replace with 'Comparator.comparingInt'" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.comparingLong" "true"
|
||||
// "Replace with 'Comparator.comparingLong'" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.comparingLong" "true"
|
||||
// "Replace with 'Comparator.comparingLong'" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.naturalOrder" "true"
|
||||
// "Replace with 'Comparator.naturalOrder'" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator chain" "true"
|
||||
// "Replace with 'Comparator' chain" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.reverseOrder" "true"
|
||||
// "Replace with 'Comparator.reverseOrder'" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.comparing" "true"
|
||||
// "Replace with 'Comparator.comparing'" "true"
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.comparingInt" "true"
|
||||
// "Replace with 'Comparator.comparingInt'" "true"
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.comparingInt" "true"
|
||||
// "Replace with 'Comparator.comparingInt'" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.comparingInt" "true"
|
||||
// "Replace with 'Comparator.comparingInt'" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.comparing" "true"
|
||||
// "Replace with 'Comparator.comparing'" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.comparing" "false"
|
||||
// "Replace with 'Comparator.comparing'" "false"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator chain" "false"
|
||||
// "Replace with 'Comparator' chain" "false"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator chain" "true"
|
||||
// "Replace with 'Comparator' chain" "true"
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator chain" "true"
|
||||
// "Replace with 'Comparator' chain" "true"
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator chain" "true"
|
||||
// "Replace with 'Comparator' chain" "true"
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator chain" "true"
|
||||
// "Replace with 'Comparator' chain" "true"
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator chain" "true"
|
||||
// "Replace with 'Comparator' chain" "true"
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator chain" "true"
|
||||
// "Replace with 'Comparator' chain" "true"
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.comparingInt" "true"
|
||||
// "Replace with 'Comparator.comparingInt'" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.comparingInt" "true"
|
||||
// "Replace with 'Comparator.comparingInt'" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.comparingDouble" "true"
|
||||
// "Replace with 'Comparator.comparingDouble'" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.comparingDouble" "true"
|
||||
// "Replace with 'Comparator.comparingDouble'" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.comparing" "true"
|
||||
// "Replace with 'Comparator.comparing'" "true"
|
||||
|
||||
import java.util.Comparator;
|
||||
public class MyTest {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.comparing" "true"
|
||||
// "Replace with 'Comparator.comparing'" "true"
|
||||
|
||||
import java.util.Comparator;
|
||||
public class MyTest {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.comparing" "true"
|
||||
// "Replace with 'Comparator.comparing'" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.comparingInt" "true"
|
||||
// "Replace with 'Comparator.comparingInt'" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.comparingInt" "false"
|
||||
// "Replace with 'Comparator.comparingInt'" "false"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.comparing" "false"
|
||||
// "Replace with 'Comparator.comparing'" "false"
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.comparingLong" "true"
|
||||
// "Replace with 'Comparator.comparingLong'" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.comparingLong" "true"
|
||||
// "Replace with 'Comparator.comparingLong'" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.comparingLong" "false"
|
||||
// "Replace with 'Comparator.comparingLong'" "false"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.naturalOrder" "true"
|
||||
// "Replace with 'Comparator.naturalOrder'" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator chain" "true"
|
||||
// "Replace with 'Comparator' chain" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.reverseOrder" "true"
|
||||
// "Replace with 'Comparator.reverseOrder'" "true"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.comparing" "true"
|
||||
// "Replace with 'Comparator.comparing'" "true"
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with Comparator.comparing" "false"
|
||||
// "Replace with 'Comparator.comparing'" "false"
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Annotate as @SafeVarargs" "true"
|
||||
// "Annotate as '@SafeVarargs'" "true"
|
||||
public class Test {
|
||||
@SafeVarargs
|
||||
public static <T> void main(T... args) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Annotate as @SafeVarargs" "true"
|
||||
// "Annotate as '@SafeVarargs'" "true"
|
||||
import java.util.List;
|
||||
public class Test {
|
||||
public <T> @SafeVarargs
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Annotate as @SafeVarargs" "true"
|
||||
// "Annotate as '@SafeVarargs'" "true"
|
||||
public class Test {
|
||||
@SafeVarargs
|
||||
public final <T> void main(T... args) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Make final and annotate as @SafeVarargs" "true"
|
||||
// "Make final and annotate as '@SafeVarargs'" "true"
|
||||
public class Test {
|
||||
@SafeVarargs
|
||||
public final <T> void m<caret>ain(T... args) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Annotate as @SafeVarargs" "true"
|
||||
// "Annotate as '@SafeVarargs'" "true"
|
||||
public record Test(java.util.List<String>... args) {
|
||||
@SafeVarargs
|
||||
public Test {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Annotate as @SafeVarargs" "true"
|
||||
// "Annotate as '@SafeVarargs'" "true"
|
||||
record Rec<T>(T... args) {
|
||||
@SafeVarargs
|
||||
public Rec(T... args) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Annotate as @SafeVarargs" "true"
|
||||
// "Annotate as '@SafeVarargs'" "true"
|
||||
record Rec<T>(T... args) {
|
||||
@SafeVarargs
|
||||
public Rec {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Annotate as @SafeVarargs" "true"
|
||||
// "Annotate as '@SafeVarargs'" "true"
|
||||
public record Test(java.util.List<String>... args) {
|
||||
static final String FOO = "bar";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Annotate as @SafeVarargs" "true"
|
||||
// "Annotate as '@SafeVarargs'" "true"
|
||||
public class Test {
|
||||
public static <T> void mai<caret>n(T... args) {
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Make final and annotate as @SafeVarargs" "false"
|
||||
// "Make final and annotate as '@SafeVarargs'" "false"
|
||||
public interface Test {
|
||||
<T> void m<caret>ain(T... args);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Make final and annotate as @SafeVarargs" "false"
|
||||
// "Make final and annotate as '@SafeVarargs'" "false"
|
||||
public abstract class Test {
|
||||
abstract <T> void m<caret>ain(T... args);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Annotate as @SafeVarargs" "false"
|
||||
// "Annotate as '@SafeVarargs'" "false"
|
||||
public class Test {
|
||||
@SafeVarargs
|
||||
public static <T> void m<caret>ain(T... args) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Annotate as @SafeVarargs" "false"
|
||||
// "Annotate as '@SafeVarargs'" "false"
|
||||
public class Test {
|
||||
public static void m<caret>ain(String... args) {
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Annotate as @SafeVarargs" "false"
|
||||
// "Annotate as '@SafeVarargs'" "false"
|
||||
public class Test {
|
||||
public <T> void m<caret>ain(T args) {
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Annotate as @SafeVarargs" "false"
|
||||
// "Annotate as '@SafeVarargs'" "false"
|
||||
import java.util.List;
|
||||
public class Test {
|
||||
public static void m<caret>ain(List<?>... args) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Annotate as @SafeVarargs" "true"
|
||||
// "Annotate as '@SafeVarargs'" "true"
|
||||
import java.util.List;
|
||||
public class Test {
|
||||
public <T> static void m<caret>ain(List<T>... args) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Annotate as @SafeVarargs" "true"
|
||||
// "Annotate as '@SafeVarargs'" "true"
|
||||
public class Test {
|
||||
public final <T> void m<caret>ain(T... args) {
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Make final and annotate as @SafeVarargs" "true"
|
||||
// "Make final and annotate as '@SafeVarargs'" "true"
|
||||
public class Test {
|
||||
public <T> void m<caret>ain(T... args) {
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Annotate as @SafeVarargs" "true"
|
||||
// "Annotate as '@SafeVarargs'" "true"
|
||||
public record T<caret>est(java.util.List<String>... args) {
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Annotate as @SafeVarargs" "true"
|
||||
// "Annotate as '@SafeVarargs'" "true"
|
||||
record Rec<T>(T... args) {
|
||||
public R<caret>ec(T... args) {
|
||||
this.args = args;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Annotate as @SafeVarargs" "false"
|
||||
// "Annotate as '@SafeVarargs'" "false"
|
||||
record Re<caret>c<T>(T... args) {
|
||||
public Rec(T... args) {
|
||||
this.args = args;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Annotate as @SafeVarargs" "true"
|
||||
// "Annotate as '@SafeVarargs'" "true"
|
||||
record Rec<T>(T... args) {
|
||||
public R<caret>ec {
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Annotate as @SafeVarargs" "true"
|
||||
// "Annotate as '@SafeVarargs'" "true"
|
||||
public record T<caret>est(java.util.List<String>... args) {
|
||||
static final String FOO = "bar";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace the loop with Collection.removeIf" "true"
|
||||
// "Replace the loop with 'Collection.removeIf'" "true"
|
||||
import java.util.*;
|
||||
|
||||
public class Main {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace the loop with Collection.removeIf" "true"
|
||||
// "Replace the loop with 'Collection.removeIf'" "true"
|
||||
import java.util.*;
|
||||
|
||||
public class Main {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace the loop with Collection.removeIf" "true"
|
||||
// "Replace the loop with 'Collection.removeIf'" "true"
|
||||
import java.util.*;
|
||||
|
||||
public class Main {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace the loop with Collection.removeIf" "true"
|
||||
// "Replace the loop with 'Collection.removeIf'" "true"
|
||||
import java.util.*;
|
||||
|
||||
public class Main {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace the loop with Collection.removeIf" "true"
|
||||
// "Replace the loop with 'Collection.removeIf'" "true"
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace the loop with Collection.removeIf" "true"
|
||||
// "Replace the loop with 'Collection.removeIf'" "true"
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace the loop with Collection.removeIf" "true"
|
||||
// "Replace the loop with 'Collection.removeIf'" "true"
|
||||
import java.util.*;
|
||||
|
||||
public class Test {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace the loop with Collection.removeIf" "true"
|
||||
// "Replace the loop with 'Collection.removeIf'" "true"
|
||||
import java.util.*;
|
||||
|
||||
public class Main {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace the loop with Collection.removeIf" "true"
|
||||
// "Replace the loop with 'Collection.removeIf'" "true"
|
||||
import java.util.*;
|
||||
|
||||
public class Main {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace the loop with Collection.removeIf" "true"
|
||||
// "Replace the loop with 'Collection.removeIf'" "true"
|
||||
import java.util.*;
|
||||
|
||||
public class Main {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace the loop with Collection.removeIf" "true"
|
||||
// "Replace the loop with 'Collection.removeIf'" "true"
|
||||
import java.util.*;
|
||||
|
||||
public class Main {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace the loop with Collection.removeIf" "false"
|
||||
// "Replace the loop with 'Collection.removeIf'" "false"
|
||||
import java.util.*;
|
||||
|
||||
public class Main {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace the loop with Collection.removeIf" "true"
|
||||
// "Replace the loop with 'Collection.removeIf'" "true"
|
||||
import java.util.*;
|
||||
|
||||
public class Main {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace the loop with Collection.removeIf" "true"
|
||||
// "Replace the loop with 'Collection.removeIf'" "true"
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace the loop with Collection.removeIf" "true"
|
||||
// "Replace the loop with 'Collection.removeIf'" "true"
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace the loop with Collection.removeIf" "false"
|
||||
// "Replace the loop with 'Collection.removeIf'" "false"
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace the loop with Collection.removeIf" "false"
|
||||
// "Replace the loop with 'Collection.removeIf'" "false"
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user