From 0268a9f02075d0aff3099e721a99956dbc715f6e Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Mon, 23 Apr 2012 23:36:09 +0200 Subject: Replaced the 'try some reflection and if that fails, oh well' code with catch(Throwable) instead of catch(Exception). The whole point is to default to an alternative path is anything goes wrong, and it turns out there are various ways to get Throwables instead of Exceptions. --- src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java | 4 ++-- src/core/lombok/javac/JavacResolution.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/core') diff --git a/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java b/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java index c15c758e..4cf64a14 100644 --- a/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java +++ b/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java @@ -1421,12 +1421,12 @@ public class EclipseHandlerUtil { Method intLiteralFactoryMethod_ = null; try { intLiteralConstructor_ = IntLiteral.class.getConstructor(parameterTypes); - } catch (Exception ignore) { + } catch (Throwable ignore) { // probably eclipse 3.7++ } try { intLiteralFactoryMethod_ = IntLiteral.class.getMethod("buildIntLiteral", parameterTypes); - } catch (Exception ignore) { + } catch (Throwable ignore) { // probably eclipse versions before 3.7 } intLiteralConstructor = intLiteralConstructor_; diff --git a/src/core/lombok/javac/JavacResolution.java b/src/core/lombok/javac/JavacResolution.java index 4e988183..6da60907 100644 --- a/src/core/lombok/javac/JavacResolution.java +++ b/src/core/lombok/javac/JavacResolution.java @@ -105,7 +105,7 @@ public class JavacResolution { d.setAccessible(true); e.setAccessible(true); f.setAccessible(true); - } catch (Exception x) { + } catch (Throwable x) { z = true; } @@ -114,7 +114,7 @@ public class JavacResolution { h = Log.class.getDeclaredField("deferredDiagnostics"); g.setAccessible(true); h.setAccessible(true); - } catch (Exception x) { + } catch (Throwable x) { } errWriterField = a; -- cgit