Fix null versions in the contribution manager

This commit is contained in:
Rostyslav Zatserkovnyi
2016-10-23 17:59:36 +03:00
parent 189d98a1f2
commit 7813e16252
2 changed files with 16 additions and 4 deletions
@@ -461,7 +461,7 @@ class DetailPanel extends JPanel {
desc.append("</font> ");
String version = contrib.getPrettyVersion();
if (version != null) {
if (version != null && !version.equals("null")) {
desc.append(version);
}
desc.append(" <br/>");
@@ -259,12 +259,24 @@ class StatusPanel extends JPanel {
if (panel.getContrib().isCompatible(Base.getRevision())) {
if (installButton.isEnabled()) {
updateLabel.setText(latestVersion + " available");
if (latestVersion != null) {
updateLabel.setText(latestVersion + " available");
} else {
updateLabel.setText("Available");
}
} else {
updateLabel.setText(currentVersion + " installed");
if (currentVersion != null && !currentVersion.equals("null")) {
updateLabel.setText(currentVersion + " installed");
} else {
updateLabel.setText("Installed");
}
}
} else {
updateLabel.setText(currentVersion + " not compatible");
if (currentVersion != null && !currentVersion.equals("null")) {
updateLabel.setText(currentVersion + " not compatible");
} else {
updateLabel.setText("Not compatible");
}
}
if (latestVersion != null) {