diff options
author | Fabrice Bellingard <bellingard@gmail.com> | 2011-05-05 15:09:34 +0200 |
---|---|---|
committer | Fabrice Bellingard <bellingard@gmail.com> | 2011-05-05 15:09:34 +0200 |
commit | 1f6a6958150484a5a0dc766b4d794f6ae4bb839a (patch) | |
tree | fdf5fd91b865c0a85b0b1f86df4e5dd0c958e409 /sonar-ws-client | |
parent | 22e260133fe8ed951c80b8df1b48059918a94fa1 (diff) | |
download | sonarqube-1f6a6958150484a5a0dc766b4d794f6ae4bb839a.tar.gz sonarqube-1f6a6958150484a5a0dc766b4d794f6ae4bb839a.zip |
SONAR-2381 Fix error in Review WS client
Diffstat (limited to 'sonar-ws-client')
-rw-r--r-- | sonar-ws-client/src/main/java/org/sonar/wsclient/services/ReviewQuery.java | 2 | ||||
-rw-r--r-- | sonar-ws-client/src/test/java/org/sonar/wsclient/services/ReviewQueryTest.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/ReviewQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/ReviewQuery.java index 38c3780ce2d..5914e4d3de1 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/services/ReviewQuery.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/services/ReviewQuery.java @@ -230,7 +230,7 @@ public class ReviewQuery extends Query<Review> { } public static ReviewQuery createForResource(Resource resource) { - return new ReviewQuery().setId(new Long(resource.getId())); + return new ReviewQuery().setResourceKeysOrIds(resource.getId().toString()); } } diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ReviewQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ReviewQueryTest.java index bf692cbbcb5..c347fac60b3 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ReviewQueryTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ReviewQueryTest.java @@ -33,7 +33,7 @@ public class ReviewQueryTest extends QueryTestCase { Resource resource = mock(Resource.class); when(resource.getId()).thenReturn(69); ReviewQuery query = ReviewQuery.createForResource(resource); - assertThat(query.getUrl(), is("/api/reviews?id=69&")); + assertThat(query.getUrl(), is("/api/reviews?resources=69&")); assertThat(query.getModelClass().getName(), is(Review.class.getName())); } |