From 17bcfda43b9e939ac22d5247ef98905741650432 Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Tue, 2 Nov 2010 20:39:58 +0100 Subject: Issue 154: Add null-check to @Cleanup --- test/transform/resource/after-delombok/CleanupPlain.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'test/transform/resource/after-delombok/CleanupPlain.java') diff --git a/test/transform/resource/after-delombok/CleanupPlain.java b/test/transform/resource/after-delombok/CleanupPlain.java index 35d51543..1a19442f 100644 --- a/test/transform/resource/after-delombok/CleanupPlain.java +++ b/test/transform/resource/after-delombok/CleanupPlain.java @@ -9,10 +9,14 @@ class CleanupPlain { out.flush(); } } finally { - out.close(); + if (out != null) { + out.close(); + } } } finally { - in.close(); + if (in != null) { + in.close(); + } } } } -- cgit