Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bringing dependencies up to date. #449

Merged
merged 2 commits into from
Jul 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.0.0'
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.8.2'
}
}

plugins {
id 'com.github.sherter.google-java-format' version '0.6'
id 'com.github.sherter.google-java-format' version '0.7.1'
id 'com.github.ben-manes.versions' version '0.20.0'
}

apply plugin: 'java'
Expand Down Expand Up @@ -43,18 +44,18 @@ artifacts {
}

dependencies {
compile 'com.google.code.gson:gson:2.8.1'
compile 'com.squareup.okhttp3:okhttp:3.8.1'
compile 'joda-time:joda-time:2.9.9'
compileOnly 'com.google.appengine:appengine-api-1.0-sdk:1.9.54'
compile 'org.slf4j:slf4j-api:1.7.25'
compileOnly 'com.google.appengine:appengine-api-1.0-sdk:1.9.64'
compile 'com.google.code.gson:gson:2.8.5'
compile 'com.squareup.okhttp3:okhttp:3.10.0'
compile 'joda-time:joda-time:2.10'
compile 'org.slf4j:slf4j-api:1.8.0-beta2'
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.10.19'
testCompile 'com.squareup.okhttp3:mockwebserver:3.8.1'
testCompile 'org.apache.httpcomponents:httpclient:4.5.3'
testCompile 'org.slf4j:slf4j-simple:1.7.25'
testCompile 'org.mockito:mockito-core:2.19.0'
testCompile 'com.squareup.okhttp3:mockwebserver:3.10.0'
testCompile 'org.apache.httpcomponents:httpclient:4.5.5'
testCompile 'org.slf4j:slf4j-simple:1.8.0-beta2'
testCompile 'commons-lang:commons-lang:2.6'
testCompile 'org.json:json:20170516'
testCompile 'org.json:json:20180130'
}

task updateVersion(type: Copy) {
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8.1-all.zip
2 changes: 1 addition & 1 deletion src/main/java/com/google/maps/GaeRequestHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public <T, R extends ApiResponse<T>> PendingResult<T> handlePost(

@Override
public void shutdown() {
//do nothing
// do nothing
}

/** Builder strategy for constructing {@code GaeRequestHandler}. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ public GeolocationApi.Response read(JsonReader reader) throws IOException {
reader.beginObject(); // opening {
while (reader.hasNext()) {
String name = reader.nextName();
// two different objects could be returned a success object containing "location" and "accuracy"
// keys or an error object containing an "error" key
// two different objects could be returned a success object containing "location" and
// "accuracy" keys or an error object containing an "error" key
if (name.equals("location")) {
// we already have a parser for the LatLng object so lets use that
response.location = latLngAdapter.read(reader);
Expand All @@ -96,7 +96,8 @@ public GeolocationApi.Response read(JsonReader reader) throws IOException {
reader.beginObject(); // ...and each error array element is an object...
while (reader.hasNext()) {
errName = reader.nextName();
// ...with keys "reason", "domain", "debugInfo", "location", "locationType", and "message" (again)
// ...with keys "reason", "domain", "debugInfo", "location", "locationType", and
// "message" (again)
if (errName.equals("reason")) {
response.reason = reader.nextString();
} else if (errName.equals("domain")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ public void execute(Runnable runnable) {
@Override
public void shutdown() {
delegate.shutdown();
//we need this to break out of queue.take()
// we need this to break out of queue.take()
execute(
new Runnable() {
@Override
public void run() {
//do nothing
// do nothing
}
});
}
Expand All @@ -119,12 +119,12 @@ public void run() {
@Override
public List<Runnable> shutdownNow() {
List<Runnable> tasks = delegate.shutdownNow();
//we need this to break out of queue.take()
// we need this to break out of queue.take()
execute(
new Runnable() {
@Override
public void run() {
//do nothing
// do nothing
}
});
return tasks;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,15 +203,13 @@ abstract class SmoothRateLimiter extends RateLimiter {
* <blockquote>
* thresholdPermits = 0.5 * warmupPeriod / stableInterval
* </blockquote>
*
* <li>The time to go from maxPermits to thresholdPermits is equal to the integral of the
* function between thresholdPermits and maxPermits. This is the area of the pictured
* trapezoid, and it is equal to 0.5 * (stableInterval + coldInterval) * (maxPermits -
* thresholdPermits). It is also equal to warmupPeriod, so
* <blockquote>
* maxPermits = thresholdPermits + 2 * warmupPeriod / (stableInterval + coldInterval)
* </blockquote>
*
* </ul>
*/
static final class SmoothWarmingUp extends SmoothRateLimiter {
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/google/maps/model/AddressComponent.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package com.google.maps.model;

import java.io.Serializable;

/**
* The parts of an address.
*
Expand Down
3 changes: 2 additions & 1 deletion src/test/java/com/google/maps/DistanceMatrixApiTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ public void testGetDistanceMatrixWithBasicStringParams() throws Exception {
DistanceMatrix matrix =
DistanceMatrixApi.getDistanceMatrix(sc.context, origins, destinations).await();

// Rows length will match the number of origin elements, regardless of whether they're routable.
// Rows length will match the number of origin elements, regardless of whether they're
// routable.
assertEquals(8, matrix.rows.length);
assertEquals(5, matrix.rows[0].elements.length);
assertEquals(DistanceMatrixElementStatus.OK, matrix.rows[0].elements[0].status);
Expand Down
6 changes: 3 additions & 3 deletions src/test/java/com/google/maps/GeoApiContextTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,8 @@ public void testQueryParamsHaveOrderPreserved() throws Exception {

@Test
public void testToggleIfExceptionIsAllowedToRetry() throws Exception {
// Enqueue some error responses, although only the first should be used because the response's exception is not
// allowed to be retried.
// Enqueue some error responses, although only the first should be used because the response's
// exception is not allowed to be retried.
MockResponse overQueryLimitResponse = new MockResponse();
overQueryLimitResponse.setStatus("HTTP/1.1 400 Internal server error");
overQueryLimitResponse.setBody(TestUtils.retrieveBody("OverQueryLimitResponse.json"));
Expand Down Expand Up @@ -307,7 +307,7 @@ public void testShutdown() throws InterruptedException {
assertTrue(
"Delay thread should start in constructor of RateLimitExecutorService",
delayThread.isAlive());
//this is needed to make sure that delay thread has reached queue.take()
// this is needed to make sure that delay thread has reached queue.take()
delayThread.join(10);
context.shutdown();
delayThread.join(10);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public void run() {
}
// Check that we executed every request
// TODO(brettmorgan): figure out where we are losing requests
//assertEquals(100, countTotalRequests(executedTimestamps));
// assertEquals(100, countTotalRequests(executedTimestamps));

service.shutdown();
}
Expand All @@ -101,7 +101,7 @@ public void testDelayThreadIsStoppedAfterShutdownIsCalled() throws InterruptedEx
assertTrue(
"Delay thread should start in constructor of RateLimitExecutorService",
delayThread.isAlive());
//this is needed to make sure that delay thread has reached queue.take()
// this is needed to make sure that delay thread has reached queue.take()
delayThread.join(10);
service.shutdown();
delayThread.join(10);
Expand Down