diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2013-05-28 13:03:54 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2013-05-30 20:26:20 +0200 |
commit | 7bbb7cf3ca25cb8727a6ec226de1ed1fc5bf47e9 (patch) | |
tree | d0f191ed53996636d86fd8c308337cd64c8bdd7e /src/eclipseAgent | |
parent | b3b91a0ddd1770f8646d27e421e2cfef96940f8f (diff) | |
download | lombok-7bbb7cf3ca25cb8727a6ec226de1ed1fc5bf47e9.tar.gz lombok-7bbb7cf3ca25cb8727a6ec226de1ed1fc5bf47e9.tar.bz2 lombok-7bbb7cf3ca25cb8727a6ec226de1ed1fc5bf47e9.zip |
Fixes for issue 470: VerifyErrors when using @SneakyThrows.
Diffstat (limited to 'src/eclipseAgent')
-rw-r--r-- | src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java | 2 | ||||
-rw-r--r-- | src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java index f9b53e68..8c6011bc 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java +++ b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java @@ -267,7 +267,7 @@ public class EclipsePatcher extends Agent { .build()); } - + private static void patchPostCompileHookEclipse(ScriptManager sm) { sm.addScript(ScriptBuilder.wrapMethodCall() .target(new MethodTarget("org.eclipse.jdt.internal.core.builder.IncrementalImageBuilder", "writeClassFileContents")) diff --git a/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java b/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java index cb3ee817..0002e26e 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java +++ b/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 The Project Lombok Authors. + * Copyright (C) 2010-2013 The Project Lombok Authors. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -329,19 +329,16 @@ public class PatchFixes { return newSimpleNames; } - public static byte[] runPostCompiler(byte[] bytes, String fileName) { - if (System.getProperty("lombok.disablePostCompiler", null) != null) return bytes; + public static byte[] runPostCompiler(byte[] bytes, String fileName) { byte[] transformed = PostCompiler.applyTransformations(bytes, fileName, DiagnosticsReceiver.CONSOLE); return transformed == null ? bytes : transformed; } public static OutputStream runPostCompiler(OutputStream out) throws IOException { - if (System.getProperty("lombok.disablePostCompiler", null) != null) return out; return PostCompiler.wrapOutputStream(out, "TEST", DiagnosticsReceiver.CONSOLE); } public static BufferedOutputStream runPostCompiler(BufferedOutputStream out, String path, String name) throws IOException { - if (System.getProperty("lombok.disablePostCompiler", null) != null) return out; String fileName = path + "/" + name; return new BufferedOutputStream(PostCompiler.wrapOutputStream(out, fileName, DiagnosticsReceiver.CONSOLE)); } |