Ignore:
Timestamp:
2014-02-27T02:50:12+01:00 (10 years ago)
Author:
Don-vip
Message:

fix some Sonar issues (Constructor Calls Overridable Method)

Location:
trunk/src/org/openstreetmap/josm/gui/mappaint/xml
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/xml/AreaPrototype.java

    r6561 r6890  
    2020    public AreaPrototype() { init(); }
    2121
    22     public void init()
    23     {
     22    public final void init() {
    2423        priority = 0;
    2524        range = Range.ZERO_TO_INFINITY;
  • trunk/src/org/openstreetmap/josm/gui/mappaint/xml/IconPrototype.java

    r6561 r6890  
    2020    public IconPrototype() { init(); }
    2121
    22     public void init() {
     22    public final void init() {
    2323        priority = 0;
    2424        range = Range.ZERO_TO_INFINITY;
  • trunk/src/org/openstreetmap/josm/gui/mappaint/xml/LinemodPrototype.java

    r3836 r6890  
    2020
    2121    @Override
    22     public void init()
    23     {
     22    public final void init() {
    2423        super.init();
    2524        over = true;
     
    2726    }
    2827
    29     // get width for overlays
    30     public float getWidth(float ref)
    31     {
     28    /** get width for overlays */
     29    public float getWidth(float ref) {
    3230        float res;
    3331        if(widthMode == WidthMode.ABSOLUTE) {
  • trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlCondition.java

    r6821 r6890  
    1010    public String boolValue;
    1111
    12     public XmlCondition()
    13     {
     12    public XmlCondition() {
    1413      init();
    1514    }
    16     public XmlCondition(XmlCondition c)
    17     {
     15
     16    public XmlCondition(XmlCondition c) {
    1817      key = c.key;
    1918      value = c.value;
    2019      boolValue = c.boolValue;
    2120    }
    22     public String getKey()
    23     {
     21
     22    public String getKey() {
    2423        if(value != null)
    2524            return "n" + key + "=" + value;
     
    2928            return "x" + key;
    3029    }
    31     public void init()
    32     {
     30
     31    public final void init() {
    3332      key = value = boolValue = null;
    3433    }
    3534
    36     public String toString()
    37     {
     35    public String toString() {
    3836      return "Rule["+key+","+(boolValue != null ? "b="+boolValue:"v="+value)+"]";
    3937    }
    4038
    41     public void appendCode(StringBuilder sb)
    42     {
     39    public void appendCode(StringBuilder sb) {
    4340        sb.append("[k=").append(key);
    4441
Note: See TracChangeset for help on using the changeset viewer.