mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-13 09:19:13 +07:00
Java: Improved inspection "Join Declaration And Assignment" - handle C-style array declarations (IDEA-177132)
This commit is contained in:
+6
@@ -0,0 +1,6 @@
|
||||
// "Join declaration and assignment" "GENERIC_ERROR_OR_WARNING"
|
||||
class Test {
|
||||
{
|
||||
int[] a = new int[0];
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
class Test {
|
||||
{
|
||||
// comment A
|
||||
/*comment B*/ /*comment 1*/ /*comment 2*/ /*comment 3*/ // comment 4
|
||||
/*comment B*/ // comment 4
|
||||
/*comment C*/
|
||||
/*comment E*/
|
||||
String ss = "hello" + /*comment D*/ " world"; // comment F
|
||||
String /*comment 1*/ ss /*comment 2*/ /*comment 3*/ = "hello" + /*comment D*/ " world"; // comment F
|
||||
}
|
||||
}
|
||||
+1
-3
@@ -5,10 +5,8 @@ class C {
|
||||
bar();
|
||||
// comment A
|
||||
/*comment B*/
|
||||
/*comment 2*/
|
||||
/*comment 3*/
|
||||
//comment 4
|
||||
int n = 1; // comment C
|
||||
int /*comment 2*/ n /*comment 3*/ = 1; // comment C
|
||||
}
|
||||
void bar(){}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Join declaration and assignment" "GENERIC_ERROR_OR_WARNING"
|
||||
class Test {
|
||||
{
|
||||
int a[];
|
||||
<caret>a = new int[0];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user