From 7019e1ada693422197ee58bc7493e1487b8835c7 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Sun, 21 May 2017 00:16:23 +0300 Subject: [PATCH] Workaround for bug in ASM which adds java/lang/Synthetic annotation twice. Should fix #278 --- core/src/main/java/org/teavm/parsing/Parser.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/src/main/java/org/teavm/parsing/Parser.java b/core/src/main/java/org/teavm/parsing/Parser.java index 04c7f48e5..ed6686661 100644 --- a/core/src/main/java/org/teavm/parsing/Parser.java +++ b/core/src/main/java/org/teavm/parsing/Parser.java @@ -343,6 +343,11 @@ public class Parser { desc = desc.substring(1, desc.length() - 1); } desc = desc.replace('/', '.'); + + if (annotations.get(desc) != null) { + continue; + } + AnnotationHolder annot = new AnnotationHolder(desc); parseAnnotationValues(annot, annotNode.values); annotations.add(annot);