aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-ws-client/src/main/java/org/sonar/wsclient
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2013-06-27 16:33:37 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2013-06-27 16:34:15 +0200
commit7727f8c087ddfd4675d1b943e35f44122eddb275 (patch)
tree3d860439445445374908b54624f4952edb67e893 /sonar-ws-client/src/main/java/org/sonar/wsclient
parent89cdd0f041c162fb255fdcad15ca75a6ab834dd9 (diff)
downloadsonarqube-7727f8c087ddfd4675d1b943e35f44122eddb275.tar.gz
sonarqube-7727f8c087ddfd4675d1b943e35f44122eddb275.zip
SONAR-4381 ClassCastException when unmarshalling response from manual measure WS
Diffstat (limited to 'sonar-ws-client/src/main/java/org/sonar/wsclient')
-rw-r--r--sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/JsonUtils.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/JsonUtils.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/JsonUtils.java
index 0f9381fffac..c767b5602f4 100644
--- a/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/JsonUtils.java
+++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/unmarshallers/JsonUtils.java
@@ -69,6 +69,9 @@ public final class JsonUtils {
public static Double getDouble(Map obj, String field) {
Object value = obj.get(field);
if (value != null) {
+ if (value instanceof Long) {
+ return ((Long) value).doubleValue();
+ }
return (Double) value;
}
return null;