summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorakozak2011-11-21 08:16:39 (EST)
committer Winston Prakash2011-12-01 20:46:51 (EST)
commitec490b610887821f18708e1e70b73a53ea2624f4 (patch)
tree5b3d105c4548568a088f0028933308591372cfc1
parent95b18a06ba1b61bc2c3776f3c2691202775e8002 (diff)
downloadorg.eclipse.hudson.core-ec490b610887821f18708e1e70b73a53ea2624f4.zip
org.eclipse.hudson.core-ec490b610887821f18708e1e70b73a53ea2624f4.tar.gz
org.eclipse.hudson.core-ec490b610887821f18708e1e70b73a53ea2624f4.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() {