Issue #1555: Narrow scope of variable

Fixes `TooBroadScope` inspection violations introduced in recent commits.

Description:
>Reports any variable declarations of which the scope can be narrowed. Especially useful for "Pascal style" declarations at the start of a method, but variables with too broad a scope are also often left over after refactorings.
This commit is contained in:
Michal Kordas 2015-09-03 21:57:10 +02:00 committed by Roman Ivanov
parent 2085758156
commit dd7935491a
1 changed files with 1 additions and 1 deletions

View File

@ -163,9 +163,9 @@ public class NewlineAtEndOfFileCheckTest
@Test
public void testWrongFile() throws Exception {
final DefaultConfiguration checkConfig = createCheckConfig(NewlineAtEndOfFileCheck.class);
File impossibleFile = new File("");
NewlineAtEndOfFileCheck check = new NewlineAtEndOfFileCheck();
check.configure(checkConfig);
File impossibleFile = new File("");
Set<LocalizedMessage> messages = check.process(impossibleFile, Lists.newArrayList("txt"));
assertTrue(messages.size() == 1);
Iterator<LocalizedMessage> iter = messages.iterator();