• 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/taglib/decorator/TitleTag.java
1
/*
2
 * SPDX-License-Identifier: Apache-2.0
3
 * Copyright 2011-2026 Hazendaz
4
 */
5
/*
6
 * Title:        TitleTag
7
 * Description:
8
 *
9
 * This software is published under the terms of the OpenSymphony Software
10
 * License version 1.1, of which a copy has been included with this
11
 * distribution in the LICENSE.txt file.
12
 */
13

14
package com.opensymphony.module.sitemesh.taglib.decorator;
15

16
import com.opensymphony.module.sitemesh.taglib.AbstractTag;
17

18
/**
19
 * Write the Page <code>&lt;title&gt;</code> value to out.
20
 *
21
 * @author <a href="joe@truemesh.com">Joe Walnes</a>
22
 *
23
 * @see com.opensymphony.module.sitemesh.HTMLPage#getTitle()
24
 */
25
public class TitleTag extends AbstractTag {
×
26

27
    /** The Constant serialVersionUID. */
28
    private static final long serialVersionUID = 1L;
29

30
    /** The default title. */
31
    private String defaultTitle = null;
×
32

33
    /**
34
     * Value to write if no title is found (optional).
35
     *
36
     * @param defaultTitle
37
     *            the new default
38
     */
39
    public void setDefault(String defaultTitle) {
40
        this.defaultTitle = defaultTitle;
×
41
    }
×
42

43
    @Override
44
    public final int doEndTag() {
45
        try {
46
            String title = getPage().getTitle();
×
47
            if (title == null || title.trim().length() == 0) {
×
48
                title = defaultTitle;
×
49
            }
50
            if (title != null) {
×
51
                getOut().write(title);
×
52
            }
53
        } catch (Exception e) {
×
54
            trace(e);
×
55
        }
×
56
        return EVAL_PAGE;
×
57
    }
58

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