build(common): Update Jackson to 2.9.7
MODIFY
gateway/engine/3scale/src/main/java/io/apiman/gateway/engine/threescale/ThreeScaleImmutableRegistry.java
gateway/engine/3scale/src/main/java/io/apiman/gateway/engine/threescale/ThreeScaleImmutableRegistry.java
@@ -97,7 +97,7 @@ import java.util.stream.Collectors;
*/
@SuppressWarnings("nls")
public class ThreeScaleImmutableRegistry extends InMemoryRegistry implements AsyncInitialize {
- private static volatile OneShotURILoader instance;
+ private static volatile OneShotURILoader INSTANCE;
private Vertx vertx;
private Map<String, String> options;
@@ -118,29 +118,29 @@ public class ThreeScaleImmutableRegistry extends InMemoryRegistry implements Asy
@Override
public void initialize(IAsyncResultHandler<Void> resultHandler) {
- getURILoader(vertx, options).subscribe(this, resultHandler::handle);
+ getURILoader(vertx, options).subscribe(this, resultHandler);
}
private OneShotURILoader getURILoader(Vertx vertx, Map<String, String> options) {
- if (instance == null) {
+ if (INSTANCE == null) {
synchronized(ThreeScaleImmutableRegistry.class) {
- if (instance == null) {
- instance = new OneShotURILoader(vertx, options);
+ if (INSTANCE == null) {
+ INSTANCE = new OneShotURILoader(vertx, options);
}
}
}
- return instance;
+ return INSTANCE;
}
// For testing.
public static void reloadData(IAsyncHandler<Void> doneHandler) {
- instance.reload(doneHandler);
+ INSTANCE.reload(doneHandler);
}
// For testing.
public static void reset() {
synchronized(ThreeScaleImmutableRegistry.class) {
- instance = null;
+ INSTANCE = null;
}
}
@@ -390,7 +390,7 @@ public class ThreeScaleImmutableRegistry extends InMemoryRegistry implements Asy
}
private void loadDataIntoRegistries() {
- ThreeScaleImmutableRegistry reg = null;
+ ThreeScaleImmutableRegistry reg;
while ((reg = awaiting.poll()) != null) {
log.debug("Loading data into registry {0}: ", reg);
for (Api api : apis) {
@@ -417,7 +417,7 @@ public class ThreeScaleImmutableRegistry extends InMemoryRegistry implements Asy
private void failAll(Throwable cause) {
AsyncResultImpl<Void> failure = AsyncResultImpl.create(cause);
- failureHandlers.stream().forEach(failureHandler -> {
+ failureHandlers.forEach(failureHandler -> {
vertx.runOnContext(run -> failureHandler.handle(failure));
});
}

MODIFY
gateway/engine/3scale/src/main/java/io/apiman/gateway/engine/threescale/fetchers/AccessTokenResourceFetcher.java
gateway/engine/3scale/src/main/java/io/apiman/gateway/engine/threescale/fetchers/AccessTokenResourceFetcher.java
@@ -53,7 +53,7 @@ public class AccessTokenResourceFetcher {
this.vertx = vertx;
this.options = options;
this.apiUri = uri;
- this.isHttps = uri.getScheme().equals("https") ? true : false;
+ this.isHttps = uri.getScheme().equals("https");
this.accessToken = requireOpt("accessToken", "accessToken is required in configuration");
}

MODIFY
pom.xml
pom.xml
<version.git-commit-id.plugin>2.2.1</version.git-commit-id.plugin>
<!-- Dependency Versions -->
- <version.com.fasterxml.jackson>2.9.5</version.com.fasterxml.jackson>
+ <version.com.fasterxml.jackson>2.9.7</version.com.fasterxml.jackson>
<version.com.h2database>1.3.173</version.com.h2database>
<version.com.lmax>3.2.0</version.com.lmax>
<version.com.squareup.okhttp>2.4.0</version.com.squareup.okhttp>

build(common): Update Jackson to 2.9.7