1 /* 2 OneStatementPerLine 3 treatTryResourcesAsStatement = true 4 5 6 */ 7 8 package com.puppycrawl.tools.checkstyle.checks.coding.onestatementperline; 9 10 import java.io.*; 11 12 13 public class InputOneStatementPerLineBeginTreeLastVariableResourcesStatementEnd1 { 14 public void resourceListExists() throws IOException { 15 try (FileInputStream f1 = new FileInputStream("1"); FileInputStream f2 = 16 new FileInputStream("2")) { // violation above 'Only one .* per line allowed' 17 } 18 } 19 }