diff options
Diffstat (limited to 'test/transform')
8 files changed, 50 insertions, 8 deletions
diff --git a/test/transform/resource/after-delombok/CleanupName.java b/test/transform/resource/after-delombok/CleanupName.java index cd29eb68..0201008e 100644 --- a/test/transform/resource/after-delombok/CleanupName.java +++ b/test/transform/resource/after-delombok/CleanupName.java @@ -4,7 +4,9 @@ class CleanupName { try { System.out.println(o); } finally { - o.toString(); + if (o != null) { + o.toString(); + } } } void test2() { @@ -12,7 +14,9 @@ class CleanupName { try { System.out.println(o); } finally { - o.toString(); + if (o != null) { + o.toString(); + } } } } 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(); + } } } } diff --git a/test/transform/resource/after-delombok/LoggerCommons.java b/test/transform/resource/after-delombok/LoggerCommons.java new file mode 100644 index 00000000..686ab889 --- /dev/null +++ b/test/transform/resource/after-delombok/LoggerCommons.java @@ -0,0 +1,6 @@ +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +class LoggerCommons { + private static final Log log = LogFactory.getLog(LoggerCommons.class); +}
\ No newline at end of file diff --git a/test/transform/resource/after-delombok/LoggerJul.java b/test/transform/resource/after-delombok/LoggerJul.java new file mode 100644 index 00000000..de4ad914 --- /dev/null +++ b/test/transform/resource/after-delombok/LoggerJul.java @@ -0,0 +1,5 @@ +import java.util.logging.Logger; + +class LoggerJul { + private static final Logger log = Logger.getLogger("LoggerJul"); +}
\ No newline at end of file diff --git a/test/transform/resource/after-delombok/LoggerLog4j.java b/test/transform/resource/after-delombok/LoggerLog4j.java new file mode 100644 index 00000000..33f90278 --- /dev/null +++ b/test/transform/resource/after-delombok/LoggerLog4j.java @@ -0,0 +1,5 @@ +import org.apache.log4j.Logger; + +class LoggerLog4j { + private static final Logger log = Logger.getLogger(LoggerLog4j.class); +}
\ No newline at end of file diff --git a/test/transform/resource/after-delombok/LoggerSlf4j.java b/test/transform/resource/after-delombok/LoggerSlf4j.java new file mode 100644 index 00000000..0d7dee22 --- /dev/null +++ b/test/transform/resource/after-delombok/LoggerSlf4j.java @@ -0,0 +1,6 @@ +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +class LoggerLog4j { + private static final Logger log = LoggerFactory.getLogger(LoggerLog4j.class); +}
\ No newline at end of file diff --git a/test/transform/resource/after-ecj/CleanupName.java b/test/transform/resource/after-ecj/CleanupName.java index 944a81e1..4011721b 100644 --- a/test/transform/resource/after-ecj/CleanupName.java +++ b/test/transform/resource/after-ecj/CleanupName.java @@ -10,7 +10,10 @@ class CleanupName { } finally { - o.toString(); + if ((o != null)) + { + o.toString(); + } } } void test2() { @@ -21,7 +24,10 @@ class CleanupName { } finally { - o.toString(); + if ((o != null)) + { + o.toString(); + } } } }
\ No newline at end of file diff --git a/test/transform/resource/after-ecj/CleanupPlain.java b/test/transform/resource/after-ecj/CleanupPlain.java index 6754b4f6..fe8d7571 100644 --- a/test/transform/resource/after-ecj/CleanupPlain.java +++ b/test/transform/resource/after-ecj/CleanupPlain.java @@ -18,12 +18,18 @@ class CleanupPlain { } finally { - out.close(); + if ((out != null)) + { + out.close(); + } } } finally { - in.close(); + if ((in != null)) + { + in.close(); + } } } }
\ No newline at end of file |