Ignore:
Timestamp:
2014-04-19T00:36:43+02:00 (10 years ago)
Author:
Don-vip
Message:

sonar - place Strings literals on the left side when checking for equality (can avoid NPEs)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/help/HelpUtil.java

    r6897 r6990  
    1616import org.openstreetmap.josm.tools.LanguageInfo.LocaleType;
    1717
     18/**
     19 * Provides utility methods for help system.
     20 * @since 2252
     21 */
    1822public final class HelpUtil {
    1923
     
    140144    public static String buildAbsoluteHelpTopic(String topic, LocaleType type) {
    141145        String prefix = getHelpTopicPrefix(type);
    142         if (prefix == null || topic == null || topic.trim().length() == 0 || topic.trim().equals("/"))
     146        if (prefix == null || topic == null || topic.trim().length() == 0 || "/".equals(topic.trim()))
    143147            return prefix;
    144148        prefix += "/" + topic;
     
    220224     *  </pre>
    221225     *
    222      *
    223      * @param helpTopic
     226     * @param helpTopic Help topic to mark
     227     * @return {@code helpTopic}
    224228     */
    225229    public static String ht(String helpTopic) {
Note: See TracChangeset for help on using the changeset viewer.