Ignore:
Timestamp:
2015-10-10T01:40:42+02:00 (9 years ago)
Author:
Don-vip
Message:

sonar - fb-contrib - minor performance improvements:

  • Method passes constant String of length 1 to character overridden method
  • Method needlessly boxes a boolean constant
  • Method uses iterator().next() on a List to get the first item
  • Method converts String to boxed primitive using excessive boxing
  • Method converts String to primitive using excessive boxing
  • Method creates array using constants
  • Class defines List based fields but uses them like Sets
File:
1 edited

Legend:

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

    r8377 r8846  
    9999        final Font f = UIManager.getFont("Label.font");
    100100        final StyleSheet ss = new StyleSheet();
    101         ss.addRule((allBold ? "html" : "strong, b") + " {" + getFontRule(f) + "}");
     101        ss.addRule((allBold ? "html" : "strong, b") + " {" + getFontRule(f) + '}');
    102102        ss.addRule("a {text-decoration: underline; color: blue}");
    103         ss.addRule("h1 {" + getFontRule(GuiHelper.getTitleFont()) + "}");
     103        ss.addRule("h1 {" + getFontRule(GuiHelper.getTitleFont()) + '}');
    104104        ss.addRule("ol {margin-left: 1cm; margin-top: 0.1cm; margin-bottom: 0.2cm; list-style-type: decimal}");
    105105        ss.addRule("ul {margin-left: 1cm; margin-top: 0.1cm; margin-bottom: 0.2cm; list-style-type: disc}");
    106106        if ("km".equals(LanguageInfo.getJOSMLocaleCode())) {
    107107            // Fix rendering problem for Khmer script
    108             ss.addRule("p {" + getFontRule(UIManager.getFont("Label.font")) + "}");
     108            ss.addRule("p {" + getFontRule(UIManager.getFont("Label.font")) + '}');
    109109        }
    110110        kit.setStyleSheet(ss);
Note: See TracChangeset for help on using the changeset viewer.