• 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

77.78
/src/main/java/com/meterware/httpunit/dom/ProcessingInstructionImpl.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 org.w3c.dom.DOMException;
11
import org.w3c.dom.Node;
12
import org.w3c.dom.ProcessingInstruction;
13

14
/**
15
 * The Class ProcessingInstructionImpl.
16
 */
17
public class ProcessingInstructionImpl extends NodeImpl implements ProcessingInstruction {
1✔
18

19
    /** The Constant serialVersionUID. */
20
    private static final long serialVersionUID = 1L;
21

22
    /** The target. */
23
    private String _target;
24

25
    /** The data. */
26
    private String _data;
27

28
    /**
29
     * Creates the processing impl.
30
     *
31
     * @param ownerDocument
32
     *            the owner document
33
     * @param target
34
     *            the target
35
     * @param data
36
     *            the data
37
     *
38
     * @return the processing instruction
39
     */
40
    public static ProcessingInstruction createProcessingImpl(DocumentImpl ownerDocument, String target, String data) {
41
        ProcessingInstructionImpl instruction = new ProcessingInstructionImpl();
1✔
42
        instruction.initialize(ownerDocument, target, data);
1✔
43
        return instruction;
1✔
44
    }
45

46
    /**
47
     * Initialize.
48
     *
49
     * @param ownerDocument
50
     *            the owner document
51
     * @param target
52
     *            the target
53
     * @param data
54
     *            the data
55
     */
56
    private void initialize(DocumentImpl ownerDocument, String target, String data) {
57
        super.initialize(ownerDocument);
1✔
58
        _target = target;
1✔
59
        _data = data;
1✔
60
    }
1✔
61

62
    /**
63
     * Import node.
64
     *
65
     * @param document
66
     *            the document
67
     * @param processingInstruction
68
     *            the processing instruction
69
     *
70
     * @return the node
71
     */
72
    public static Node importNode(DocumentImpl document, ProcessingInstruction processingInstruction) {
73
        return createProcessingImpl(document, processingInstruction.getTarget(), processingInstruction.getData());
1✔
74
    }
75

76
    @Override
77
    public String getNodeName() {
78
        return _target;
1✔
79
    }
80

81
    @Override
82
    public String getNodeValue() throws DOMException {
83
        return _data;
1✔
84
    }
85

86
    @Override
87
    public void setNodeValue(String string) throws DOMException {
88
        setData(string);
×
89
    }
×
90

91
    @Override
92
    public short getNodeType() {
93
        return PROCESSING_INSTRUCTION_NODE;
1✔
94
    }
95

96
    @Override
97
    public String getTarget() {
98
        return _target;
1✔
99
    }
100

101
    @Override
102
    public String getData() {
103
        return _data;
1✔
104
    }
105

106
    @Override
107
    public void setData(String string) throws DOMException {
108
        _data = string;
×
109
    }
×
110
}
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