From 05d0f0babfcb37fc46bc92c384db6e096d78ddca Mon Sep 17 00:00:00 2001 From: Per Wramdemark Date: Thu, 3 Oct 2019 20:50:50 +0200 Subject: [PATCH 1/8] #834 Fix dependency management issue for POM files (#940) --- aggregator-microservices/aggregator-service/pom.xml | 11 ----------- .../information-microservice/pom.xml | 9 --------- .../inventory-microservice/pom.xml | 12 +----------- api-gateway/api-gateway-service/pom.xml | 10 ---------- api-gateway/image-microservice/pom.xml | 11 ----------- api-gateway/price-microservice/pom.xml | 9 --------- pom.xml | 5 ----- 7 files changed, 1 insertion(+), 66 deletions(-) diff --git a/aggregator-microservices/aggregator-service/pom.xml b/aggregator-microservices/aggregator-service/pom.xml index dbe303809f9b..6ad8c3c8c5a4 100644 --- a/aggregator-microservices/aggregator-service/pom.xml +++ b/aggregator-microservices/aggregator-service/pom.xml @@ -32,18 +32,8 @@ 1.22.0-SNAPSHOT 4.0.0 - aggregator-service jar - - - - - org.springframework.boot - spring-boot-dependencies - - - org.springframework @@ -74,7 +64,6 @@ org.springframework.boot spring-boot-maven-plugin - ${spring-boot.version} diff --git a/aggregator-microservices/information-microservice/pom.xml b/aggregator-microservices/information-microservice/pom.xml index b15af35e4b82..54113d3ad2eb 100644 --- a/aggregator-microservices/information-microservice/pom.xml +++ b/aggregator-microservices/information-microservice/pom.xml @@ -36,14 +36,6 @@ information-microservice jar - - - - org.springframework.boot - spring-boot-dependencies - - - org.springframework @@ -65,7 +57,6 @@ org.springframework.boot spring-boot-maven-plugin - ${spring-boot.version} diff --git a/aggregator-microservices/inventory-microservice/pom.xml b/aggregator-microservices/inventory-microservice/pom.xml index 1791ee72c9e8..3a24e9540edf 100644 --- a/aggregator-microservices/inventory-microservice/pom.xml +++ b/aggregator-microservices/inventory-microservice/pom.xml @@ -32,18 +32,9 @@ 1.22.0-SNAPSHOT 4.0.0 - inventory-microservice - jar - - - - org.springframework.boot - spring-boot-dependencies - - - + jar org.springframework @@ -65,7 +56,6 @@ org.springframework.boot spring-boot-maven-plugin - ${spring-boot.version} diff --git a/api-gateway/api-gateway-service/pom.xml b/api-gateway/api-gateway-service/pom.xml index 82aa6aedef80..44a8bde37923 100644 --- a/api-gateway/api-gateway-service/pom.xml +++ b/api-gateway/api-gateway-service/pom.xml @@ -34,15 +34,6 @@ 4.0.0 api-gateway-service jar - - - - - org.springframework.boot - spring-boot-dependencies - - - org.springframework @@ -73,7 +64,6 @@ org.springframework.boot spring-boot-maven-plugin - ${spring-boot.version} diff --git a/api-gateway/image-microservice/pom.xml b/api-gateway/image-microservice/pom.xml index c4367cdd8f45..4c897325d931 100644 --- a/api-gateway/image-microservice/pom.xml +++ b/api-gateway/image-microservice/pom.xml @@ -31,19 +31,9 @@ com.iluwatar 1.22.0-SNAPSHOT - 4.0.0 image-microservice jar - - - - - org.springframework.boot - spring-boot-dependencies - - - org.springframework @@ -65,7 +55,6 @@ org.springframework.boot spring-boot-maven-plugin - ${spring-boot.version} diff --git a/api-gateway/price-microservice/pom.xml b/api-gateway/price-microservice/pom.xml index 89aaba7ae7d4..21a68dc6efd3 100644 --- a/api-gateway/price-microservice/pom.xml +++ b/api-gateway/price-microservice/pom.xml @@ -36,14 +36,6 @@ price-microservice jar - - - - org.springframework.boot - spring-boot-dependencies - - - org.springframework @@ -65,7 +57,6 @@ org.springframework.boot spring-boot-maven-plugin - ${spring-boot.version} diff --git a/pom.xml b/pom.xml index ce773f61a243..5dfb1fff4376 100644 --- a/pom.xml +++ b/pom.xml @@ -211,11 +211,6 @@ spring-webmvc ${spring.version} - - org.springframework.boot - spring-boot-starter-web - ${spring-boot.version} - org.apache.httpcomponents httpclient From 218ba44dbfcaaacc12f11ec4830cf6cd13451388 Mon Sep 17 00:00:00 2001 From: Per Wramdemark Date: Sat, 5 Oct 2019 13:23:20 +0200 Subject: [PATCH 2/8] Upgrade of maven plugins (#951) * Upgrade maven plugins * Upgrade maven plugins Some general code cleanup was necessary due to upgrade of PMD and checkstyle. Also needed to add Junit 4 as a dependency due to Mockito.timout issue found here: https://github.com/mockito/mockito/issues/152 --- async-method-invocation/pom.xml | 5 ++ .../com/iluwatar/bytecode/Instruction.java | 4 +- caching/pom.xml | 1 - .../com/iluwatar/caching/CachingPolicy.java | 2 +- .../com/iluwatar/commander/Commander.java | 17 +++--- .../com/iluwatar/commander/queue/Queue.java | 4 +- .../iluwatar/doublechecked/locking/App.java | 4 +- .../iluwatar/event/asynchronous/Event.java | 2 +- exclude-pmd.properties | 1 + .../com/iluwatar/flux/action/Content.java | 2 +- half-sync-half-async/pom.xml | 5 ++ .../hexagonal/service/ConsoleLottery.java | 2 +- naked-objects/pom.xml | 22 -------- .../com/iluwatar/poison/pill/Message.java | 2 +- pom.xml | 56 ++++++++----------- .../java/com/iluwatar/retry/RetryTest.java | 9 ++- .../java/com/iluwatar/semaphore/Fruit.java | 2 +- .../servicelayer/common/BaseEntity.java | 6 +- trampoline/pom.xml | 1 - 19 files changed, 63 insertions(+), 84 deletions(-) diff --git a/async-method-invocation/pom.xml b/async-method-invocation/pom.xml index c6764f61cad0..49e39009ebdd 100644 --- a/async-method-invocation/pom.xml +++ b/async-method-invocation/pom.xml @@ -43,5 +43,10 @@ mockito-core test + + junit + junit + test + diff --git a/bytecode/src/main/java/com/iluwatar/bytecode/Instruction.java b/bytecode/src/main/java/com/iluwatar/bytecode/Instruction.java index 2ceb66e3bdc2..1d921da51037 100644 --- a/bytecode/src/main/java/com/iluwatar/bytecode/Instruction.java +++ b/bytecode/src/main/java/com/iluwatar/bytecode/Instruction.java @@ -29,7 +29,7 @@ public enum Instruction { LITERAL(1), SET_HEALTH(2), - SET_WISDOM (3), + SET_WISDOM(3), SET_AGILITY(4), PLAY_SOUND(5), SPAWN_PARTICLES(6), @@ -37,7 +37,7 @@ public enum Instruction { GET_AGILITY(8), GET_WISDOM(9), ADD(10), - DIVIDE (11); + DIVIDE(11); private int value; diff --git a/caching/pom.xml b/caching/pom.xml index 76578b8830cc..c20e29e922d2 100644 --- a/caching/pom.xml +++ b/caching/pom.xml @@ -65,7 +65,6 @@ org.apache.maven.plugins maven-surefire-plugin - 2.19 false diff --git a/caching/src/main/java/com/iluwatar/caching/CachingPolicy.java b/caching/src/main/java/com/iluwatar/caching/CachingPolicy.java index 9f7c92b2eef5..6b7fc35c3ace 100644 --- a/caching/src/main/java/com/iluwatar/caching/CachingPolicy.java +++ b/caching/src/main/java/com/iluwatar/caching/CachingPolicy.java @@ -32,7 +32,7 @@ public enum CachingPolicy { private String policy; - private CachingPolicy(String policy) { + CachingPolicy(String policy) { this.policy = policy; } diff --git a/commander/src/main/java/com/iluwatar/commander/Commander.java b/commander/src/main/java/com/iluwatar/commander/Commander.java index 87d4604d4ac3..8f19d1df8794 100644 --- a/commander/src/main/java/com/iluwatar/commander/Commander.java +++ b/commander/src/main/java/com/iluwatar/commander/Commander.java @@ -239,12 +239,12 @@ private void updateQueue(QueueTask qt) throws InterruptedException { //since payment time is lesser than queuetime it would have already failed..additional check not needed LOG.trace("Order " + qt.order.id + ": Queue time for order over, failed.."); return; - } else if ((qt.taskType.equals(TaskType.Payment) && !qt.order.paid.equals(PaymentStatus.Trying)) - || (qt.taskType.equals(TaskType.Messaging) && ((qt.messageType == 1 - && !qt.order.messageSent.equals(MessageSent.NoneSent)) + } else if (qt.taskType.equals(TaskType.Payment) && !qt.order.paid.equals(PaymentStatus.Trying) + || qt.taskType.equals(TaskType.Messaging) && (qt.messageType == 1 + && !qt.order.messageSent.equals(MessageSent.NoneSent) || qt.order.messageSent.equals(MessageSent.PaymentFail) - || qt.order.messageSent.equals(MessageSent.PaymentSuccessful))) - || (qt.taskType.equals(TaskType.EmployeeDb) && qt.order.addedToEmployeeHandle)) { + || qt.order.messageSent.equals(MessageSent.PaymentSuccessful)) + || qt.taskType.equals(TaskType.EmployeeDb) && qt.order.addedToEmployeeHandle) { LOG.trace("Order " + qt.order.id + ": Not queueing task since task already done.."); return; } @@ -576,8 +576,8 @@ private void doTasksInQueue() throws Exception { || qt.order.messageSent.equals(MessageSent.PaymentSuccessful)) { tryDequeue(); LOG.trace("Order " + qt.order.id + ": This messaging task already done, dequeue.."); - } else if ((qt.messageType == 1 && (!qt.order.messageSent.equals(MessageSent.NoneSent) - || !qt.order.paid.equals(PaymentStatus.Trying)))) { + } else if (qt.messageType == 1 && (!qt.order.messageSent.equals(MessageSent.NoneSent) + || !qt.order.paid.equals(PaymentStatus.Trying))) { tryDequeue(); LOG.trace("Order " + qt.order.id + ": This messaging task does not need to be done, dequeue.."); } else if (qt.messageType == 0) { @@ -606,8 +606,7 @@ private void doTasksInQueue() throws Exception { } else { Thread.sleep(queueTaskTime / 3); tryDoingTasksInQueue(); - } - return; + } } } diff --git a/commander/src/main/java/com/iluwatar/commander/queue/Queue.java b/commander/src/main/java/com/iluwatar/commander/queue/Queue.java index f1b0ef533117..440f65c90938 100644 --- a/commander/src/main/java/com/iluwatar/commander/queue/Queue.java +++ b/commander/src/main/java/com/iluwatar/commander/queue/Queue.java @@ -83,7 +83,7 @@ T dequeue() throws IsEmptyException { Node temp = front; front = front.next; size = size - 1; - return ((T) temp.value); + return (T) temp.value; } } @@ -91,7 +91,7 @@ T peek() throws IsEmptyException { if (isEmpty()) { throw new IsEmptyException(); } else { - return ((T)front.value); + return (T)front.value; } } } diff --git a/double-checked-locking/src/main/java/com/iluwatar/doublechecked/locking/App.java b/double-checked-locking/src/main/java/com/iluwatar/doublechecked/locking/App.java index c814f98bc586..3a9faf4dca16 100644 --- a/double-checked-locking/src/main/java/com/iluwatar/doublechecked/locking/App.java +++ b/double-checked-locking/src/main/java/com/iluwatar/doublechecked/locking/App.java @@ -55,7 +55,9 @@ public static void main(String[] args) { ExecutorService executorService = Executors.newFixedThreadPool(3); for (int i = 0; i < 3; i++) { executorService.execute(() -> { - while (inventory.addItem(new Item())) {}; + while (inventory.addItem(new Item())) { + LOGGER.info("Adding another item"); + } }); } diff --git a/event-asynchronous/src/main/java/com/iluwatar/event/asynchronous/Event.java b/event-asynchronous/src/main/java/com/iluwatar/event/asynchronous/Event.java index 5dc069bc7032..c22f54ca0e29 100644 --- a/event-asynchronous/src/main/java/com/iluwatar/event/asynchronous/Event.java +++ b/event-asynchronous/src/main/java/com/iluwatar/event/asynchronous/Event.java @@ -97,7 +97,7 @@ public final void removeListener(final ThreadCompleteListener listener) { this.eventListener = null; } - private final void completed() { + private void completed() { if (eventListener != null) { eventListener.completedEventHandler(eventId); } diff --git a/exclude-pmd.properties b/exclude-pmd.properties index 288ee9b2d318..5a4bb138834e 100644 --- a/exclude-pmd.properties +++ b/exclude-pmd.properties @@ -24,3 +24,4 @@ com.iluwatar.servicelayer.common.BaseEntity=UnusedPrivateField com.iluwatar.doublechecked.locking.App=EmptyStatementNotInLoop,EmptyWhileStmt com.iluwatar.doublechecked.locking.InventoryTest=EmptyStatementNotInLoop,EmptyWhileStmt +domainapp.dom.modules.simple.QSimpleObject=UnusedFormalParameter \ No newline at end of file diff --git a/flux/src/main/java/com/iluwatar/flux/action/Content.java b/flux/src/main/java/com/iluwatar/flux/action/Content.java index 596b466db414..8854ebced07a 100644 --- a/flux/src/main/java/com/iluwatar/flux/action/Content.java +++ b/flux/src/main/java/com/iluwatar/flux/action/Content.java @@ -34,7 +34,7 @@ public enum Content { private String title; - private Content(String title) { + Content(String title) { this.title = title; } diff --git a/half-sync-half-async/pom.xml b/half-sync-half-async/pom.xml index d965298ca364..2ca43a964844 100644 --- a/half-sync-half-async/pom.xml +++ b/half-sync-half-async/pom.xml @@ -43,5 +43,10 @@ mockito-core test + + junit + junit + test + diff --git a/hexagonal/src/main/java/com/iluwatar/hexagonal/service/ConsoleLottery.java b/hexagonal/src/main/java/com/iluwatar/hexagonal/service/ConsoleLottery.java index 9956788ad100..2d2a53318620 100644 --- a/hexagonal/src/main/java/com/iluwatar/hexagonal/service/ConsoleLottery.java +++ b/hexagonal/src/main/java/com/iluwatar/hexagonal/service/ConsoleLottery.java @@ -48,7 +48,7 @@ public static void main(String[] args) { Injector injector = Guice.createInjector(new LotteryModule()); LotteryService service = injector.getInstance( LotteryService.class); WireTransfers bank = injector.getInstance(WireTransfers.class); - try (final Scanner scanner = new Scanner(System.in)) { + try (Scanner scanner = new Scanner(System.in)) { boolean exit = false; while (!exit) { printMainMenu(); diff --git a/naked-objects/pom.xml b/naked-objects/pom.xml index 8c21504bb6f5..d0fe727d3205 100644 --- a/naked-objects/pom.xml +++ b/naked-objects/pom.xml @@ -90,31 +90,9 @@ - - org.apache.maven.plugins - maven-compiler-plugin - 3.1 - - 1.8 - 1.8 - -parameters - - - - source - compile - - - test - test-compile - - - - org.apache.maven.plugins maven-surefire-plugin - 2.16 **/*Test.java diff --git a/poison-pill/src/main/java/com/iluwatar/poison/pill/Message.java b/poison-pill/src/main/java/com/iluwatar/poison/pill/Message.java index cd2d2da6ac90..e9937d30cac0 100644 --- a/poison-pill/src/main/java/com/iluwatar/poison/pill/Message.java +++ b/poison-pill/src/main/java/com/iluwatar/poison/pill/Message.java @@ -66,7 +66,7 @@ private RuntimeException poison() { /** * Enumeration of Type of Headers */ - public enum Headers { + enum Headers { DATE, SENDER } diff --git a/pom.xml b/pom.xml index 5dfb1fff4376..d985b6c62fe2 100644 --- a/pom.xml +++ b/pom.xml @@ -36,10 +36,9 @@ 4.12 5.0.2 ${junit.version}.2 - 1.0.2 1.0.2 - 3.0 - 0.7.2.201409121644 + 3.8.1 + 0.8.4 1.4 2.16.1 19.0 @@ -55,6 +54,7 @@ 1.0.0 2.0.1 2.8.5 + 3.12.0 abstract-factory @@ -353,20 +353,27 @@ + + org.apache.maven.plugins + maven-compiler-plugin + ${compiler.version} + + 1.8 + 1.8 + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M3 + + -Xmx1024M ${argLine} + + - - - org.apache.maven.plugins - maven-compiler-plugin - ${compiler.version} - - 1.8 - 1.8 - - org.jacoco jacoco-maven-plugin @@ -387,7 +394,7 @@ org.apache.maven.plugins maven-checkstyle-plugin - 2.17 + 3.1.0 validate @@ -406,25 +413,10 @@ - - org.apache.maven.plugins - maven-surefire-plugin - 2.19.1 - - - org.junit.platform - junit-platform-surefire-provider - ${junit-platform.version} - - - - -Xmx1024M ${argLine} - - org.apache.maven.plugins maven-pmd-plugin - 3.6 + ${pmd.version} true 5 @@ -445,7 +437,7 @@ com.mycila license-maven-plugin - 2.11 + 3.0
com/mycila/maven/plugin/license/templates/MIT.txt
@@ -471,7 +463,7 @@ org.apache.maven.plugins maven-pmd-plugin - 3.6 + ${pmd.version}
diff --git a/retry/src/test/java/com/iluwatar/retry/RetryTest.java b/retry/src/test/java/com/iluwatar/retry/RetryTest.java index a8307d1cd9f3..d435c7e84331 100644 --- a/retry/src/test/java/com/iluwatar/retry/RetryTest.java +++ b/retry/src/test/java/com/iluwatar/retry/RetryTest.java @@ -43,7 +43,8 @@ public class RetryTest { public void errors() { final BusinessException e = new BusinessException("unhandled"); final Retry retry = new Retry<>( - () -> { throw e; }, + () -> { + throw e; }, 2, 0 ); @@ -67,7 +68,8 @@ public void errors() { public void attempts() { final BusinessException e = new BusinessException("unhandled"); final Retry retry = new Retry<>( - () -> { throw e; }, + () -> { + throw e; }, 2, 0 ); @@ -91,7 +93,8 @@ public void attempts() { public void ignore() throws Exception { final BusinessException e = new CustomerNotFoundException("customer not found"); final Retry retry = new Retry<>( - () -> { throw e; }, + () -> { + throw e; }, 2, 0, ex -> CustomerNotFoundException.class.isAssignableFrom(ex.getClass()) diff --git a/semaphore/src/main/java/com/iluwatar/semaphore/Fruit.java b/semaphore/src/main/java/com/iluwatar/semaphore/Fruit.java index 88255997fa7e..9ab004c17531 100644 --- a/semaphore/src/main/java/com/iluwatar/semaphore/Fruit.java +++ b/semaphore/src/main/java/com/iluwatar/semaphore/Fruit.java @@ -30,7 +30,7 @@ public class Fruit { /** * Enumeration of Fruit Types */ - public static enum FruitType { + public enum FruitType { ORANGE, APPLE, LEMON } diff --git a/service-layer/src/main/java/com/iluwatar/servicelayer/common/BaseEntity.java b/service-layer/src/main/java/com/iluwatar/servicelayer/common/BaseEntity.java index 52c24292e2ec..bf3988d07484 100644 --- a/service-layer/src/main/java/com/iluwatar/servicelayer/common/BaseEntity.java +++ b/service-layer/src/main/java/com/iluwatar/servicelayer/common/BaseEntity.java @@ -25,10 +25,9 @@ import javax.persistence.Inheritance; import javax.persistence.InheritanceType; import javax.persistence.MappedSuperclass; -import javax.persistence.Version; /** - * + * * Base class for entities. * */ @@ -36,9 +35,6 @@ @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS) public abstract class BaseEntity { - @Version - private Long version; - /** * Indicates the unique id of this entity * diff --git a/trampoline/pom.xml b/trampoline/pom.xml index e6f2e620afac..1e019ef31297 100644 --- a/trampoline/pom.xml +++ b/trampoline/pom.xml @@ -62,7 +62,6 @@ org.apache.maven.plugins maven-surefire-plugin - 2.19 false From 364c43a73aab5b5d4cb76194a90f0122ab3a608d Mon Sep 17 00:00:00 2001 From: Per Wramdemark Date: Sat, 5 Oct 2019 16:13:08 +0200 Subject: [PATCH 3/8] Get rid of build warnings WARNING about problems found when building the effective model (#953) --- naked-objects/pom.xml | 9 --------- pom.xml | 5 +++++ 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/naked-objects/pom.xml b/naked-objects/pom.xml index d0fe727d3205..271a07705589 100644 --- a/naked-objects/pom.xml +++ b/naked-objects/pom.xml @@ -17,23 +17,14 @@ com.iluwatar 1.22.0-SNAPSHOT - naked-objects - pom - - - 3.0.4 - - 1.9.0 - UTF-8 UTF-8 2.0.0 - apache.snapshots diff --git a/pom.xml b/pom.xml index d985b6c62fe2..7d5b038873de 100644 --- a/pom.xml +++ b/pom.xml @@ -370,6 +370,11 @@ -Xmx1024M ${argLine} + + org.springframework.boot + spring-boot-maven-plugin + ${spring-boot.version} + From 933de30d42271f422a487b0a74d6d7ccf6053709 Mon Sep 17 00:00:00 2001 From: Per Wramdemark Date: Sat, 5 Oct 2019 17:01:23 +0200 Subject: [PATCH 4/8] Add JXR plugin to get rid of WARNING Unable to locate Source XRef to link to (#952) --- pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pom.xml b/pom.xml index 7d5b038873de..f1a586eb8b34 100644 --- a/pom.xml +++ b/pom.xml @@ -470,6 +470,11 @@ maven-pmd-plugin ${pmd.version}
+ + org.apache.maven.plugins + maven-jxr-plugin + 3.0.0 + From 60171e3c873257b86f66b0a67935321735d2c7d1 Mon Sep 17 00:00:00 2001 From: Arpit Jain Date: Sun, 6 Oct 2019 20:57:39 +0530 Subject: [PATCH 5/8] Fix for Issue #549 : Update Exception Handling Code in Aggregator Microservice (#958) * Fix for Issue##549 Catch ClientProtocolException and Update Error Logs * Fix indentation, checkstyle errors --- .../microservices/ProductInformationClientImpl.java | 7 +++++-- .../microservices/ProductInventoryClientImpl.java | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/aggregator-microservices/aggregator-service/src/main/java/com/iluwatar/aggregator/microservices/ProductInformationClientImpl.java b/aggregator-microservices/aggregator-service/src/main/java/com/iluwatar/aggregator/microservices/ProductInformationClientImpl.java index 16849d529386..131fbf8695cd 100644 --- a/aggregator-microservices/aggregator-service/src/main/java/com/iluwatar/aggregator/microservices/ProductInformationClientImpl.java +++ b/aggregator-microservices/aggregator-service/src/main/java/com/iluwatar/aggregator/microservices/ProductInformationClientImpl.java @@ -22,6 +22,7 @@ */ package com.iluwatar.aggregator.microservices; +import org.apache.http.client.ClientProtocolException; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpGet; import org.apache.http.impl.client.CloseableHttpClient; @@ -49,8 +50,10 @@ public String getProductTitle() { try (CloseableHttpResponse httpResponse = httpClient.execute(httpGet)) { response = EntityUtils.toString(httpResponse.getEntity()); } - } catch (IOException e) { - LOGGER.error("Exception caught.", e); + } catch (ClientProtocolException cpe) { + LOGGER.error("ClientProtocolException Occured", cpe); + } catch (IOException ioe) { + LOGGER.error("IOException Occurred", ioe); } return response; } diff --git a/aggregator-microservices/aggregator-service/src/main/java/com/iluwatar/aggregator/microservices/ProductInventoryClientImpl.java b/aggregator-microservices/aggregator-service/src/main/java/com/iluwatar/aggregator/microservices/ProductInventoryClientImpl.java index 89f1a25e0580..780dccb78e20 100644 --- a/aggregator-microservices/aggregator-service/src/main/java/com/iluwatar/aggregator/microservices/ProductInventoryClientImpl.java +++ b/aggregator-microservices/aggregator-service/src/main/java/com/iluwatar/aggregator/microservices/ProductInventoryClientImpl.java @@ -22,6 +22,7 @@ */ package com.iluwatar.aggregator.microservices; +import org.apache.http.client.ClientProtocolException; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpGet; import org.apache.http.impl.client.CloseableHttpClient; @@ -49,8 +50,10 @@ public int getProductInventories() { try (CloseableHttpResponse httpResponse = httpClient.execute(httpGet)) { response = EntityUtils.toString(httpResponse.getEntity()); } - } catch (IOException e) { - LOGGER.error("Exception caught.", e); + } catch (ClientProtocolException cpe) { + LOGGER.error("ClientProtocolException Occured", cpe); + } catch (IOException ioe) { + LOGGER.error("IOException Occurred", ioe); } return Integer.parseInt(response); } From 94ca25462667b15d2d4f7d5120c94a0733f53bf7 Mon Sep 17 00:00:00 2001 From: Arpit Jain Date: Sun, 6 Oct 2019 21:36:39 +0530 Subject: [PATCH 6/8] Fix for issue #954 : Add external Dependencies to run with Java11 (#957) * Fix for issue #954 Add javax.annotation and java.xml.bind as external maven dependencies Verified with jdk-11 * Move dependency versions to main pom.xml's dependencyManagement section --- pom.xml | 12 ++++++++++++ repository/pom.xml | 8 ++++++++ 2 files changed, 20 insertions(+) diff --git a/pom.xml b/pom.xml index f1a586eb8b34..acaaef6181c5 100644 --- a/pom.xml +++ b/pom.xml @@ -55,6 +55,8 @@ 2.0.1 2.8.5 3.12.0 + 2.3.0 + 1.3.1 abstract-factory @@ -298,6 +300,16 @@ mongo-java-driver ${mongo-java-driver.version}
+ + javax.xml.bind + jaxb-api + ${jaxb-api.version} + + + javax.annotation + javax.annotation-api + ${annotation-api.version} +
diff --git a/repository/pom.xml b/repository/pom.xml index 48bca0cf2ba8..2ccdc9da7ba5 100644 --- a/repository/pom.xml +++ b/repository/pom.xml @@ -63,5 +63,13 @@ com.google.guava guava
+ + javax.xml.bind + jaxb-api + + + javax.annotation + javax.annotation-api +
From 2b1c09aa72149bed1b5391561bbb409cfa47fad3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ilkka=20Sepp=C3=A4l=C3=A4?= Date: Mon, 7 Oct 2019 09:45:06 +0300 Subject: [PATCH 7/8] Fix link in Acyclic Visitor --- acyclic-visitor/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/acyclic-visitor/README.md b/acyclic-visitor/README.md index 939fe38b97d1..83b618601fb2 100644 --- a/acyclic-visitor/README.md +++ b/acyclic-visitor/README.md @@ -33,7 +33,7 @@ The bad: * Parallel hierarchy of visitors has to be created for all members in visitable class hierarchy. ## Related patterns -* [Visitor Pattern](../visitor/README.md) +* [Visitor Pattern](../visitor/) ## Credits -* [Acyclic Visitor](http://condor.depaul.edu/dmumaugh/OOT/Design-Principles/acv.pdf) \ No newline at end of file +* [Acyclic Visitor](http://condor.depaul.edu/dmumaugh/OOT/Design-Principles/acv.pdf) From f5455f9887f2613ef2b8ca16eb594d6a962196d8 Mon Sep 17 00:00:00 2001 From: Kevin O'Neal Date: Mon, 7 Oct 2019 11:10:26 -0500 Subject: [PATCH 8/8] update buggy dependencies (#968) --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index acaaef6181c5..539da396b2d8 100644 --- a/pom.xml +++ b/pom.xml @@ -43,12 +43,12 @@ 2.16.1 19.0 1.10.19 - 4.5.2 + 4.5.10 2.22 4.0 3.3.0 - 1.7.21 - 1.1.7 + 1.7.28 + 1.2.3 1.1.0 1.11.289 1.0.0