aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-delombok/CleanupPlain.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2011-03-18 19:30:02 +0100
committerReinier Zwitserloot <reinier@zwitserloot.com>2011-03-18 19:30:02 +0100
commit04e9397971d3689e0710df026f673f8b0a6cb685 (patch)
tree3ca47a3bc926a5171f5e939743f6b2d3daea63e1 /test/transform/resource/after-delombok/CleanupPlain.java
parent38b4128f899e81d8a5d19dca8b6cd1357ca3bd1a (diff)
downloadlombok-04e9397971d3689e0710df026f673f8b0a6cb685.tar.gz
lombok-04e9397971d3689e0710df026f673f8b0a6cb685.tar.bz2
lombok-04e9397971d3689e0710df026f673f8b0a6cb685.zip
Rewritten @Cleanup's new null analysis prevention to not use
Lombok.preventNullAnalysis but go with Collections.singletonList(expr).get(0) instead; while this does create a pointless object, it doesn't cause a clash when eclipse has lombok 0.10 installed but the project uses 0.9, which doesn't have preventNullAnalysis. Eventually, once 0.9 is long forgotten, this can be reverted.
Diffstat (limited to 'test/transform/resource/after-delombok/CleanupPlain.java')
-rw-r--r--test/transform/resource/after-delombok/CleanupPlain.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/transform/resource/after-delombok/CleanupPlain.java b/test/transform/resource/after-delombok/CleanupPlain.java
index 67c82f60..f91f35ee 100644
--- a/test/transform/resource/after-delombok/CleanupPlain.java
+++ b/test/transform/resource/after-delombok/CleanupPlain.java
@@ -9,12 +9,12 @@ class CleanupPlain {
out.flush();
}
} finally {
- if (lombok.Lombok.preventNullAnalysis(out) != null) {
+ if (java.util.Collections.singletonList(out).get(0) != null) {
out.close();
}
}
} finally {
- if (lombok.Lombok.preventNullAnalysis(in) != null) {
+ if (java.util.Collections.singletonList(in).get(0) != null) {
in.close();
}
}