mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-09 08:09:39 +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 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
import java.util.Random;
|
||||
import java.util.function.Function;
|
||||
class Bar extends Random {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
import java.util.Random;
|
||||
import java.util.function.Function;
|
||||
class Bar extends Random {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
interface I {
|
||||
String foo(Foo i);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
interface I {
|
||||
String foo(Foo i);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
interface I {
|
||||
String foo(Foo i);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
import java.io.PrintStream;
|
||||
import java.util.function.BiConsumer;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
class Example {
|
||||
interface I {
|
||||
String foo(Integer i);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
class Example {
|
||||
static void foo() {
|
||||
Ar<String> a = String[]::new;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
class Example {
|
||||
{
|
||||
long[][] avg = collect(long[][]::new);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
class Example {
|
||||
static void foo() {
|
||||
Ar<String> a = String[]::clone;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
import java.util.function.Function;
|
||||
|
||||
class Bar extends Random {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
import java.util.function.Function;
|
||||
|
||||
class Bar extends Random {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
class Example {
|
||||
public void m() {
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
class StaticInner {
|
||||
|
||||
static class Inner {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
class MyTest2<X> {
|
||||
MyTest2(X x) {
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
class NonStaticInner3 {
|
||||
class Foo {
|
||||
Foo(Integer i) {}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
class NonStaticInner3 {
|
||||
class Foo {
|
||||
Foo(Integer i) {}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
class NonStaticInner3 {
|
||||
class Foo {
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
import java.util.function.Consumer;
|
||||
|
||||
enum E {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
class Example {
|
||||
class Bar {
|
||||
void foo() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
import java.util.function.Predicate;
|
||||
|
||||
class Bar extends Random {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
public class IDEA100452 {
|
||||
public static <T> MatchOp<T> match(MatchOp.MatchKind matchKind) {
|
||||
class MatchSink extends BooleanTerminalSink<T> {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
class Example extends O {
|
||||
|
||||
void m(Runnable r) {}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
class Example {
|
||||
public void m() {
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference (may change semantics)" "true"
|
||||
// "Replace lambda with method reference (may change semantics)" "true-preview"
|
||||
class Example {
|
||||
public void m() {
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
class Example {
|
||||
public static void m() {
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
import java.util.Objects;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
class Example {
|
||||
interface Jjj {
|
||||
int[] jjj(int p);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference (may change semantics)" "true"
|
||||
// "Replace lambda with method reference (may change semantics)" "true-preview"
|
||||
import java.util.*;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
class Example {
|
||||
interface I {
|
||||
void foo(Example e);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
import java.util.List;
|
||||
|
||||
class Test{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
class Example {
|
||||
interface I {
|
||||
void foo(int i);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
import java.util.function.IntBinaryOperator;
|
||||
|
||||
class Bar {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
class Bar {
|
||||
interface Foo {
|
||||
int sum(Byte b1, Byte b2);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
import java.util.function.LongBinaryOperator;
|
||||
|
||||
class Bar {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
import java.util.function.BiFunction;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
class Example {
|
||||
public void m(String... s) {
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
import java.util.function.Function;
|
||||
|
||||
class Example {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
class Example {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
import java.util.function.Function;
|
||||
class Bar {
|
||||
Function<Class<?> , String> s = Class::getCanonicalName;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
import java.util.Random;
|
||||
import java.util.function.Function;
|
||||
class Bar extends Random {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
import java.util.Random;
|
||||
import java.util.function.Function;
|
||||
class Bar extends Random {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
interface I {
|
||||
String foo(Foo i);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
interface I {
|
||||
String foo(Foo i);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
interface I {
|
||||
String foo(Foo i);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
import java.io.PrintStream;
|
||||
import java.util.function.BiConsumer;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
class Example {
|
||||
interface I {
|
||||
String foo(Integer i);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
class Example {
|
||||
static void foo() {
|
||||
Ar<String> a = p -> new <caret>String[p];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
class Example {
|
||||
{
|
||||
long[][] avg = collect((int i) -> new <caret>long[i][]);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
class Example {
|
||||
static void foo() {
|
||||
Ar<String> a = p -> p.c<caret>lone();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
import java.util.function.Function;
|
||||
|
||||
class Bar extends Random {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
import java.util.function.Function;
|
||||
|
||||
class Bar extends Random {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
class Example {
|
||||
public void m() {
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
class StaticInner {
|
||||
|
||||
static class Inner {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
class MyTest2<X> {
|
||||
MyTest2(X x) {
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
class NonStaticInner3 {
|
||||
class Foo {
|
||||
Foo(Integer i) {}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
class NonStaticInner3 {
|
||||
class Foo {
|
||||
Foo(Integer i) {}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
class NonStaticInner3 {
|
||||
class Foo {
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
import java.util.function.Consumer;
|
||||
|
||||
enum E {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
class Example {
|
||||
class Bar {
|
||||
void foo() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
import java.util.function.Predicate;
|
||||
|
||||
class Bar extends Random {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
public class IDEA100452 {
|
||||
public static <T> MatchOp<T> match(MatchOp.MatchKind matchKind) {
|
||||
class MatchSink extends BooleanTerminalSink<T> {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
class Example extends O {
|
||||
|
||||
void m(Runnable r) {}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
class Example {
|
||||
public void m() {
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference (may change semantics)" "true"
|
||||
// "Replace lambda with method reference (may change semantics)" "true-preview"
|
||||
class Example {
|
||||
public void m() {
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
class Example {
|
||||
public static void m() {
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
import java.util.function.Predicate;
|
||||
|
||||
class Bar extends Random {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
class Example {
|
||||
interface Jjj {
|
||||
int[] jjj(int p);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference (may change semantics)" "true"
|
||||
// "Replace lambda with method reference (may change semantics)" "true-preview"
|
||||
import java.util.*;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
class Example {
|
||||
interface I {
|
||||
void foo(Example e);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
import java.util.List;
|
||||
|
||||
class Test{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
class Example {
|
||||
interface I {
|
||||
void foo(int i);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
import java.util.function.IntBinaryOperator;
|
||||
|
||||
class Bar {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
class Bar {
|
||||
interface Foo {
|
||||
int sum(Byte b1, Byte b2);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
import java.util.function.LongBinaryOperator;
|
||||
|
||||
class Bar {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
import java.util.function.BiFunction;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
class Example {
|
||||
public void m(String... s) {
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
import java.util.function.Function;
|
||||
|
||||
class Example {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
class Example {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "true-preview"
|
||||
import java.util.function.Function;
|
||||
class Bar {
|
||||
Function<Class<?> , String> s = (c) -> c.getCanonica<caret>lName();
|
||||
|
||||
Reference in New Issue
Block a user