1 /* 2 ModifiedControlVariable 3 skipEnhancedForLoopVariable = true 4 5 6 */ 7 8 package com.puppycrawl.tools.checkstyle.checks.coding.modifiedcontrolvariable; 9 10 public class InputModifiedControlVariableEnhancedForLoopVariable2 { 11 void m(int[] a) { 12 for (int i = 0, j = 1; ; i++, j++) { 13 for (int k : a) { 14 } 15 } 16 } 17 18 void m2(int[] a) { 19 for (int i = 0, j = 1; ; i++, j++) { 20 for (int k : a) { 21 i++; // violation 22 } 23 } 24 } 25 }