mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-10 13:17:09 +07:00
moving tests to CE
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<problems>
|
||||
<problem>
|
||||
<file>Assignment.java</file>
|
||||
<line>4</line>
|
||||
<description>'x' should probably not be assigned to 'y'</description>
|
||||
</problem>
|
||||
</problems>
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
public class Assignment {
|
||||
public void test() {
|
||||
int x = 0, y = 0;
|
||||
y = x;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<problems>
|
||||
<problem>
|
||||
<file>Initializer.java</file>
|
||||
<line>4</line>
|
||||
<description>'x' should probably not be assigned to 'y'</description>
|
||||
</problem>
|
||||
</problems>
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
public class Initializer {
|
||||
public void test() {
|
||||
int x = 0;
|
||||
int y = x;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<problems>
|
||||
<problem>
|
||||
<file>Parameter.java</file>
|
||||
<line>4</line>
|
||||
<description>'startX' should probably not be passed as parameter 'y'</description>
|
||||
</problem>
|
||||
</problems>
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
public class Parameter {
|
||||
public void test() {
|
||||
int startX = 0;
|
||||
method(startX);
|
||||
}
|
||||
|
||||
private void method(int y) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<problems>
|
||||
<problem>
|
||||
<file>ReturnValue.java</file>
|
||||
<line>4</line>
|
||||
<description>'y' should probably not be returned from method 'getX'</description>
|
||||
</problem>
|
||||
</problems>
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
public class ReturnValue {
|
||||
public int getX() {
|
||||
int y=0;
|
||||
return y;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user