forked from phoedos/pmd
Add another test for variable usage in blocks
This commit is contained in:
@ -37,6 +37,16 @@ public class Foo {
|
||||
String x = 'blah';
|
||||
return [SELECT Id FROM Account WHERE Name = :x];
|
||||
}
|
||||
|
||||
public String usageInBlocks(Boolean y) {
|
||||
String x = 'used variable';
|
||||
|
||||
if (y) {
|
||||
return x;
|
||||
} else {
|
||||
return 'some other string';
|
||||
}
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</code>
|
||||
|
Reference in New Issue
Block a user