Changeset 6360 in josm


Ignore:
Timestamp:
2013-11-02T23:47:36+01:00 (10 years ago)
Author:
Don-vip
Message:

Sonar/Findbugs - Hide Utility Class Constructor

Location:
trunk/src/org/openstreetmap/josm
Files:
26 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyHelper.java

    r5909 r6360  
    2424class ImproveWayAccuracyHelper {
    2525
     26    private ImproveWayAccuracyHelper() {
     27        // Hide default constructor for utils classes
     28    }
     29   
    2630    /**
    2731     * Finds the way to work on. If the mouse is on the node, extracts one of
  • trunk/src/org/openstreetmap/josm/corrector/ReverseWayNoTagCorrector.java

    r6264 r6360  
    2525public class ReverseWayNoTagCorrector {
    2626
     27    private ReverseWayNoTagCorrector() {
     28        // Hide default constructor for utils classes
     29    }
     30   
    2731    /**
    2832     * Tags that imply a semantic meaning from the way direction and cannot be changed.
  • trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java

    r6316 r6360  
    5656 */
    5757public class CustomConfigurator {
     58   
     59    private CustomConfigurator() {
     60        // Hide default constructor for utils classes
     61    }
     62   
    5863    private static StringBuilder summary = new StringBuilder();
    5964
  • trunk/src/org/openstreetmap/josm/data/coor/QuadTiling.java

    r6296 r6360  
    22package org.openstreetmap.josm.data.coor;
    33
    4 public class QuadTiling
    5 {
     4public class QuadTiling {
     5   
     6    private QuadTiling() {
     7        // Hide default constructor for utils classes
     8    }
     9   
    610    public static final int NR_LEVELS = 24;
    711    public static final double WORLD_PARTS = (1 << NR_LEVELS);
  • trunk/src/org/openstreetmap/josm/data/osm/FilterWorker.java

    r5442 r6360  
    1313 */
    1414public class FilterWorker {
     15   
     16    private FilterWorker() {
     17        // Hide default constructor for utils classes
     18    }
     19   
    1520    /**
    1621     * Apply the filters to the primitives of the data set.
  • trunk/src/org/openstreetmap/josm/data/osm/OsmUtils.java

    r6316 r6360  
    88
    99public class OsmUtils {
     10   
     11    private OsmUtils() {
     12        // Hide default constructor for utils classes
     13    }
    1014
    1115    static List<String> TRUE_VALUES = new ArrayList<String>(Arrays
  • trunk/src/org/openstreetmap/josm/data/osm/TigerUtils.java

    r6264 r6360  
    99 *
    1010 * @author daveh
    11  *
     11 * @since 529
    1212 */
    1313public class TigerUtils {
     14   
     15    private TigerUtils() {
     16        // Hide default constructor for utils classes
     17    }
    1418
    15     public static boolean isTigerTag(String tag)
    16     {
     19    /**
     20     * Determines if the given tag is a TIGER one
     21     * @param tag The tag to check
     22     * @return {@code true} if {@code tag} starts with {@code tiger:} namespace
     23     */
     24    public static boolean isTigerTag(String tag) {
    1725        if (tag.indexOf("tiger:") == -1)
    1826            return false;
  • trunk/src/org/openstreetmap/josm/data/projection/Projections.java

    r6268 r6360  
    4141public class Projections {
    4242
     43    private Projections() {
     44        // Hide default constructor for utils classes
     45    }
     46   
    4347    public static EastNorth project(LatLon ll) {
    4448        if (ll == null) return null;
  • trunk/src/org/openstreetmap/josm/data/validation/util/ValUtil.java

    r3707 r6360  
    1919 * @author frsantos
    2020 */
    21 public class ValUtil
    22 {
     21public class ValUtil {
     22   
     23    private ValUtil() {
     24        // Hide default constructor for utils classes
     25    }
     26   
    2327    /**
    2428     * Returns the start and end cells of a way.
  • trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java

    r6084 r6360  
    3636public class HelpAwareOptionPane {
    3737
     38    private HelpAwareOptionPane() {
     39        // Hide default constructor for utils classes
     40    }
     41   
    3842    public static class ButtonSpec {
    3943        public final String text;
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationSortUtils.java

    r5630 r6360  
    1313class RelationSortUtils {
    1414
     15    private RelationSortUtils() {
     16        // Hide default constructor for utils classes
     17    }
     18   
    1519    /**
    1620     * determine, if the way i is a roundabout and if yes, what type of roundabout
  • trunk/src/org/openstreetmap/josm/gui/help/HelpUtil.java

    r6296 r6360  
    1818public class HelpUtil {
    1919
     20    private HelpUtil() {
     21        // Hide default constructor for utils classes
     22    }
     23   
    2024    /**
    2125     * Replies the base wiki URL.
  • trunk/src/org/openstreetmap/josm/gui/layer/JumpToMarkerActions.java

    r6261 r6360  
    2121        void jumpToNextMarker();
    2222        void jumpToPreviousMarker();
     23    }
     24   
     25    private JumpToMarkerActions() {
     26        // Hide default constructor for utils classes
    2327    }
    2428
  • trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java

    r6289 r6360  
    4444    public static ElemStyles getStyles() {
    4545        return styles;
     46    }
     47   
     48    private MapPaintStyles() {
     49        // Hide default constructor for utils classes
    4650    }
    4751
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/CSSColors.java

    r3848 r6360  
    163163    }
    164164
     165    /**
     166     * Returns the CSS color for the given key
     167     * @param key The key to find
     168     * @return The color for {@code key}
     169     */
    165170    public static Color get(String key) {
    166171        return CSS_COLORS.get(key);
    167172    }
     173   
     174    private CSSColors() {
     175        // Hide default constructor for utils classes
     176    }
    168177}
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java

    r6248 r6360  
    7474        }
    7575    }
     76   
     77    private ExpressionFactory() {
     78        // Hide default constructor for utils classes
     79    }
    7680
    7781    public static class Functions {
  • trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetReader.java

    r6316 r6360  
    3131public final class TaggingPresetReader {
    3232
    33     /**
    34      * Constructs a new {@code TaggingPresetReader}.
    35      */
    36     public TaggingPresetReader() {
     33    private TaggingPresetReader() {
     34        // Hide default constructor for utils classes
    3735    }
    3836   
  • trunk/src/org/openstreetmap/josm/io/MessageNotifier.java

    r6349 r6360  
    3737public final class MessageNotifier {
    3838
     39    private MessageNotifier() {
     40        // Hide default constructor for utils classes
     41    }
     42   
    3943    /** Property defining if this task is enabled or not */
    4044    public static final BooleanProperty PROP_NOTIFIER_ENABLED = new BooleanProperty("message.notifier.enabled", true);
  • trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java

    r6340 r6360  
    118118        });
    119119    }
     120   
     121    private PluginHandler() {
     122        // Hide default constructor for utils classes
     123    }
    120124
    121125    /**
  • trunk/src/org/openstreetmap/josm/tools/ColorHelper.java

    r3857 r6360  
    99public class ColorHelper {
    1010
     11    private ColorHelper() {
     12        // Hide default constructor for utils classes
     13    }
     14   
    1115    public static Color html2color(String html) {
    1216        if (html.length() > 0 && html.charAt(0) == '#')
  • trunk/src/org/openstreetmap/josm/tools/ExifReader.java

    r6209 r6360  
    2727public class ExifReader {
    2828
     29    private ExifReader() {
     30        // Hide default constructor for utils classes
     31    }
     32   
    2933    /**
    3034     * Returns the date/time from the given JPEG file.
  • trunk/src/org/openstreetmap/josm/tools/I18n.java

    r6316 r6360  
    3232 */
    3333public class I18n {
     34   
     35    private I18n() {
     36        // Hide default constructor for utils classes
     37    }
     38   
    3439    private enum PluralMode { MODE_NOTONE, MODE_NONE, MODE_GREATERONE,
    3540        MODE_CS/*, MODE_AR*/, MODE_PL/*, MODE_RO*/, MODE_RU, MODE_SK/*, MODE_SL*/}
  • trunk/src/org/openstreetmap/josm/tools/LanguageInfo.java

    r6223 r6360  
    55
    66public class LanguageInfo {
     7   
     8    private LanguageInfo() {
     9        // Hide default constructor for utils classes
     10    }
     11   
    712    /**
    813     * Type of the locale to use
     
    8691        else if (full.equals("in"))
    8792            return "id";
    88         else if (I18n.hasCode(full)) /* catch all non-single codes */
     93        else if (I18n.hasCode(full)) // catch all non-single codes
    8994            return full;
    9095
    91         /* return single code */
     96        // return single code
    9297        return locale.getLanguage();
    9398    }
     
    118123    }
    119124
    120     static public String getLanguageCodeXML()
    121     {
     125    static public String getLanguageCodeXML() {
    122126        return getJOSMLocaleCode()+".";
    123127    }
    124     static public String getLanguageCodeManifest()
    125     {
     128   
     129    static public String getLanguageCodeManifest() {
    126130        return getJOSMLocaleCode()+"_";
    127131    }
  • trunk/src/org/openstreetmap/josm/tools/OpenBrowser.java

    r6299 r6360  
    2222public class OpenBrowser {
    2323
     24    private OpenBrowser() {
     25        // Hide default constructor for utils classes
     26    }
     27   
    2428    private static void displayUrlFallback(URI uri) throws IOException {
    2529        if (Main.platform == null)
  • trunk/src/org/openstreetmap/josm/tools/TextTagParser.java

    r6340 r6360  
    3434    protected static final String KEY_PATTERN = Main.pref.get("tags.paste.tag-pattern", "[0-9a-zA-Z:_]*");
    3535    protected static final int MAX_VALUE_LENGTH = 255;
     36   
     37    private TextTagParser() {
     38        // Hide default constructor for utils classes
     39    }
    3640   
    3741    public static class TextAnalyzer {
  • trunk/src/org/openstreetmap/josm/tools/Utils.java

    r6354 r6360  
    4747public class Utils {
    4848
     49    private Utils() {
     50        // Hide default constructor for utils classes
     51    }
     52
    4953    public static <T> boolean exists(Iterable<? extends T> collection, Predicate<? super T> predicate) {
    5054        for (T item : collection) {
Note: See TracChangeset for help on using the changeset viewer.