fixed #799
authormplushnikov <michail.plushnikov@interhyp.de>
Mon, 5 Oct 2020 19:15:13 +0000 (21:15 +0200)
committerintellij-monorepo-bot <intellij-monorepo-bot-no-reply@jetbrains.com>
Mon, 5 Oct 2020 19:15:13 +0000 (22:15 +0300)
added changelog

GitOrigin-RevId: 813bf002109f10d29ecfda9d1e5950fa67e65841

plugins/lombok/parts/pluginChanges.html
plugins/lombok/src/main/resources/messages/lombokBundle.properties
plugins/lombok/test-manual/src/main/java/de/plushnikov/sneakythrows/Issue394.java
plugins/lombok/test-manual/src/main/java/de/plushnikov/sneakythrows/Issue799.java [new file with mode: 0644]

index b23c9ef42f3ebbabf6e5acee61116001acd94df4..48391a24446fcf3185ed0037e51cd825f471d90c 100644 (file)
@@ -1,6 +1,9 @@
 <ul>
   <li>0.33
     <ol>
+      <li>Fixed #799: @SneakyThrows mistakenly swallow checked exception in lambda without "throws", thanks to
+        @Lekanich (Aleksandr Zhelezniak)
+      </li>
       <li>Fixed #838: @Builder.Default and final keyword: erroneous ConstantConditions warning, thanks to
         @Lekanich (Aleksandr Zhelezniak)
       </li>
index e52fdff691ed8f25f4097e1f407c48d420aa299b..9776477dd6ab2b3d92cd5036e11f7f2a391b65c6 100644 (file)
@@ -17,6 +17,7 @@ daemon.donate.title=Lombok support plugin updated to v{0}
 daemon.donate.content=<br/>\
 Helpful? <b><a href="https://www.paypal.me/mplushnikov">Donate with PayPal</a></b><br/><br/>\
 Fixes:<br/>\
+- Fixed (<a href="https://github.com/mplushnikov/lombok-intellij-plugin/issues/799">#799</a>): @SneakyThrows mistakenly swallow checked exception in lambda without "throws", PR by @Lekanich <br/>\
 - Fixed (<a href="https://github.com/mplushnikov/lombok-intellij-plugin/issues/838">#838</a>): @Builder.Default and final keyword: erroneous ConstantConditions warning, PR by @Lekanich <br/>\
 - Fixed (<a href="https://github.com/mplushnikov/lombok-intellij-plugin/issues/938">#938</a>): @SneakyThrows hides compilation error: Variable might not have been not initialized, PR by @Lekanich<br/>\
   <br>\
index 5ec6600981bfcc6a6763b19c6f4e1d3d17fb3873..f21b2cadd947024d761acdf62066dbe67515ec11 100644 (file)
@@ -1,7 +1,5 @@
 package de.plushnikov.sneakythrows;
 
-import lombok.SneakyThrows;
-
 import java.io.File;
 
 public class Issue394 {
diff --git a/plugins/lombok/test-manual/src/main/java/de/plushnikov/sneakythrows/Issue799.java b/plugins/lombok/test-manual/src/main/java/de/plushnikov/sneakythrows/Issue799.java
new file mode 100644 (file)
index 0000000..65ced7b
--- /dev/null
@@ -0,0 +1,21 @@
+package de.plushnikov.sneakythrows;
+
+import lombok.SneakyThrows;
+
+import java.io.IOException;
+
+public class Issue799 {
+
+  public static void f() {
+    Runnable runnable = () -> {
+      throw new IOException("error");
+    };
+  }
+
+  @SneakyThrows
+  public static void g() {
+    Runnable runnable = () -> {
+      throw new IOException("error");
+    };
+  }
+}