Skip to content

Commit

Permalink
Fix #49 NumberFormatException in ElkReasoner.getReasonerVersion()
Browse files Browse the repository at this point in the history
  • Loading branch information
ykazakov committed Mar 16, 2018
1 parent 7d3390e commit 880c3d2
Showing 1 changed file with 6 additions and 2 deletions.
Expand Up @@ -700,9 +700,13 @@ public Version getReasonerVersion() {
int filled = 0;
int version[] = new int[4];
if (versionString != null) {
splitted = versionString.split("\\.");
splitted = versionString.replaceAll("[^\\d.]", "").split("\\.");
while (filled < splitted.length) {
version[filled] = Integer.parseInt(splitted[filled]);
String part = splitted[filled];
if (part.length() > 8) {
part = part.substring(0, 8);
}
version[filled] = Integer.parseInt(part);
filled++;
}
}
Expand Down

0 comments on commit 880c3d2

Please sign in to comment.