aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorRawi01 <Rawi01@users.noreply.github.com>2020-08-13 09:02:13 +0200
committerRoel Spilker <r.spilker@gmail.com>2020-08-27 22:57:07 +0200
commit0736f291747b1fc4d3ce3b7d9ccbaa129d15ed20 (patch)
tree804331c48c032559bea932eadd645a9d720f8061 /src/core
parent2ac4faf14cfb4e82b771f8691704efd3c36299ea (diff)
downloadlombok-0736f291747b1fc4d3ce3b7d9ccbaa129d15ed20.tar.gz
lombok-0736f291747b1fc4d3ce3b7d9ccbaa129d15ed20.tar.bz2
lombok-0736f291747b1fc4d3ce3b7d9ccbaa129d15ed20.zip
Skip PostCompiler for empty byte arrays
Diffstat (limited to 'src/core')
-rw-r--r--src/core/lombok/core/PostCompiler.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/core/lombok/core/PostCompiler.java b/src/core/lombok/core/PostCompiler.java
index e17f806e..72f4b3a2 100644
--- a/src/core/lombok/core/PostCompiler.java
+++ b/src/core/lombok/core/PostCompiler.java
@@ -72,10 +72,12 @@ public final class PostCompiler {
// no need to call super
byte[] original = toByteArray();
byte[] copy = null;
- try {
- copy = applyTransformations(original, fileName, diagnostics);
- } catch (Exception e) {
- diagnostics.addWarning(String.format("Error during the transformation of '%s'; no post-compilation has been applied", fileName));
+ if (original.length > 0) {
+ try {
+ copy = applyTransformations(original, fileName, diagnostics);
+ } catch (Exception e) {
+ diagnostics.addWarning(String.format("Error during the transformation of '%s'; no post-compilation has been applied", fileName));
+ }
}
if (copy == null) {