blob: c616cae3707116d888657e620044978df46257e8 [file] [log] [blame]
package com.siyeh.igtest.bugs;
public class ForLoopThatDoesntUseLoopVariableInspection
{
public ForLoopThatDoesntUseLoopVariableInspection()
{
}
private void foo() throws Exception
{
int j = 0;
for(int i = 0; j < 100; i++)
{
System.out.println("i" + i);
if(bar())
break;
}
for(int i = 0; i < 100; j++)
{
System.out.println("i" + i);
if(bar())
break;
}
for(int i = 0; j < 100; j++)
{
System.out.println("i" + i);
if(bar())
break;
}
for(int i = 0, k = 0; j < 100; j++)
{
System.out.println("i" + i);
if(bar())
break;
}
for(int i = 0; i < 100; i++)
{
System.out.println("i" + i);
if(bar())
break;
}
}
private boolean bar()
{
return true;
}
}