Merge pull request #3519 from sldab/java7support-adapters

Restore Java 7 compatibility for adapters.
This commit is contained in:
Marek Posolda 2016-11-21 09:35:25 +01:00 committed by GitHub
commit f0fd9e6137
3 changed files with 12 additions and 4 deletions

View file

@ -63,6 +63,14 @@
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>
<!-- Adding OSGI metadata to the JAR without changing the packaging type. -->
<plugin>
<artifactId>maven-jar-plugin</artifactId>

View file

@ -48,7 +48,7 @@ public class HttpMethod<R> {
private HttpMethodResponse<R> response;
public HttpMethod(Configuration configuration, RequestBuilder builder) {
this(configuration, builder, new HashMap<>(), new HashMap<>());
this(configuration, builder, new HashMap<String, String>(), new HashMap<String, String>());
}
public HttpMethod(Configuration configuration, RequestBuilder builder, HashMap<String, String> params, HashMap<String, String> headers) {

View file

@ -41,7 +41,7 @@ public class HttpMethodResponse<R> {
});
}
public HttpMethodResponse<R> json(Class<R> responseType) {
public HttpMethodResponse<R> json(final Class<R> responseType) {
return new HttpMethodResponse<R>(this.method) {
@Override
public R execute() {