From d8d383e054b582ae17b3b19bc533c4815d40e4d5 Mon Sep 17 00:00:00 2001 From: Petri Tuomola Date: Sat, 6 Nov 2021 13:49:17 +0530 Subject: [PATCH] Upgrading errorprone to 2.10 --- build.gradle | 2 +- .../PortfolioCommandSourceWritePlatformServiceImpl.java | 4 ++-- .../fineract/integrationtests/ConcurrencyIntegrationTest.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index aa550fafe..1612fee1c 100644 --- a/build.gradle +++ b/build.gradle @@ -504,7 +504,7 @@ configure(project.fineractJavaProjects) { // Configuration for the errorprone plugin // https://github.com/tbroyer/gradle-errorprone-plugin dependencies { - errorprone "com.google.errorprone:error_prone_core:2.9.0" + errorprone "com.google.errorprone:error_prone_core:2.10.0" } tasks.withType(JavaCompile) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/commands/service/PortfolioCommandSourceWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/commands/service/PortfolioCommandSourceWritePlatformServiceImpl.java index 7604e5828..22c3df4a9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/commands/service/PortfolioCommandSourceWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/commands/service/PortfolioCommandSourceWritePlatformServiceImpl.java @@ -110,7 +110,7 @@ public class PortfolioCommandSourceWritePlatformServiceImpl implements Portfolio if (numberOfRetries >= maxNumberOfRetries) { LOG.warn("The following command {} has been retried for the max allowed attempts of {} and will be rolled back", command.json(), numberOfRetries); - throw (exception); + throw exception; } /*** * Else sleep for a random time (between 1 to 10 seconds) and continue @@ -120,7 +120,7 @@ public class PortfolioCommandSourceWritePlatformServiceImpl implements Portfolio Thread.sleep(1000 + (randomNum * 1000)); numberOfRetries = numberOfRetries + 1; } catch (InterruptedException e) { - throw (exception); + throw exception; } } catch (final RollbackTransactionAsCommandIsNotApprovedByCheckerException e) { numberOfRetries = maxNumberOfRetries + 1; diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/ConcurrencyIntegrationTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/ConcurrencyIntegrationTest.java index 566c02453..b5afe109b 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/ConcurrencyIntegrationTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/ConcurrencyIntegrationTest.java @@ -182,7 +182,7 @@ public class ConcurrencyIntegrationTest { LOG.info("Found an exception {}", e.getMessage()); LOG.info("Details of failed concurrent transaction (date, amount, loanId) are {},{},{}", repaymentDate, repaymentAmount, loanId); - throw (e); + throw e; } LOG.info("Details of passed concurrent transaction, details (date, amount, loanId) are {},{},{}", repaymentDate, repaymentAmount, loanId);