Community
Participate
Working Groups
BETA_JAVA7 class Test{ public static void main(String[] args) throws IOException { try (FileInputStream fis = new FileInputStream("")) { FileInputStream fis2 = fis; } } } right click on fis> refactor> Inline.. You get class Test{ public static void main(String[] args) throws IOException { try (FileInputStream) { FileInputStream fis2 = new FileInputStream(""); } } } (My use case was: try (FileInputStream fis = new FileInputStream(""); FileInputStream fis2 = fis) { ... } and i was only using fis2 in the the try block, so thought of inlining fis)
Fix is part of the patch in bug 352445 comment 4.
Verified for Juno M1 with 4.2 build I20110729-0200.