diff options
author | modmuss50 <modmuss50@gmail.com> | 2021-11-25 18:53:04 +0000 |
---|---|---|
committer | modmuss50 <modmuss50@gmail.com> | 2021-11-25 18:53:04 +0000 |
commit | 60c908ea1b88e008b776e9f62dc71254aa617e94 (patch) | |
tree | a7386c68327e2d19f7d48752ae332051edda0e83 /src/main/java/net/fabricmc | |
parent | 7b28d61fab89c2a7c89e93f8b36f25b1fb6fc291 (diff) | |
download | architectury-loom-60c908ea1b88e008b776e9f62dc71254aa617e94.tar.gz architectury-loom-60c908ea1b88e008b776e9f62dc71254aa617e94.tar.bz2 architectury-loom-60c908ea1b88e008b776e9f62dc71254aa617e94.zip |
Fix duplicate comments about transitive access wideners. Fixes #544
A more sophisticated fix might be nice, but im not sure it will provide a lot of benefit.
Diffstat (limited to 'src/main/java/net/fabricmc')
-rw-r--r-- | src/main/java/net/fabricmc/loom/configuration/accesswidener/TransitiveAccessWidenerMappingsProcessor.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/net/fabricmc/loom/configuration/accesswidener/TransitiveAccessWidenerMappingsProcessor.java b/src/main/java/net/fabricmc/loom/configuration/accesswidener/TransitiveAccessWidenerMappingsProcessor.java index c96e8141..549200ab 100644 --- a/src/main/java/net/fabricmc/loom/configuration/accesswidener/TransitiveAccessWidenerMappingsProcessor.java +++ b/src/main/java/net/fabricmc/loom/configuration/accesswidener/TransitiveAccessWidenerMappingsProcessor.java @@ -139,7 +139,12 @@ public final class TransitiveAccessWidenerMappingsProcessor { comment += "\n"; } - comment += "Access widened by %s to %s".formatted(modId(), access); + String awComment = "Access widened by %s to %s".formatted(modId(), access); + + if (!comment.contains(awComment)) { + // Ensure we don't comment the same thing twice. A bit of a cheap way to do this, but should work ok. + comment += awComment; + } return comment; } |