disable conversion from anonymous if method has javadoc

This commit is contained in:
Anna Kozlova
2016-05-31 12:49:42 +03:00
parent feb8a473f4
commit a68cb4dfd3
5 changed files with 80 additions and 13 deletions

View File

@@ -0,0 +1,13 @@
// "Replace with lambda" "false"
class Test {
{
Runnable r = new Ru<caret>nnable() {
/**
* important javadoc
*/
@Override
public void run() {
}
};
}
}

View File

@@ -0,0 +1,13 @@
// "Replace with method reference" "true"
class Test {
private void doTest (){}
void foo(Runnable r){}
{
//some comment
foo (this::doTest);
}
}

View File

@@ -0,0 +1,18 @@
// "Replace with method reference" "true"
class Test {
private void doTest (){}
void foo(Runnable r){}
{
foo (new Ru<caret>nnable() {
@Override
public void run() {
//some comment
doTest();
}
});
}
}