Skip to content

Commit

Permalink
chore: update deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
wangela committed Apr 4, 2024
1 parent 7a4d1ae commit 0b3f5c3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ repositories {
mavenCentral()
}

googleJavaFormat {
toolVersion = "1.1"
}

task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier = 'javadoc'
from 'build/docs/javadoc'
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/google/maps/OkHttpRequestHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public <T, R extends ApiResponse<T>> PendingResult<T> handlePost(
Integer maxRetries,
ExceptionsAllowedToRetry exceptionsAllowedToRetry,
RequestMetrics metrics) {
RequestBody body = RequestBody.create(JSON, payload);
RequestBody body = RequestBody.create(payload, JSON);
Request.Builder builder = new Request.Builder().post(body);
for (Entry<String, String> entry : headers.entrySet()) {
builder = builder.header(entry.getKey(), entry.getValue());
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/com/google/maps/DirectionsApiTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

import static com.google.maps.TestUtils.retrieveBody;
import static org.hamcrest.CoreMatchers.not;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThat;

import com.google.maps.DirectionsApi.RouteRestriction;
import com.google.maps.errors.NotFoundException;
Expand Down

0 comments on commit 0b3f5c3

Please sign in to comment.