mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 02:09:59 +07:00
[java-intentions] More preview tests; minor fixes
GitOrigin-RevId: 22a46c15d8900d8a31514846755a013f6a67ad42
This commit is contained in:
committed by
intellij-monorepo-bot
parent
e74564a52c
commit
7e1064ea3c
@@ -1,4 +1,4 @@
|
||||
// "Remove argument" "true"
|
||||
// "Remove argument" "true-preview"
|
||||
class Foo {
|
||||
public static void main(String[] args) {
|
||||
System.out.println();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove redundant 'append()' call" "true"
|
||||
// "Remove redundant 'append()' call" "true-preview"
|
||||
class Foo {
|
||||
public static void main(String[] args) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove argument" "true"
|
||||
// "Remove argument" "true-preview"
|
||||
class Foo {
|
||||
public static void main(String[] args) {
|
||||
StringBuilder s = new StringBuilder();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with empty string" "true"
|
||||
// "Replace with empty string" "true-preview"
|
||||
class Foo {
|
||||
public static void main(String[] args) {
|
||||
String s = "";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with argument" "true"
|
||||
// "Replace with argument" "true-preview"
|
||||
class Foo {
|
||||
public static void main(String[] args) {
|
||||
String s = "foo";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove argument" "true"
|
||||
// "Remove argument" "true-preview"
|
||||
class Foo {
|
||||
int test(String foo) {
|
||||
return foo.indexOf("bar");
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove redundant 'intern()' call" "true"
|
||||
// "Remove redundant 'intern()' call" "true-preview"
|
||||
class Foo {
|
||||
private static final String x = ("Hello "+"World"+'!');
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove argument" "true"
|
||||
// "Remove argument" "true-preview"
|
||||
class Foo {
|
||||
int test(String foo) {
|
||||
return foo.lastIndexOf("bar");
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove argument" "true"
|
||||
// "Remove argument" "true-preview"
|
||||
class Foo {
|
||||
int test(String foo) {
|
||||
return foo.lastIndexOf("bar");
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove argument" "true"
|
||||
// "Remove argument" "true-preview"
|
||||
class Foo {
|
||||
boolean test(String foo) {
|
||||
return foo.startsWith("bar");
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove redundant 'toString()' call" "true"
|
||||
// "Remove redundant 'toString()' call" "true-preview"
|
||||
class Foo {
|
||||
public static void main(String[] args) {
|
||||
/*valuable comment!!!*/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove redundant 'substring()' call" "true"
|
||||
// "Remove redundant 'substring()' call" "true-preview"
|
||||
class Foo {
|
||||
public static void main(String[] args) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove redundant 'toLowerCase()' call" "true"
|
||||
// "Remove redundant 'toLowerCase()' call" "true-preview"
|
||||
class X {
|
||||
void test(String string) {
|
||||
if (string.isEmpty()) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove argument" "true"
|
||||
// "Remove argument" "true-preview"
|
||||
class Foo {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("<caret>");
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove redundant 'append()' call" "true"
|
||||
// "Remove redundant 'append()' call" "true-preview"
|
||||
class Foo {
|
||||
public static void main(String[] args) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove argument" "true"
|
||||
// "Remove argument" "true-preview"
|
||||
class Foo {
|
||||
public static void main(String[] args) {
|
||||
StringBuilder s = new StringBuilder(("<caret>"));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with empty string" "true"
|
||||
// "Replace with empty string" "true-preview"
|
||||
class Foo {
|
||||
public static void main(String[] args) {
|
||||
String s = new Stri<caret>ng();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace with argument" "true"
|
||||
// "Replace with argument" "true-preview"
|
||||
class Foo {
|
||||
public static void main(String[] args) {
|
||||
String s = new Stri<caret>ng("foo");
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove argument" "true"
|
||||
// "Remove argument" "true-preview"
|
||||
class Foo {
|
||||
int test(String foo) {
|
||||
return foo.indexOf("bar", <caret>0);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove redundant 'intern()' call" "true"
|
||||
// "Remove redundant 'intern()' call" "true-preview"
|
||||
class Foo {
|
||||
private static final String x = ("Hello "+"World"+'!').inte<caret>rn();
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove argument" "true"
|
||||
// "Remove argument" "true-preview"
|
||||
class Foo {
|
||||
int test(String foo) {
|
||||
return foo.lastIndexOf("bar", <caret>foo.length());
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove argument" "true"
|
||||
// "Remove argument" "true-preview"
|
||||
class Foo {
|
||||
int test(String foo) {
|
||||
return foo.lastIndexOf("bar", <caret>((foo.length())-1));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove argument" "true"
|
||||
// "Remove argument" "true-preview"
|
||||
class Foo {
|
||||
boolean test(String foo) {
|
||||
return foo.startsWith("bar", (<caret>0));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove redundant 'toString()' call" "true"
|
||||
// "Remove redundant 'toString()' call" "true-preview"
|
||||
class Foo {
|
||||
public static void main(String[] args) {
|
||||
String s = args[0].toString<caret>(/*valuable comment!!!*/);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove redundant 'substring()' call" "true"
|
||||
// "Remove redundant 'substring()' call" "true-preview"
|
||||
class Foo {
|
||||
public static void main(String[] args) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove redundant 'toLowerCase()' call" "true"
|
||||
// "Remove redundant 'toLowerCase()' call" "true-preview"
|
||||
class X {
|
||||
void test(String string) {
|
||||
if (string.to<caret>LowerCase().isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user