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

hazendaz / httpunit / 755

14 Feb 2026 07:14PM UTC coverage: 80.526%. Remained the same
755

push

github

hazendaz
[ci] Fix badge

3213 of 4105 branches covered (78.27%)

Branch coverage included in aggregate %.

8245 of 10124 relevant lines covered (81.44%)

0.81 hits per line

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

27.78
/src/main/java/com/meterware/httpunit/dom/NodeListImpl.java
1
/*
2
 * SPDX-License-Identifier: MIT
3
 * See LICENSE file for details.
4
 *
5
 * Copyright 2000-2026 Russell Gold
6
 * Copyright 2021-2000 hazendaz
7
 */
8
package com.meterware.httpunit.dom;
9

10
import java.util.List;
11

12
import org.mozilla.javascript.Scriptable;
13
import org.mozilla.javascript.ScriptableObject;
14
import org.w3c.dom.Node;
15
import org.w3c.dom.NodeList;
16

17
/**
18
 * The Class NodeListImpl.
19
 */
20
public class NodeListImpl extends ScriptableObject implements NodeList {
21

22
    /** The Constant serialVersionUID. */
23
    private static final long serialVersionUID = 1L;
24

25
    /** The list. */
26
    private List _list;
27

28
    /**
29
     * Instantiates a new node list impl.
30
     *
31
     * @param list
32
     *            the list
33
     */
34
    public NodeListImpl(List list) {
1✔
35
        _list = list;
1✔
36
    }
1✔
37

38
    @Override
39
    public Node item(int index) {
40
        return (Node) _list.get(index);
1✔
41
    }
42

43
    @Override
44
    public int getLength() {
45
        return _list.size();
1✔
46
    }
47

48
    @Override
49
    public String getClassName() {
50
        return NodeListImpl.class.getName();
×
51
    }
52

53
    @Override
54
    public Object get(String name, Scriptable start) {
55
        if ("length".equals(name)) {
×
56
            return Integer.valueOf(getLength());
×
57
        }
58
        return NOT_FOUND;
×
59
    }
60

61
    @Override
62
    public Object get(int index, Scriptable start) {
63
        if (index < 0 || index >= getLength()) {
×
64
            return NOT_FOUND;
×
65
        }
66
        return item(index);
×
67
    }
68
}
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