diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2012-11-17 19:12:01 +0100 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2012-11-17 19:12:01 +0100 |
commit | 58851b4c6e96a51d1ac298c7ed85efac6ffe8335 (patch) | |
tree | b0ca24a4b8d5c04d70ada3bebb2308f3c74160b3 /src/core/lombok/Cleanup.java | |
parent | e95bb83e06510af7e68fc3eb38163522d6f75bce (diff) | |
download | lombok-58851b4c6e96a51d1ac298c7ed85efac6ffe8335.tar.gz lombok-58851b4c6e96a51d1ac298c7ed85efac6ffe8335.tar.bz2 lombok-58851b4c6e96a51d1ac298c7ed85efac6ffe8335.zip |
Updated the javadoc of each and every feature annotation that lombok has:
* Removed most documentation and instead put in a link to the much more up to date and extensive documentation at http://projectlombok.org/features
* Getting ahead of ourselves a little, added notes on onConstructor/onParam/onMethod which we are about to add in the next few commits.
* Updated copyrights to 2012.
Diffstat (limited to 'src/core/lombok/Cleanup.java')
-rw-r--r-- | src/core/lombok/Cleanup.java | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/core/lombok/Cleanup.java b/src/core/lombok/Cleanup.java index 7c849038..eb223958 100644 --- a/src/core/lombok/Cleanup.java +++ b/src/core/lombok/Cleanup.java @@ -31,6 +31,8 @@ import java.lang.annotation.Target; * of what happens. Implemented by wrapping all statements following the local variable declaration to the * end of your scope into a try block that, as a finally action, closes the resource. * <p> + * Complete documentation is found at <a href="http://projectlombok.org/features/Cleanup.html">the project lombok features page for @Cleanup</a>. + * <p> * Example: * <pre> * public void copyFile(String in, String out) throws IOException { @@ -59,20 +61,13 @@ import java.lang.annotation.Target; * outStream.write(b, 0, r); * } * } finally { - * out.close(); + * if (out != null) out.close(); * } * } finally { - * in.close(); + * if (in != null) in.close(); * } * } * </pre> - * - * Note that the final close method call, if it throws an exception, will overwrite any exception thrown - * in the main body of the generated try block. You should NOT rely on this behaviour - future versions of - * lombok intend to silently swallow any exception thrown by the cleanup method <i>_IF</i> the main body - * throws an exception as well, as the earlier exception is usually far more useful. - * <p> - * However, in java 1.6, generating the code to do this is prohibitively complicated. */ @Target(ElementType.LOCAL_VARIABLE) @Retention(RetentionPolicy.SOURCE) |