r53047 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53046‎ | r53047 | r53048 >
Date:13:21, 10 July 2009
Author:daniel
Status:deferred
Tags:
Comment:
fixed instantiation parameters
Modified paths:
  • /trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/analyzer/WikiTextAnalyzer.java (modified) (history)

Diff [purge]

Index: trunk/WikiWord/WikiWordBuilder/src/main/java/de/brightbyte/wikiword/analyzer/WikiTextAnalyzer.java
@@ -1900,9 +1900,17 @@
19011901
19021902 for (int i = ccc.length-1; i >= 0; i--) { //NOTE: most specific last, because last write wins.
19031903 if (!stop.add(ccc[i])) continue;
 1904+ WikiConfiguration conf;
19041905
1905 - ctor = ccc[i].getConstructor(new Class[] { });
1906 - WikiConfiguration conf = (WikiConfiguration)ctor.newInstance(new Object[] { } );
 1906+ try {
 1907+ ctor = ccc[i].getConstructor(new Class[] { });
 1908+ conf = (WikiConfiguration)ctor.newInstance(new Object[] { } );
 1909+ }
 1910+ catch (NoSuchMethodException ex) {
 1911+ ctor = ccc[i].getConstructor(new Class[] { String.class });
 1912+ conf = (WikiConfiguration)ctor.newInstance(new Object[] { language.getCorpus().getLanguage() } );
 1913+ }
 1914+
19071915 analyzer.configure(conf, language.tweaks);
19081916 }
19091917

Status & tagging log