Raise the minimum supported version of Java to 17

Closes gh-749
This commit is contained in:
Andy Wilkinson
2021-09-28 12:12:50 +01:00
parent 1e96e3e71a
commit 68ff043fb3
13 changed files with 32 additions and 22 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2019 the original author or authors.
* Copyright 2014-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -41,6 +41,15 @@ public class OperationResponseFactory {
return this.create(status.value(), headers, content);
}
/**
* Creates a new {@link OperationResponse}. If the response has any content, the given
* {@code headers} will be augmented to ensure that they include a
* {@code Content-Length} header.
* @param status the status of the response
* @param headers the request's headers
* @param content the content of the request
* @return the {@code OperationResponse}
*/
public OperationResponse create(int status, HttpHeaders headers, byte[] content) {
return new StandardOperationResponse(status, augmentHeaders(headers, content), content);
}