Skip to content

Commit e59b518

Browse files
authored
Set to unknown if version name is null (#1014)
1 parent 62ecab9 commit e59b518

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

parse/src/main/java/com/parse/ManifestInfo.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ public static String getVersionName() {
6363
PLog.e(TAG, "Couldn't find info about own package", e);
6464
versionName = "unknown";
6565
}
66+
if (versionName == null) {
67+
// Some contexts, such as instrumentation tests can always have this value
68+
// return as null. We will change to "unknown" for this case as well, so that
69+
// an exception isn't thrown for adding a null header later.
70+
versionName = "unknown";
71+
}
6672
}
6773
}
6874

0 commit comments

Comments
 (0)