r53934 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53933‎ | r53934 | r53935 >
Date:14:08, 29 July 2009
Author:daniel
Status:deferred
Tags:
Comment:
warn, don't die, on duplicate concepts
Modified paths:
  • /trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/store/builder/DatabaseLocalConceptStoreBuilder.java (modified) (history)

Diff [purge]

Index: trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/store/builder/DatabaseLocalConceptStoreBuilder.java
@@ -343,7 +343,11 @@
344344 }
345345
346346 if (id>0 && conceptDedupe!=null) {
347 - if (!conceptDedupe.add(id)) throw new IllegalArgumentException("duplicate concept: id= "+id+", name= "+name+", rc= "+rcId);
 347+ if (!conceptDedupe.add(id)) {
 348+ warning(rcId, "duplicate concept", "id= "+id+", name= "+name+", rc= "+rcId+", type="+ctype, null);
 349+ if (rcId>=0) storeAbout(rcId, name, id, name); //XXX: really here? do prior to calling this method?!
 350+ return id;
 351+ }
348352 }
349353
350354 conceptInserter.updateDouble("random", random.nextDouble());

Status & tagging log