Changeset 834 for trunk/quest-plugin-jfc/src/main/java/de
- Timestamp:
- 09/20/12 10:18:20 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/quest-plugin-jfc/src/main/java/de/ugoe/cs/quest/plugin/jfc/JFCTraceCorrector.java
r833 r834 318 318 currentSession.dump(outFile); 319 319 currentSession = null; 320 allSources.clear(); 320 321 } 321 322 else if (qName.equals("newsession")) { … … 324 325 currentSession.dump(outFile); 325 326 currentSession = null; 327 allSources.clear(); 326 328 } 327 329 else if (qName.equals("event")) { … … 330 332 } 331 333 else if (qName.equals("source")) { 332 rememberSource(currentSource); 333 currentEvent.source = currentSource; 334 currentEvent.source = getUniqueSource(currentSource); 334 335 currentSource = null; 335 336 } … … 351 352 * @param source the source to store 352 353 */ 353 private void rememberSource(Source source) {354 private Source getUniqueSource(Source source) { 354 355 String toStringValue = getToStringParam(source); 355 356 List<Source> sources = allSources.get(toStringValue); 357 358 if (sources == null) { 359 sources = new ArrayList<Source>(); 360 allSources.put(toStringValue, sources); 361 } 362 363 sources.add(source); 356 357 Source existingSource = findSource(toStringValue); 358 359 if (existingSource == null) { 360 List<Source> sources = allSources.get(toStringValue); 361 362 if (sources == null) { 363 sources = new ArrayList<Source>(); 364 allSources.put(toStringValue, sources); 365 } 366 367 sources.add(source); 368 existingSource = source; 369 } 370 371 return existingSource; 364 372 } 365 373 … … 385 393 for (Source candidate : candidates) { 386 394 if (toStringValue.equals(getToStringParam(candidate)) && 387 395 (candidate.components != null) && (candidate.components.size() > 0)) 388 396 { 389 397 existingSource = candidate; 398 break; 390 399 } 391 400 }
Note: See TracChangeset
for help on using the changeset viewer.