Ignore:
Timestamp:
02/15/13 16:15:04 (12 years ago)
Author:
pharms
Message:
  • prevented findbugs warnings
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-plugin-jfc/src/main/java/de/ugoe/cs/autoquest/plugin/jfc/guimodel/JFCGUIElementSpec.java

    r1009 r1080  
    115115        JFCGUIElementSpec otherSpec = (JFCGUIElementSpec) other; 
    116116 
    117         if ((type != otherSpec.type) && ((type != null) && (!type.equals(otherSpec.type)))) { 
     117        if (type == null ? otherSpec.type != null : !type.equals(otherSpec.type)) { 
    118118            return false; 
    119119        } 
    120120 
    121         if ((icon != otherSpec.icon) && ((icon != null) && (!icon.equals(otherSpec.icon)))) { 
     121        if (icon == null ? otherSpec.icon != null : !icon.equals(otherSpec.icon)) { 
    122122            return false; 
    123123        } 
     
    203203        JFCGUIElementSpec otherSpec = (JFCGUIElementSpec) other; 
    204204 
    205         return ((name == otherSpec.name) || ((name != null) && (name.equals(otherSpec.name)))) && 
    206             ((type == otherSpec.type) || ((type != null) && (type.equals(otherSpec.type)))) && 
    207             ((icon == otherSpec.icon) || ((icon != null) && (icon.equals(otherSpec.icon)))) && 
     205        return 
     206            (name == null ? otherSpec.name == null : name.equals(otherSpec.name)) && 
     207            (type == null ? otherSpec.type == null : type.equals(otherSpec.type)) && 
     208            (icon == null ? otherSpec.icon == null : icon.equals(otherSpec.icon)) && 
    208209            (index == otherSpec.index) && (elementHash == otherSpec.elementHash); 
    209210    } 
     
    404405            } 
    405406 
    406             if ((name != other.name) && (name != null) && (!name.equals(other.name))) { 
     407            if ((name == null) || (!name.equals(other.name))) { 
    407408                setName(other.name); 
    408409            } 
Note: See TracChangeset for help on using the changeset viewer.