diff --git a/.travis.yml b/.travis.yml index f92d408..518b35a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,4 +2,4 @@ dist: trusty sudo: false language: java jdk: - - openjdk8 + - openjdk11 diff --git a/CHANGELOG.md b/CHANGELOG.md index d467b19..48cd080 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change log +## 5.0.0 (January 19, 2023) + +### BREAKING CHANGES + +* Minimum Java version is 11. + ## 4.1.2 (July 21, 2022) ### Improvements diff --git a/README.md b/README.md index bce0d1e..3d319fa 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Before you begin, you need to [Create authentication credentials](https://techdo ## Install required software -In order to use EdgeGrid Client for Java, you need [Java version 8+](https://www.java.com/en/download/help/download_options.xml). +In order to use EdgeGrid Client for Java, you need [Java version 11+](https://www.java.com/en/download/help/download_options.xml). [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.akamai.edgegrid/edgegrid-signer-parent/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.akamai.edgegrid/edgegrid-signer-parent) [![Javadocs](http://www.javadoc.io/badge/com.akamai.edgegrid/edgegrid-signer-parent.svg)](https://www.javadoc.io/doc/com.akamai.edgegrid) @@ -70,13 +70,17 @@ programming languages, and you can find them at [https://github.com/akamai?q=edg ### Active -Roberto López López Michał Wójcik +Tatiana Slonimskaia + ### Inactive Martin Meyer -Maciej Gawinecki + +Maciej Gawinecki + +Roberto López López ## Contribute diff --git a/edgegrid-signer-apache-http-client/README.md b/edgegrid-signer-apache-http-client/README.md index 01788f3..63b3613 100644 --- a/edgegrid-signer-apache-http-client/README.md +++ b/edgegrid-signer-apache-http-client/README.md @@ -15,7 +15,7 @@ Include the following Maven dependency in your project POM: com.akamai.edgegrid edgegrid-signer-apache-http-client - 4.1.2 + 5.0.0 ``` diff --git a/edgegrid-signer-apache-http-client/pom.xml b/edgegrid-signer-apache-http-client/pom.xml index e5cb372..8a8d3f7 100644 --- a/edgegrid-signer-apache-http-client/pom.xml +++ b/edgegrid-signer-apache-http-client/pom.xml @@ -6,7 +6,7 @@ edgegrid-signer-parent com.akamai.edgegrid - 4.1.2 + 5.0.0 4.0.0 diff --git a/edgegrid-signer-async-http-client/README.md b/edgegrid-signer-async-http-client/README.md index 02146a0..8bd26d7 100644 --- a/edgegrid-signer-async-http-client/README.md +++ b/edgegrid-signer-async-http-client/README.md @@ -15,7 +15,7 @@ Include the following Maven dependency in your project POM: com.akamai.edgegrid edgegrid-signer-async-http-client - 4.1.2 + 5.0.0 ``` diff --git a/edgegrid-signer-async-http-client/pom.xml b/edgegrid-signer-async-http-client/pom.xml index 8305535..da54074 100644 --- a/edgegrid-signer-async-http-client/pom.xml +++ b/edgegrid-signer-async-http-client/pom.xml @@ -5,7 +5,7 @@ edgegrid-signer-parent com.akamai.edgegrid - 4.1.2 + 5.0.0 4.0.0 diff --git a/edgegrid-signer-core/pom.xml b/edgegrid-signer-core/pom.xml index 3d58018..8196d73 100644 --- a/edgegrid-signer-core/pom.xml +++ b/edgegrid-signer-core/pom.xml @@ -6,7 +6,7 @@ edgegrid-signer-parent com.akamai.edgegrid - 4.1.2 + 5.0.0 edgegrid-signer-core diff --git a/edgegrid-signer-core/src/main/java/com/akamai/edgegrid/signer/Request.java b/edgegrid-signer-core/src/main/java/com/akamai/edgegrid/signer/Request.java index 362786e..6f3989e 100644 --- a/edgegrid-signer-core/src/main/java/com/akamai/edgegrid/signer/Request.java +++ b/edgegrid-signer-core/src/main/java/com/akamai/edgegrid/signer/Request.java @@ -160,10 +160,9 @@ public static class RequestBuilder { * @return reference back to this builder instance */ public RequestBuilder body(byte[] requestBody) { - if (body == null || "".equals(body)) { - throw new IllegalArgumentException("body cannot be empty"); + if (requestBody != null && requestBody.length != 0) { + this.body = Arrays.copyOf(requestBody, requestBody.length); } - this.body = Arrays.copyOf(requestBody, requestBody.length); return this; } diff --git a/edgegrid-signer-core/src/test/java/com/akamai/edgegrid/signer/RequestTest.java b/edgegrid-signer-core/src/test/java/com/akamai/edgegrid/signer/RequestTest.java index 8e28a06..77210ed 100644 --- a/edgegrid-signer-core/src/test/java/com/akamai/edgegrid/signer/RequestTest.java +++ b/edgegrid-signer-core/src/test/java/com/akamai/edgegrid/signer/RequestTest.java @@ -103,6 +103,29 @@ public void testHeadersLowercasing() { assertThat(request.getHeaders().get("header"), equalTo("h")); } + @Test + public void testAcceptRequestWithEmptyRequestBody() { + Request request = Request.builder() + .body("".getBytes()) + .method("GET") + .uri(URI.create("/check")) + .header("HeaDer", "h") + .build(); + + assertThat(request.getBody(), equalTo(new byte[]{})); + } + + @Test + public void testAcceptRequestWithNullRequestBody() { + Request request = Request.builder() + .method("GET") + .uri(URI.create("/check")) + .header("HeaDer", "h") + .build(); + + assertThat(request.getBody(), equalTo(new byte[]{})); + } + @Test(expectedExceptions = IllegalArgumentException.class) public void testRejectDuplicateHeaderNames() { Request.builder() diff --git a/edgegrid-signer-google-http-client/README.md b/edgegrid-signer-google-http-client/README.md index 1b85d0e..23059fc 100644 --- a/edgegrid-signer-google-http-client/README.md +++ b/edgegrid-signer-google-http-client/README.md @@ -15,7 +15,7 @@ Include the following Maven dependency in your project POM: com.akamai.edgegrid edgegrid-signer-google-http-client - 4.1.2 + 5.0.0 ``` diff --git a/edgegrid-signer-google-http-client/pom.xml b/edgegrid-signer-google-http-client/pom.xml index c3e214b..b915906 100644 --- a/edgegrid-signer-google-http-client/pom.xml +++ b/edgegrid-signer-google-http-client/pom.xml @@ -6,7 +6,7 @@ edgegrid-signer-parent com.akamai.edgegrid - 4.1.2 + 5.0.0 edgegrid-signer-google-http-client diff --git a/edgegrid-signer-rest-assured/README.md b/edgegrid-signer-rest-assured/README.md index 8cc0064..e2844a4 100644 --- a/edgegrid-signer-rest-assured/README.md +++ b/edgegrid-signer-rest-assured/README.md @@ -15,7 +15,7 @@ Include the following Maven dependency in your project POM: com.akamai.edgegrid edgegrid-signer-rest-assured - 4.1.2 + 5.0.0 ``` diff --git a/edgegrid-signer-rest-assured/pom.xml b/edgegrid-signer-rest-assured/pom.xml index 64739a5..4d6e2a6 100644 --- a/edgegrid-signer-rest-assured/pom.xml +++ b/edgegrid-signer-rest-assured/pom.xml @@ -6,7 +6,7 @@ edgegrid-signer-parent com.akamai.edgegrid - 4.1.2 + 5.0.0 edgegrid-signer-rest-assured diff --git a/edgerc-reader/pom.xml b/edgerc-reader/pom.xml index 01db8cb..584ad0b 100644 --- a/edgerc-reader/pom.xml +++ b/edgerc-reader/pom.xml @@ -5,7 +5,7 @@ edgegrid-signer-parent com.akamai.edgegrid - 4.1.2 + 5.0.0 4.0.0 diff --git a/pom.xml b/pom.xml index 9c4a2cf..3d879e4 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.akamai.edgegrid edgegrid-signer-parent - 4.1.2 + 5.0.0 edgegrid-signer-apache-http-client @@ -35,25 +35,22 @@ - Roberto López López - rlopezlo - rlopezlo at akamai.com + Michał Wójcik + miwojci Developer - Michał Wójcik - miwojci - miwojci at akamai.com + Martin Meyer + mmeyer Developer - Martin Meyer - mmeyer - mmeyer at akamai.com + Tatiana Slonimskaia + tslonims Developer @@ -79,8 +76,8 @@ UTF-8 - 1.8 - 1.8 + 11 + 11 1.7.36 4.1.78.Final 1.2.11 @@ -123,6 +120,12 @@ rest-assured 4.4.0 + + + org.apache.commons + commons-text + 1.10.0 + org.apache.commons commons-configuration2 @@ -169,7 +172,7 @@ org.testng testng - 7.4.0 + 7.7.0 test @@ -178,10 +181,29 @@ + + org.jacoco + jacoco-maven-plugin + 0.8.8 + + + prepare-agent + + prepare-agent + + + + report + + report + + + + org.apache.maven.plugins maven-javadoc-plugin - 3.3.0 + 3.4.1 attach-javadocs @@ -207,7 +229,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.2.0 + 3.3.0 ${project.build.outputDirectory}/META-INF/MANIFEST.MF @@ -237,7 +259,7 @@ org.apache.maven.plugins maven-deploy-plugin - 3.0.0-M1 + 3.0.0 true @@ -255,6 +277,10 @@ + + org.jacoco + jacoco-maven-plugin + org.apache.maven.plugins maven-javadoc-plugin @@ -270,7 +296,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.0.0-M3 + 3.1.0 enforce-maven