• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pmd / pmd / #3722

pending completion
#3722

push

github actions

adangel
Suppress MissingOverride for Chars::isEmpty (#4291)

67270 of 127658 relevant lines covered (52.7%)

0.53 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

88.24
/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/symbols/internal/asm/MethodInfoVisitor.java
1
/*
2
 * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3
 */
4

5
package net.sourceforge.pmd.lang.java.symbols.internal.asm;
6

7

8
import org.objectweb.asm.AnnotationVisitor;
9
import org.objectweb.asm.MethodVisitor;
10
import org.objectweb.asm.TypePath;
11

12
import net.sourceforge.pmd.lang.java.symbols.SymbolicValue;
13

14
class MethodInfoVisitor extends MethodVisitor {
15

16
    private final ExecutableStub execStub;
17
    private SymbolicValue defaultAnnotValue;
18

19
    MethodInfoVisitor(ExecutableStub execStub) {
20
        super(AsmSymbolResolver.ASM_API_V);
1✔
21
        this.execStub = execStub;
1✔
22
    }
1✔
23
    
24
    @Override
25
    public AnnotationVisitor visitAnnotationDefault() {
26
        return new SymbolicValueBuilder(execStub.getResolver()) {
1✔
27
            @Override
28
            protected void acceptValue(String name, SymbolicValue v) {
29
                defaultAnnotValue = v;
1✔
30
            }
1✔
31
        };
32
    }
33

34
    @Override
35
    public AnnotationVisitor visitParameterAnnotation(int parameter, String descriptor, boolean visible) {
36
        return new SymbolicValueBuilder(execStub.getResolver()) {
1✔
37
            private final SymbolicAnnotationImpl annot = new SymbolicAnnotationImpl(getResolver(), visible, descriptor);
1✔
38

39
            @Override
40
            protected void acceptValue(String name, SymbolicValue v) {
41
                annot.addAttribute(name, v);
×
42
            }
×
43

44
            @Override
45
            public void visitEnd() {
46
                execStub.addParameterAnnotation(parameter, annot);
1✔
47
            }
1✔
48
        };
49
    }
50

51
    @Override
52
    public void visitEnd() {
53
        execStub.setDefaultAnnotValue(defaultAnnotValue);
1✔
54
        super.visitEnd();
1✔
55
    }
1✔
56

57
    @Override
58
    public AnnotationVisitor visitAnnotation(String descriptor, boolean visible) {
59
        return new AnnotationBuilderVisitor(execStub, execStub.getResolver(), visible, descriptor);
1✔
60
    }
61

62
    @Override
63
    public AnnotationVisitor visitTypeAnnotation(int typeRef, TypePath typePath, String descriptor, boolean visible) {
64
        return new AnnotationBuilderVisitor.TypeAnnotBuilderImpl(execStub.getResolver(), execStub, typeRef, typePath, visible, descriptor);
1✔
65
    }
66

67
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc