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

Waffle / waffle / 6516

11 Mar 2026 12:15AM UTC coverage: 46.217%. Remained the same
6516

push

github

web-flow
Update dependency org.eclipse.jdt:ecj to v3.45.0

276 of 734 branches covered (37.6%)

Branch coverage included in aggregate %.

1019 of 2068 relevant lines covered (49.27%)

1.0 hits per line

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

25.71
/Source/JNA/waffle-tests/src/main/java/waffle/mock/http/SimpleHttpSession.java
1
/*
2
 * SPDX-License-Identifier: MIT
3
 * See LICENSE file for details.
4
 *
5
 * Copyright 2010-2026 The Waffle Project Contributors: https://github.com/Waffle/waffle/graphs/contributors
6
 */
7
package waffle.mock.http;
8

9
import com.google.errorprone.annotations.InlineMe;
10

11
import java.util.Enumeration;
12
import java.util.HashMap;
13
import java.util.Map;
14

15
import javax.servlet.ServletContext;
16
import javax.servlet.http.HttpSession;
17
import javax.servlet.http.HttpSessionContext;
18

19
/**
1✔
20
 * Simple Http Session.
21
 */
22
public class SimpleHttpSession implements HttpSession {
2✔
23

24
    /** The attributes. */
25
    private final Map<String, Object> attributes = new HashMap<>();
1✔
26

1✔
27
    @Override
28
    public Object getAttribute(final String attributeName) {
29
        return this.attributes.get(attributeName);
1✔
30
    }
31

×
32
    @Override
33
    public Enumeration<String> getAttributeNames() {
34
        return null;
×
35
    }
36

×
37
    @Override
38
    public long getCreationTime() {
39
        return 0;
×
40
    }
41

×
42
    @Override
43
    public String getId() {
44
        return null;
×
45
    }
46

×
47
    @Override
48
    public long getLastAccessedTime() {
49
        return 0;
×
50
    }
51

×
52
    @Override
53
    public int getMaxInactiveInterval() {
54
        return 0;
×
55
    }
56

×
57
    @Override
58
    public ServletContext getServletContext() {
59
        return null;
×
60
    }
61

62
    /**
×
63
     * Simply remove this if it is ever actually removed from servlet-api
64
     *
65
     * @deprecated Remove this once servlet does.
66
     */
×
67
    @Deprecated
68
    @InlineMe(replacement = "null")
69
    @Override
70
    public final HttpSessionContext getSessionContext() {
71
        return null;
×
72
    }
×
73

74
    /**
75
     * Simply remove this if it is ever actually removed from servlet-api
76
     *
1✔
77
     * @deprecated Remove this once servlet does.
1✔
78
     */
79
    @Deprecated
80
    @InlineMe(replacement = "null")
81
    @Override
82
    public final Object getValue(final String string) {
×
83
        return null;
×
84
    }
85

86
    /**
87
     * Simply remove this if it is ever actually removed from servlet-api
88
     *
89
     * @deprecated Remove this once servlet does.
90
     */
91
    @Deprecated
92
    @InlineMe(replacement = "new String[0]")
93
    @Override
94
    public final String[] getValueNames() {
95
        return new String[0];
×
96
    }
97

98
    @Override
99
    public void invalidate() {
100
        // Do Nothing
101
    }
×
102

103
    @Override
104
    public boolean isNew() {
105
        return false;
×
106
    }
107

108
    /**
109
     * Simply remove this if it is ever actually removed from servlet-api
110
     *
111
     * @deprecated Remove this once servlet does.
112
     */
113
    @Deprecated
114
    @Override
115
    public void putValue(final String string, final Object object) {
116
        // Do Nothing
117
    }
×
118

119
    @Override
120
    public void removeAttribute(final String attributeName) {
121
        this.attributes.remove(attributeName);
×
122
    }
×
123

124
    /**
125
     * Simply remove this if it is ever actually removed from servlet-api
126
     *
127
     * @deprecated Remove this once servlet does.
128
     */
129
    @Deprecated
130
    @Override
131
    public void removeValue(final String string) {
132
        // Do Nothing
133
    }
×
134

135
    @Override
136
    public void setAttribute(final String attributeName, final Object attributeValue) {
137
        this.attributes.put(attributeName, attributeValue);
1✔
138
    }
1✔
139

140
    @Override
141
    public void setMaxInactiveInterval(final int primativeInt) {
142
        // Do Nothing
143
    }
×
144
}
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