aboutsummaryrefslogtreecommitdiff
path: root/usage_examples/SneakyThrowsExample_pre.jpage
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@tipit.to>2009-07-18 02:52:43 +0200
committerReinier Zwitserloot <reinier@tipit.to>2009-07-18 02:52:43 +0200
commit932e185045e9b44b66150ec11d055502ace26435 (patch)
treedb3c3182412e79a4814fa5b7f94404fff1d48540 /usage_examples/SneakyThrowsExample_pre.jpage
parentbc35f73ae80802ab6758509481dacd66c5dc3285 (diff)
downloadlombok-932e185045e9b44b66150ec11d055502ace26435.tar.gz
lombok-932e185045e9b44b66150ec11d055502ace26435.tar.bz2
lombok-932e185045e9b44b66150ec11d055502ace26435.zip
Added SneakyThrows which finishes the documentation for the features pages.
Diffstat (limited to 'usage_examples/SneakyThrowsExample_pre.jpage')
-rw-r--r--usage_examples/SneakyThrowsExample_pre.jpage13
1 files changed, 13 insertions, 0 deletions
diff --git a/usage_examples/SneakyThrowsExample_pre.jpage b/usage_examples/SneakyThrowsExample_pre.jpage
new file mode 100644
index 00000000..be6d72d5
--- /dev/null
+++ b/usage_examples/SneakyThrowsExample_pre.jpage
@@ -0,0 +1,13 @@
+import lombok.SneakyThrows;
+
+public class SneakyThrowsExample implements Runnable {
+ @SneakyThrows(UnsupportedEncodingException.class)
+ public String utf8ToString(byte[] bytes) {
+ return new String(bytes, "UTF-8");
+ }
+
+ @SneakyThrows
+ public void run() {
+ throw new Throwable();
+ }
+}