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

pmd / pmd / 277

27 Nov 2025 01:37PM UTC coverage: 78.778% (+0.03%) from 78.749%
277

push

github

adangel
[java] UseArraysAsList: skip when if-statements (#6228)

18419 of 24233 branches covered (76.01%)

Branch coverage included in aggregate %.

40090 of 50038 relevant lines covered (80.12%)

0.81 hits per line

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

0.0
/pmd-core/src/main/java/net/sourceforge/pmd/lang/symboltable/ImageFinderFunction.java
1
/*
2
 * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3
 */
4

5
package net.sourceforge.pmd.lang.symboltable;
6

7
import java.util.Collections;
8
import java.util.HashSet;
9
import java.util.List;
10
import java.util.Set;
11
import java.util.function.Predicate;
12

13
/**
14
 * @deprecated Since 7.19.0. For more info, see {@link net.sourceforge.pmd.lang.symboltable}.
15
 */
16
@Deprecated
17
public class ImageFinderFunction implements Predicate<NameDeclaration> {
18

19
    private final Set<String> images;
20
    private NameDeclaration decl;
21

22
    public ImageFinderFunction(String img) {
×
23
        images = Collections.singleton(img);
×
24
    }
×
25

26
    public ImageFinderFunction(List<String> imageList) {
×
27
        images = new HashSet<>(imageList);
×
28
    }
×
29

30
    @Override
31
    public boolean test(NameDeclaration nameDeclaration) {
32
        if (images.contains(nameDeclaration.getImage())) {
×
33
            decl = nameDeclaration;
×
34
            return false;
×
35
        }
36
        return true;
×
37
    }
38

39
    public NameDeclaration getDecl() {
40
        return this.decl;
×
41
    }
42
}
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