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

hazendaz / sitemesh2 / 59

22 Mar 2026 02:30AM UTC coverage: 40.347%. Remained the same
59

push

github

hazendaz
[mvn] Update maven wrapper

698 of 1891 branches covered (36.91%)

Branch coverage included in aggregate %.

1555 of 3693 relevant lines covered (42.11%)

0.42 hits per line

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

0.0
/src/main/java/com/opensymphony/module/sitemesh/filter/RequestDispatcherWrapper.java
1
/*
2
 * SPDX-License-Identifier: Apache-2.0
3
 * Copyright 2011-2026 Hazendaz
4
 */
5
/* This software is published under the terms of the OpenSymphony Software
6
 * License version 1.1, of which a copy has been included with this
7
 * distribution in the LICENSE.txt file. */
8
package com.opensymphony.module.sitemesh.filter;
9

10
import jakarta.servlet.RequestDispatcher;
11
import jakarta.servlet.ServletException;
12
import jakarta.servlet.ServletRequest;
13
import jakarta.servlet.ServletResponse;
14

15
import java.io.IOException;
16

17
/**
18
 * Special request dispatcher that will include when an inline decorator includes a resource that uses an internal
19
 * forward.
20
 *
21
 * @author <a href="mailto:joeo@enigmastation.com">Joseph B. Ottinger</a>
22
 *
23
 * @see com.opensymphony.module.sitemesh.taglib.page.ApplyDecoratorTag
24
 */
25
public class RequestDispatcherWrapper implements RequestDispatcher {
26

27
    /** The rd. */
28
    private RequestDispatcher rd;
29

30
    /** The done. */
31
    private boolean done;
32

33
    /**
34
     * Instantiates a new request dispatcher wrapper.
35
     *
36
     * @param rd
37
     *            the rd
38
     */
39
    public RequestDispatcherWrapper(RequestDispatcher rd) {
×
40
        this.rd = rd;
×
41
    }
×
42

43
    @Override
44
    public void forward(ServletRequest servletRequest, ServletResponse servletResponse)
45
            throws ServletException, IOException {
46
        if (done) {
×
47
            throw new IllegalStateException("Response has already been committed");
×
48
        }
49
        include(servletRequest, servletResponse);
×
50
        done = true;
×
51
    }
×
52

53
    @Override
54
    public void include(ServletRequest servletRequest, ServletResponse servletResponse)
55
            throws ServletException, IOException {
56
        if (done) {
×
57
            throw new IllegalStateException("Response has already been committed");
×
58
        }
59
        rd.include(servletRequest, servletResponse);
×
60
    }
×
61
}
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