added support for lombok.disablePostCompiler.

This commit is contained in:
Reinier Zwitserloot committed 2013-04-23 03:08:22 +02:00
1 parent e353827f7b
commit fcf98722c0
1 file changed
+3
@@ -330,15 +330,18 @@ public class PatchFixes {
}
public static byte[] runPostCompiler(byte[] bytes, String fileName) {
if (System.getProperty("lombok.disablePostCompiler", null) != null) return bytes;
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));
}