aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorakozak2011-11-21 08:16:39 (EST)
committerWinston Prakash2011-12-01 20:46:51 (EST)
commit253b5da901b6c3bbabad669bf65f406f86498b18 (patch)
tree75139ee3b9060dd0a42b5485da13f22acc55ae20
parent2d3609da401373c3313a2c4c21fcf23cad94287c (diff)
downloadorg.eclipse.hudson.core-253b5da901b6c3bbabad669bf65f406f86498b18.zip
org.eclipse.hudson.core-253b5da901b6c3bbabad669bf65f406f86498b18.tar.gz
org.eclipse.hudson.core-253b5da901b6c3bbabad669bf65f406f86498b18.tar.bz2
Handle plugin descriptors containing "null" string values
Signed-off-by: Winston Prakash <winston.prakash@gmail.com>
-rw-r--r--hudson-core/src/main/java/hudson/model/UpdateSite.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/hudson-core/src/main/java/hudson/model/UpdateSite.java b/hudson-core/src/main/java/hudson/model/UpdateSite.java
index e101111..e9dac61 100644
--- a/hudson-core/src/main/java/hudson/model/UpdateSite.java
+++ b/hudson-core/src/main/java/hudson/model/UpdateSite.java
@@ -514,10 +514,13 @@ public class UpdateSite {
}
private String get(JSONObject o, String prop) {
- if(o.has(prop))
- return o.getString(prop);
- else
- return null;
+ if(o.has(prop)) {
+ String value = o.getString(prop);
+ if (!"null".equals(value)) {
+ return value;
+ }
+ }
+ return null;
}
public String getDisplayName() {