mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-18 12:31:26 +07:00
redundant cast inside conditional when opposite has another type
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
// "Replace with lambda" "true"
|
||||
class Test {
|
||||
{
|
||||
Object r = b ? (Runnable) () -> {
|
||||
} : null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Replace with lambda" "true"
|
||||
class Test {
|
||||
{
|
||||
Runnable r = b ? () -> {
|
||||
} : null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Replace with lambda" "true"
|
||||
class Test {
|
||||
{
|
||||
Runnable r = b ? (IRunnable) () -> {
|
||||
} : null;
|
||||
}
|
||||
|
||||
interface IRunnable extends Runnable {}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Replace with lambda" "true"
|
||||
class Test {
|
||||
{
|
||||
Object r = b ? new Runna<caret>ble() {
|
||||
@Override
|
||||
public void run() {
|
||||
}
|
||||
} : null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Replace with lambda" "true"
|
||||
class Test {
|
||||
{
|
||||
Runnable r = b ? new Runna<caret>ble() {
|
||||
@Override
|
||||
public void run() {
|
||||
}
|
||||
} : null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// "Replace with lambda" "true"
|
||||
class Test {
|
||||
{
|
||||
Runnable r = b ? new IRunna<caret>ble() {
|
||||
@Override
|
||||
public void run() {
|
||||
}
|
||||
} : null;
|
||||
}
|
||||
|
||||
interface IRunnable extends Runnable {}
|
||||
}
|
||||
Reference in New Issue
Block a user