- Timestamp:
- 02/20/12 11:54:55 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/jfc/data/JFCEvent.java
r380 r390 45 45 */ 46 46 private Map<String, String> parentParameters; 47 48 private boolean targetChanged = false; 49 50 private int targetHash = -1; 47 51 48 52 /** … … 145 149 target += "." + extension; 146 150 } 151 targetChanged = true; 147 152 } 148 153 … … 187 192 @Override 188 193 protected int targetHashCode() { 189 int hashCode = 0; 190 int multiplier = 29; 191 if (target != null) { 192 String[] targetParts = target.split("\\]\\.\\["); 193 if (targetParts.length == 0) { 194 hashCode = widgetHashCode(target); 195 } else { 196 for (String widgetString : targetParts) { 197 hashCode = hashCode * multiplier 198 + widgetHashCode(widgetString); 194 if( targetChanged || targetHash==-1 ) { 195 targetHash = 0; 196 int multiplier = 29; 197 if (target != null) { 198 String[] targetParts = target.split("\\]\\.\\["); 199 if (targetParts.length == 0) { 200 targetHash = widgetHashCode(target); 201 } else { 202 for (String widgetString : targetParts) { 203 targetHash = targetHash * multiplier 204 + widgetHashCode(widgetString); 205 } 199 206 } 200 207 } 208 targetChanged = false; 201 209 } 202 203 return hashCode; 210 return targetHash; 204 211 } 205 212 … … 221 228 hashCode = hashCode * multiplier + widgetInfo[1].hashCode(); 222 229 hashCode = hashCode * multiplier + widgetInfo[2].hashCode(); 223 hashCode = hashCode * multiplier + widgetInfo[3].hashCode();230 //hashCode = hashCode * multiplier + widgetInfo[3].hashCode(); 224 231 } 225 232 return hashCode;
Note: See TracChangeset
for help on using the changeset viewer.