Merge branch 'stable-2.14' into stable-2.15
* stable-2.14: GerritServer: save gerrit.config before site init ReindexIT: remove unnecessary method throws clause RestSession#postWithHeader: Make parameter order consistent with #putWithHeader Bump guice version to 4.2.0 Change-Id: Ibdedb3281414a140b214cb8c9006754cff542d25
This commit is contained in:
commit
e978e864e6
14
WORKSPACE
14
WORKSPACE
@ -70,30 +70,24 @@ maven_jar(
|
||||
sha1 = "83cd2cd674a217ade95a4bb83a8a14f351f48bd0",
|
||||
)
|
||||
|
||||
GUICE_VERS = "4.1.0"
|
||||
GUICE_VERS = "4.2.0"
|
||||
|
||||
maven_jar(
|
||||
name = "guice-library",
|
||||
artifact = "com.google.inject:guice:" + GUICE_VERS,
|
||||
sha1 = "eeb69005da379a10071aa4948c48d89250febb07",
|
||||
sha1 = "25e1f4c1d528a1cffabcca0d432f634f3132f6c8",
|
||||
)
|
||||
|
||||
maven_jar(
|
||||
name = "guice-assistedinject",
|
||||
artifact = "com.google.inject.extensions:guice-assistedinject:" + GUICE_VERS,
|
||||
sha1 = "af799dd7e23e6fe8c988da12314582072b07edcb",
|
||||
sha1 = "e7270305960ad7db56f7e30cb9df6be9ff1cfb45",
|
||||
)
|
||||
|
||||
maven_jar(
|
||||
name = "guice-servlet",
|
||||
artifact = "com.google.inject.extensions:guice-servlet:" + GUICE_VERS,
|
||||
sha1 = "90ac2db772d9b85e2b05417b74f7464bcc061dcb",
|
||||
)
|
||||
|
||||
maven_jar(
|
||||
name = "multibindings",
|
||||
artifact = "com.google.inject.extensions:guice-multibindings:" + GUICE_VERS,
|
||||
sha1 = "3b27257997ac51b0f8d19676f1ea170427e86d51",
|
||||
sha1 = "f57581625c36c148f088d9f52a568d5bdf12c61d",
|
||||
)
|
||||
|
||||
maven_jar(
|
||||
|
@ -116,10 +116,10 @@ public class RestSession extends HttpSession {
|
||||
}
|
||||
|
||||
public RestResponse post(String endPoint, Object content) throws IOException {
|
||||
return postWithHeader(endPoint, content, null);
|
||||
return postWithHeader(endPoint, null, content);
|
||||
}
|
||||
|
||||
public RestResponse postWithHeader(String endPoint, Object content, Header header)
|
||||
public RestResponse postWithHeader(String endPoint, Header header, Object content)
|
||||
throws IOException {
|
||||
Request post = Request.Post(getUrl(endPoint));
|
||||
if (header != null) {
|
||||
|
@ -18,5 +18,5 @@ import com.google.inject.Injector;
|
||||
|
||||
public class ReindexIT extends AbstractReindexTests {
|
||||
@Override
|
||||
public void configureIndex(Injector injector) throws Exception {}
|
||||
public void configureIndex(Injector injector) {}
|
||||
}
|
||||
|
@ -470,7 +470,7 @@ public class ImpersonationIT extends AbstractDaemonTest {
|
||||
in.drafts = DraftHandling.PUBLISH;
|
||||
RestResponse res =
|
||||
adminRestSession.postWithHeader(
|
||||
"/changes/" + r.getChangeId() + "/revisions/current/review", in, runAsHeader(user.id));
|
||||
"/changes/" + r.getChangeId() + "/revisions/current/review", runAsHeader(user.id), in);
|
||||
res.assertOK();
|
||||
|
||||
ChangeMessageInfo m = Iterables.getLast(gApi.changes().id(r.getChangeId()).get().messages);
|
||||
@ -502,13 +502,13 @@ public class ImpersonationIT extends AbstractDaemonTest {
|
||||
in.message = "Message on behalf of";
|
||||
|
||||
String endpoint = "/changes/" + r.getChangeId() + "/revisions/current/review";
|
||||
RestResponse res = adminRestSession.postWithHeader(endpoint, in, runAsHeader(user2.id));
|
||||
RestResponse res = adminRestSession.postWithHeader(endpoint, runAsHeader(user2.id), in);
|
||||
res.assertForbidden();
|
||||
assertThat(res.getEntityContent())
|
||||
.isEqualTo("label required to post review on behalf of \"" + in.onBehalfOf + '"');
|
||||
|
||||
in.label("Code-Review", 1);
|
||||
adminRestSession.postWithHeader(endpoint, in, runAsHeader(user2.id)).assertOK();
|
||||
adminRestSession.postWithHeader(endpoint, runAsHeader(user2.id), in).assertOK();
|
||||
|
||||
PatchSetApproval psa = Iterables.getOnlyElement(r.getChange().approvals().values());
|
||||
assertThat(psa.getPatchSetId().get()).isEqualTo(1);
|
||||
|
@ -1101,7 +1101,7 @@ public class ChangeRebuilderIT extends AbstractDaemonTest {
|
||||
ci.message = "comment with impersonation";
|
||||
ri.message = "message with impersonation";
|
||||
ri.label("Code-Review", 1);
|
||||
adminRestSession.postWithHeader(prefix + "review", ri, runAs).assertOK();
|
||||
adminRestSession.postWithHeader(prefix + "review", runAs, ri).assertOK();
|
||||
|
||||
di.message = "draft with impersonation";
|
||||
adminRestSession.putWithHeader(prefix + "drafts", runAs, di).assertCreated();
|
||||
|
@ -24,7 +24,6 @@ EXPORTS = [
|
||||
"//lib/guice:guice-assistedinject",
|
||||
"//lib/guice:guice-servlet",
|
||||
"//lib/guice:javax-inject",
|
||||
"//lib/guice:multibindings",
|
||||
"//lib/httpcomponents:httpclient",
|
||||
"//lib/httpcomponents:httpcore",
|
||||
"//lib/jgit/org.eclipse.jgit.http.server:jgit-servlet",
|
||||
|
@ -272,7 +272,6 @@ java_library(
|
||||
"//lib/guice",
|
||||
"//lib/guice:guice-assistedinject",
|
||||
"//lib/guice:javax-inject",
|
||||
"//lib/guice:multibindings",
|
||||
"//lib/ow2:ow2-asm",
|
||||
"//lib/ow2:ow2-asm-analysis",
|
||||
"//lib/ow2:ow2-asm-commons",
|
||||
|
@ -5,7 +5,6 @@ java_library(
|
||||
exports = [
|
||||
":guice-library",
|
||||
":javax-inject",
|
||||
":multibindings",
|
||||
],
|
||||
)
|
||||
|
||||
@ -45,10 +44,3 @@ java_library(
|
||||
visibility = ["//visibility:public"],
|
||||
exports = ["@javax_inject//jar"],
|
||||
)
|
||||
|
||||
java_library(
|
||||
name = "multibindings",
|
||||
data = ["//lib:LICENSE-Apache2.0"],
|
||||
visibility = ["//visibility:public"],
|
||||
exports = ["@multibindings//jar"],
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user