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

hazendaz / httpunit / 656

06 Dec 2025 09:11PM UTC coverage: 80.452% (+0.02%) from 80.435%
656

push

github

hazendaz
[maven-release-plugin] prepare for next development iteration

3213 of 4105 branches covered (78.27%)

Branch coverage included in aggregate %.

8245 of 10137 relevant lines covered (81.34%)

0.81 hits per line

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

55.56
/src/main/java/com/meterware/httpunit/AppletStubImpl.java
1
/*
2
 * MIT License
3
 *
4
 * Copyright 2011-2025 Russell Gold
5
 *
6
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
7
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
8
 * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
9
 * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
10
 *
11
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions
12
 * of the Software.
13
 *
14
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
15
 * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
17
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
18
 * DEALINGS IN THE SOFTWARE.
19
 */
20
package com.meterware.httpunit;
21

22
import java.applet.AppletContext;
23
import java.applet.AppletStub;
24
import java.net.URL;
25

26
/**
27
 * The Class AppletStubImpl.
28
 */
29
class AppletStubImpl implements AppletStub {
30

31
    /** The web applet. */
32
    private WebApplet _webApplet;
33

34
    /**
35
     * Instantiates a new applet stub impl.
36
     *
37
     * @param webApplet
38
     *            the web applet
39
     */
40
    AppletStubImpl(WebApplet webApplet) {
1✔
41
        _webApplet = webApplet;
1✔
42
    }
1✔
43

44
    /**
45
     * Determines if the applet is active. An applet is active just before its <code>start</code> method is called. It
46
     * becomes inactive just before its <code>stop</code> method is called.
47
     *
48
     * @return <code>true</code> if the applet is active; <code>false</code> otherwise.
49
     */
50
    @Override
51
    public boolean isActive() {
52
        return false;
×
53
    }
54

55
    /**
56
     * Returns an absolute URL naming the directory of the document in which the applet is embedded. For example,
57
     * suppose an applet is contained within the document: <blockquote>
58
     *
59
     * <pre>
60
     *    http://java.sun.com/products/jdk/1.2/index.html
61
     * </pre>
62
     *
63
     * </blockquote> The document base is: <blockquote>
64
     *
65
     * <pre>
66
     *    http://java.sun.com/products/jdk/1.2/
67
     * </pre>
68
     *
69
     * </blockquote>
70
     *
71
     * @return the {@link URL} of the document that contains this applet.
72
     *
73
     * @see AppletStub#getCodeBase()
74
     */
75
    @Override
76
    public URL getDocumentBase() {
77
        return null;
×
78
    }
79

80
    /**
81
     * Gets the base URL.
82
     *
83
     * @return the <code>URL</code> of the applet.
84
     */
85
    @Override
86
    public URL getCodeBase() {
87
        return null;
×
88
    }
89

90
    /**
91
     * Returns the value of the named parameter in the HTML tag. For example, if an applet is specified as <blockquote>
92
     *
93
     * <pre>
94
     * &lt;applet code="Clock" width=50 height=50&gt;
95
     * &lt;param name=Color value="blue"&gt;
96
     * &lt;/applet&gt;
97
     * </pre>
98
     *
99
     * </blockquote>
100
     * <p>
101
     * then a call to <code>getParameter("Color")</code> returns the value <code>"blue"</code>.
102
     *
103
     * @param name
104
     *            a parameter name.
105
     *
106
     * @return the value of the named parameter, or <tt>null</tt> if not set.
107
     */
108
    @Override
109
    public String getParameter(String name) {
110
        return _webApplet.getParameter(name);
1✔
111
    }
112

113
    /**
114
     * Gets a handler to the applet's context.
115
     *
116
     * @return the applet's context.
117
     */
118
    @Override
119
    public AppletContext getAppletContext() {
120
        return new AppletContextImpl(_webApplet);
1✔
121
    }
122

123
    /**
124
     * Called when the applet wants to be resized.
125
     *
126
     * @param width
127
     *            the new requested width for the applet.
128
     * @param height
129
     *            the new requested height for the applet.
130
     */
131
    @Override
132
    public void appletResize(int width, int height) {
133
    }
×
134
}
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