We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 79fc493 + 47add50 commit 1639eafCopy full SHA for 1639eaf
1 file changed
src/main/java/com/couchbase/lite/support/Version.java
@@ -12,7 +12,7 @@ public class Version {
12
13
static {
14
int versCode = getVersionCode();
15
- if (versCode == -1) {
+ if (versCode != 0) {
16
VERSION = String.format("%s-%s", getVersionName(), getVersionCode());
17
} else{
18
VERSION = String.format("%s", getVersionName());
@@ -37,12 +37,11 @@ public static int getVersionCode() {
37
}
38
39
try {
40
- Integer.parseInt(VERSION_CODE);
+ return Integer.parseInt(VERSION_CODE);
41
} catch (NumberFormatException e) {
42
Log.w(Log.TAG, "Cannot parse version code: %s", VERSION_CODE);
43
return 0;
44
45
- return -1;
46
47
48
public static String getVersion() {
0 commit comments