Ignore:
Timestamp:
2017-02-09T00:54:57+01:00 (7 years ago)
Author:
Don-vip
Message:

sonar - squid:S1854 - Dead stores should be removed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/widgets/HtmlPanel.java

    r8846 r11544  
    3030        Font f = UIManager.getFont("Label.font");
    3131        StyleSheet ss = new StyleSheet();
    32         String rule = MessageFormat.format(
     32        ss.addRule("body {" + MessageFormat.format(
    3333                "font-family: ''{0}'';font-size: {1,number}pt; font-weight: {2}; font-style: {3}",
    3434                f.getName(),
    3535                f.getSize(),
    3636                f.isBold() ? "bold" : "normal",
    37                         f.isItalic() ? "italic" : "normal"
    38         );
    39         rule = "body {" + rule + '}';
    40         rule = MessageFormat.format(
     37                f.isItalic() ? "italic" : "normal"
     38        ) + '}');
     39        ss.addRule("strong {" + MessageFormat.format(
    4140                "font-family: ''{0}'';font-size: {1,number}pt; font-weight: {2}; font-style: {3}",
    4241                f.getName(),
     
    4443                "bold",
    4544                f.isItalic() ? "italic" : "normal"
    46         );
    47         rule = "strong {" + rule + '}';
    48         ss.addRule(rule);
     45        ) + '}');
    4946        ss.addRule("a {text-decoration: underline; color: blue}");
    5047        ss.addRule("ul {margin-left: 1cm; list-style-type: disc}");
Note: See TracChangeset for help on using the changeset viewer.