• 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/sitemesh/webapp/decorator/NoDecorator.java
1
/*
2
 * SPDX-License-Identifier: Apache-2.0
3
 * Copyright 2011-2026 Hazendaz
4
 */
5
package com.opensymphony.sitemesh.webapp.decorator;
6

7
import com.opensymphony.sitemesh.Content;
8
import com.opensymphony.sitemesh.webapp.SiteMeshWebAppContext;
9

10
import jakarta.servlet.ServletContext;
11
import jakarta.servlet.ServletException;
12
import jakarta.servlet.http.HttpServletRequest;
13
import jakarta.servlet.http.HttpServletResponse;
14

15
import java.io.IOException;
16
import java.io.PrintWriter;
17

18
/**
19
 * If no decorator is to be applied to a page, this will ensure the original content gets written out.
20
 *
21
 * @author Joe Walnes
22
 *
23
 * @since SiteMesh 3.0
24
 */
25
public class NoDecorator extends BaseWebAppDecorator {
×
26

27
    /**
28
     * Render.
29
     *
30
     * @param content
31
     *            the content
32
     * @param request
33
     *            the request
34
     * @param response
35
     *            the response
36
     * @param servletContext
37
     *            the servlet context
38
     * @param webAppContext
39
     *            the web app context
40
     *
41
     * @throws IOException
42
     *             Signals that an I/O exception has occurred.
43
     * @throws ServletException
44
     *             the servlet exception
45
     */
46
    @Override
47
    protected void render(Content content, HttpServletRequest request, HttpServletResponse response,
48
            ServletContext servletContext, SiteMeshWebAppContext webAppContext) throws IOException, ServletException {
49

50
        PrintWriter writer;
51
        if (webAppContext.isUsingStream()) {
×
52
            writer = new PrintWriter(response.getOutputStream());
×
53
        } else {
54
            writer = response.getWriter();
×
55
        }
56
        content.writeOriginal(writer);
×
57
        writer.flush();
×
58
    }
×
59

60
}
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