diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2012-04-23 23:36:09 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2012-04-23 23:36:09 +0200 |
commit | 0268a9f02075d0aff3099e721a99956dbc715f6e (patch) | |
tree | 9701612451f2937ec12f436cda32955126886fb0 /src/core | |
parent | b5625e5698ae8c584032730aaa332f5198d80245 (diff) | |
download | lombok-0268a9f02075d0aff3099e721a99956dbc715f6e.tar.gz lombok-0268a9f02075d0aff3099e721a99956dbc715f6e.tar.bz2 lombok-0268a9f02075d0aff3099e721a99956dbc715f6e.zip |
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.
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java | 4 | ||||
-rw-r--r-- | src/core/lombok/javac/JavacResolution.java | 4 |
2 files changed, 4 insertions, 4 deletions
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; |