aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource
diff options
context:
space:
mode:
Diffstat (limited to 'test/transform/resource')
-rw-r--r--test/transform/resource/after-delombok/CleanupName.java8
-rw-r--r--test/transform/resource/after-delombok/CleanupPlain.java8
-rw-r--r--test/transform/resource/after-ecj/CleanupName.java10
-rw-r--r--test/transform/resource/after-ecj/CleanupPlain.java10
4 files changed, 28 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-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