java.lang.NumberFormatException error in getCurrentDatabaseLag()
michal-josef-spacek opened this issue · 2 comments
michal-josef-spacek commented
Hi,
There is issue in method getCurrentDatabaseLag() with bad converting lag to Integer.
Example:
/w/api.php?action=query&format=json&meta=siteinfo&siprop=dbrepllag
Response:
{ "batchcomplete": "", "query": { "dbrepllag": [ { "host": "db1112", "lag": 0.471904993057251 } ] } }
lag is 0.471904993057251 and Integer.parseInt(lag) will fail on this.
Fix is something like:
String s = "0.01";
int i = Double.valueOf(s).intValue();
michal-josef-spacek commented
Thank you, very much :-)