Skip to content

Commit

Permalink
Correctly track version - use regex.
Browse files Browse the repository at this point in the history
  • Loading branch information
andreydp authored and Andrey Poletaev committed Nov 13, 2018
1 parent 913b396 commit 01eef6f
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,7 @@ public static boolean isAvailable() {
int i = version.indexOf(System.getProperty("line.separator")); // NOI18N
version = version.substring(0,i);
available = true;
available &= version.indexOf("version 0.") == -1;
available &= version.indexOf("version 1.0") == -1;
available &= version.indexOf("version 1.1") == -1;
available &= version.indexOf("version 1.2") == -1;
available &= !version.matches(".*version ((0\\.)|(1\\.[012][\\D])).*");
} catch (Exception e) {
e.printStackTrace();
available = false;
Expand Down

0 comments on commit 01eef6f

Please sign in to comment.