1
2
3
4
5
6
7
8
9
10 package com.puppycrawl.tools.checkstyle.checks.coding.requirethis;
11
12 import java.nio.file.Path;
13 import java.nio.file.Paths;
14
15 public class InputRequireThisFor {
16 private String name;
17 int bottom;
18
19 public void method1() {
20 for (int i = 0; i < 10; i++) {
21 int bottom = i - 4;
22 bottom = bottom > 0 ? bottom - 1 : bottom;
23 }
24 }
25
26 public void method2() {
27 for (String name : new String[]{}) {
28 }
29
30 Path jarfile = Paths.get(name + ".jar");
31 }
32 }