fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vorbur...@apache.org
Subject [fineract] branch develop updated: FINERACT-823 Gradle modernizer fixing violations
Date Sun, 22 Mar 2020 23:54:09 GMT
This is an automated email from the ASF dual-hosted git repository.

vorburger pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git


The following commit(s) were added to refs/heads/develop by this push:
     new 2e620b4  FINERACT-823 Gradle modernizer fixing violations
2e620b4 is described below

commit 2e620b4de879ce7b99a5686f8ac48059c16a75e9
Author: percyashu <percyayukashu@gmail.com>
AuthorDate: Sat Feb 29 22:02:23 2020 +0100

    FINERACT-823 Gradle modernizer fixing violations
---
 fineract-provider/build.gradle                     | 27 ++++++++++-
 .../AccountingScenarioIntegrationTest.java         |  4 +-
 .../integrationtests/FixedDepositTest.java         | 52 ++++++++++-----------
 .../integrationtests/FundsIntegrationTest.java     |  2 +-
 .../integrationtests/RecurringDepositTest.java     | 54 +++++++++++-----------
 .../integrationtests/SchedulerJobsTestResults.java |  2 +-
 ...VariableInstallmentsDecliningBalanceHelper.java |  4 +-
 .../VariableInstallmentsFlatHelper.java            |  2 +-
 .../VariableInstallmentsIntegrationTest.java       |  4 +-
 .../journalentry/data/ClientTransactionDTO.java    |  2 +-
 ...ProvisioningEntriesReadPlatformServiceImpl.java |  4 +-
 .../importhandler/ImportHandlerUtils.java          |  6 +--
 .../sms/constants/SmsCampaignEnumerations.java     |  2 +-
 .../infrastructure/codes/domain/CodeValue.java     |  4 +-
 .../core/data/PaginationParameters.java            |  6 +--
 .../service/GenericDataServiceImpl.java            |  6 +--
 .../service/ReadReportingServiceImpl.java          |  9 ++--
 .../FineractEntityAccessReadServiceImpl.java       | 12 ++---
 .../fineract/infrastructure/gcm/domain/Sender.java |  2 +-
 .../hooks/processor/TwilioHookProcessor.java       |  2 +-
 .../jobs/service/JobRegisterServiceImpl.java       |  4 +-
 .../jobs/service/SchedulerJobListener.java         |  2 +-
 .../service/StaffReadPlatformServiceImpl.java      |  4 +-
 .../TellerManagementReadPlatformServiceImpl.java   |  6 +--
 ...tandingInstructionWritePlatformServiceImpl.java |  4 +-
 .../data/ShareAccountSummaryData.java              |  4 +-
 ...etailsReadPlatformServiceJpaRepositoryImpl.java |  4 +-
 .../portfolio/calendar/data/CalendarData.java      |  8 ++--
 .../portfolio/calendar/domain/Calendar.java        |  2 +-
 .../service/CalendarReadPlatformServiceImpl.java   |  6 +--
 .../CollectionSheetReadPlatformServiceImpl.java    |  6 +--
 .../service/CenterReadPlatformServiceImpl.java     |  2 +-
 .../service/GroupReadPlatformServiceImpl.java      |  2 +-
 .../loanproduct/service/LoanEnumerations.java      |  4 +-
 .../SavingsAccountReadPlatformServiceImpl.java     |  4 +-
 .../service/SearchReadPlatformServiceImpl.java     |  8 ++--
 .../SelfAccountTransferReadServiceImpl.java        |  2 +-
 .../shareaccounts/domain/ShareAccount.java         |  6 +--
 .../serialization/ShareAccountDataSerializer.java  | 12 ++---
 .../PurchasedSharesReadPlatformServiceImpl.java    |  2 +-
 .../ShareAccountChargeReadPlatformServiceImpl.java |  2 +-
 .../ShareAccountReadPlatformServiceImpl.java       |  6 +--
 ...countWritePlatformServiceJpaRepositoryImpl.java |  6 +--
 .../shareproducts/domain/ShareProduct.java         |  2 +-
 .../ShareProductReadPlatformServiceImpl.java       |  4 +-
 .../fineract/spm/api/LookupTableApiResource.java   |  2 +-
 .../fineract/spm/util/LookupTableMapper.java       |  2 +-
 .../apache/fineract/notification/StorageTest.java  |  2 +-
 .../apache/fineract/notification/TopicTest.java    |  4 +-
 .../template/TemplateMergeServiceTest.java         |  6 +--
 50 files changed, 179 insertions(+), 155 deletions(-)

diff --git a/fineract-provider/build.gradle b/fineract-provider/build.gradle
index 66bff2c..1cc419f 100644
--- a/fineract-provider/build.gradle
+++ b/fineract-provider/build.gradle
@@ -44,9 +44,10 @@ buildscript {
      classpath 'com.radcortez.gradle:openjpa-gradle-plugin:3.1.0'
      classpath 'gradle.plugin.org.nosphere.apache:creadur-rat-gradle:0.2.2'
      classpath "com.github.spotbugs:spotbugs-gradle-plugin:2.0.1"
-     // Use Guava version 23+ as a workaround to spotbug intergration.
-     // See: https://github.com/spotbugs/spotbugs-gradle-plugin/issues/128#issuecomment-535864882
+      // Use Guava version 23+ as a workaround to spotbug intergration.
+      // See: https://github.com/spotbugs/spotbugs-gradle-plugin/issues/128#issuecomment-535864882
      classpath 'com.google.guava:guava:28.1-jre'
+     classpath "gradle.plugin.com.github.andygoossens:gradle-modernizer-plugin:1.3.0"
   }
 }
 
@@ -64,6 +65,7 @@ apply plugin: 'java-library'
 apply plugin: 'openjpa'
 apply plugin: "com.github.spotbugs"
 apply plugin: 'checkstyle'
+apply plugin: 'com.github.andygoossens.gradle-modernizer-plugin'
 // apply plugin: 'pmd'
 
 dependencyManagement {
@@ -299,6 +301,27 @@ if (project.hasProperty('security') && project.getProperty('security') == 'oauth
     }
 }
 
+modernizer {
+    includeTestClasses = true
+    failOnViolations = true
+
+    violationLogLevel="error"
+
+    javaVersion = project.targetCompatibility
+
+    ignorePackages = []
+    ignoreClassNamePatterns = [
+         '.*AbstractPersistableCustom'   
+    ]
+    ignoreGeneratedClasses = true
+
+    exclusions = []
+    exclusionPatterns = [
+//            To be removed when https://issues.apache.org/jira/browse/FINERACT-826 is fixed
+            'org/joda/time/.*'
+    ]
+}
+
 task dist(type:Zip){
 	baseName = 'fineractplatform'
 	version = qualifyVersionIfNecessary(releaseVersion)
diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/AccountingScenarioIntegrationTest.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/AccountingScenarioIntegrationTest.java
index be75144..2b4d60b 100644
--- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/AccountingScenarioIntegrationTest.java
+++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/AccountingScenarioIntegrationTest.java
@@ -362,7 +362,7 @@ public class AccountingScenarioIntegrationTest {
         final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
         final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
 
-        Integer currentDate = new Integer(currentDateFormat.format(todaysDate.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
         Integer numberOfDaysLeft = (daysInMonth - currentDate) + 1;
         todaysDate.add(Calendar.DATE, numberOfDaysLeft);
@@ -445,7 +445,7 @@ public class AccountingScenarioIntegrationTest {
         final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
         final String EXPECTED_FIRST_DEPOSIT_ON_DATE = dateFormat.format(todaysDate.getTime());
 
-        Integer currentDate = new Integer(currentDateFormat.format(todaysDate.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
         Integer numberOfDaysLeft = (daysInMonth - currentDate) + 1;
         todaysDate.add(Calendar.DATE, numberOfDaysLeft);
diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/FixedDepositTest.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/FixedDepositTest.java
index dd37def..3b254d5 100644
--- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/FixedDepositTest.java
+++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/FixedDepositTest.java
@@ -147,7 +147,7 @@ public class FixedDepositTest {
         final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
         final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
 
-        Integer currentDate = new Integer(currentDateFormat.format(todaysDate.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
         Integer numberOfDaysLeft = (daysInMonth - currentDate) + 1;
         todaysDate.add(Calendar.DATE, numberOfDaysLeft);
@@ -286,7 +286,7 @@ public class FixedDepositTest {
         final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
         final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
 
-        Integer currentDate = new Integer(currentDateFormat.format(todaysDate.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
         Integer numberOfDaysLeft = (daysInMonth - currentDate) + 1;
         todaysDate.add(Calendar.DATE, numberOfDaysLeft);
@@ -433,7 +433,7 @@ public class FixedDepositTest {
         final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
         final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
 
-        Integer currentDate = new Integer(currentDateFormat.format(todaysDate.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
         Integer numberOfDaysLeft = (daysInMonth - currentDate) + 1;
         todaysDate.add(Calendar.DATE, numberOfDaysLeft);
@@ -725,7 +725,7 @@ public class FixedDepositTest {
         final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
         final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
 
-        Integer currentDate = new Integer(currentDateFormat.format(todaysDate.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
         Integer numberOfDaysLeft = (daysInMonth - currentDate) + 1;
         todaysDate.add(Calendar.DATE, numberOfDaysLeft);
@@ -896,7 +896,7 @@ public class FixedDepositTest {
         final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
         final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
 
-        Integer currentDate = new Integer(currentDateFormat.format(todaysDate.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
         Integer numberOfDaysLeft = (daysInMonth - currentDate) + 1;
         todaysDate.add(Calendar.DATE, numberOfDaysLeft);
@@ -1191,7 +1191,7 @@ public class FixedDepositTest {
 
         todaysDate = Calendar.getInstance();
         todaysDate.add(Calendar.MONTH, -1);
-        Integer currentDate = new Integer(currentDateFormat.format(todaysDate.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         todaysDate.add(Calendar.DATE, -(currentDate - 1));
         final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
         final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
@@ -1261,7 +1261,7 @@ public class FixedDepositTest {
 
         todaysDate = Calendar.getInstance();
         todaysDate.add(Calendar.MONTH, -1);
-        Integer currentDate = new Integer(currentDateFormat.format(todaysDate.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         todaysDate.add(Calendar.DATE, -(currentDate - 1));
         final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
         final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
@@ -1385,7 +1385,7 @@ public class FixedDepositTest {
 
         todaysDate.add(Calendar.MONTH, -1);
         todaysDate.add(Calendar.DAY_OF_MONTH, -1);
-        Integer currentDate = new Integer(currentDateFormat.format(todaysDate.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
         daysInMonth = (daysInMonth - currentDate) + 1;
         Float interestPerMonth = (float) (interestPerDay * principal * daysInMonth);
@@ -1493,7 +1493,7 @@ public class FixedDepositTest {
 
         todaysDate.add(Calendar.MONTH, -1);
         todaysDate.add(Calendar.DAY_OF_MONTH, -1);
-        Integer currentDate = new Integer(currentDateFormat.format(todaysDate.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
         daysInMonth = (daysInMonth - currentDate) + 1;
         Float interestPerMonth = (float) (interestPerDay * principal * daysInMonth);
@@ -1606,7 +1606,7 @@ public class FixedDepositTest {
 
         todaysDate.add(Calendar.MONTH, -1);
         todaysDate.add(Calendar.DAY_OF_MONTH, -1);
-        Integer currentDate = new Integer(currentDateFormat.format(todaysDate.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
         daysInMonth = (daysInMonth - currentDate) + 1;
         Float interestPerMonth = (float) (interestPerDay * principal * daysInMonth);
@@ -1722,7 +1722,7 @@ public class FixedDepositTest {
 
         todaysDate.add(Calendar.MONTH, -1);
         todaysDate.add(Calendar.DAY_OF_MONTH, -1);
-        Integer currentDate = new Integer(currentDateFormat.format(todaysDate.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
         daysInMonth = (daysInMonth - currentDate) + 1;
         Float interestPerMonth = (float) (interestPerDay * principal * daysInMonth);
@@ -1774,7 +1774,7 @@ public class FixedDepositTest {
 
         todaysDate = Calendar.getInstance();
         todaysDate.add(Calendar.MONTH, -1);
-        Integer currentDate = new Integer(currentDateFormat.format(todaysDate.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         todaysDate.add(Calendar.DATE, -(currentDate - 1));
         final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
         final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
@@ -1850,7 +1850,7 @@ public class FixedDepositTest {
 
         todaysDate = Calendar.getInstance();
         //todaysDate.add(Calendar.MONTH, -1);
-        Integer currentDate = new Integer(currentDateFormat.format(todaysDate.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         todaysDate.add(Calendar.DATE, -(currentDate - 1));
         final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
         final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
@@ -1921,10 +1921,10 @@ public class FixedDepositTest {
         Calendar todaysDate = Calendar.getInstance();
 
         todaysDate.add(Calendar.YEAR, -1);
-        Integer currentMonth = new Integer(currentMonthFormat.format(todaysDate.getTime()));
+        Integer currentMonth = Integer.valueOf(currentMonthFormat.format(todaysDate.getTime()));
         Integer numberOfMonths = 12 - currentMonth;
         todaysDate.add(Calendar.MONTH, numberOfMonths);
-        Integer currentDate = new Integer(currentDateFormat.format(todaysDate.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
         Integer daysLeft = daysInMonth - currentDate;
         todaysDate.add(Calendar.DATE, (daysLeft + 1));
@@ -2005,10 +2005,10 @@ public class FixedDepositTest {
         Calendar todaysDate = Calendar.getInstance();
 
         todaysDate.add(Calendar.YEAR, -1);
-        Integer currentMonth = new Integer(currentMonthFormat.format(todaysDate.getTime()));
+        Integer currentMonth = Integer.valueOf(currentMonthFormat.format(todaysDate.getTime()));
         Integer numberOfMonths = 12 - currentMonth;
         todaysDate.add(Calendar.MONTH, numberOfMonths);
-        Integer currentDate = new Integer(currentDateFormat.format(todaysDate.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
         Integer daysLeft = daysInMonth - currentDate;
         todaysDate.add(Calendar.DATE, (daysLeft + 1));
@@ -2090,10 +2090,10 @@ public class FixedDepositTest {
 
         Calendar todaysDate = Calendar.getInstance();
         todaysDate.add(Calendar.YEAR, -1);
-        Integer currentMonth = new Integer(currentMonthFormat.format(todaysDate.getTime()));
+        Integer currentMonth = Integer.valueOf(currentMonthFormat.format(todaysDate.getTime()));
         Integer numberOfMonths = 12 - currentMonth;
         todaysDate.add(Calendar.MONTH, numberOfMonths);
-        Integer currentDate = new Integer(currentDateFormat.format(todaysDate.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
         Integer daysLeft = daysInMonth - currentDate;
         todaysDate.add(Calendar.DATE, (daysLeft + 1));
@@ -2172,10 +2172,10 @@ public class FixedDepositTest {
 
         Calendar todaysDate = Calendar.getInstance();
         todaysDate.add(Calendar.YEAR, -1);
-        Integer currentMonth = new Integer(currentMonthFormat.format(todaysDate.getTime()));
+        Integer currentMonth = Integer.valueOf(currentMonthFormat.format(todaysDate.getTime()));
         Integer numberOfMonths = 12 - currentMonth;
         todaysDate.add(Calendar.MONTH, numberOfMonths);
-        Integer currentDate = new Integer(currentDateFormat.format(todaysDate.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
         Integer daysLeft = daysInMonth - currentDate;
         todaysDate.add(Calendar.DATE, (daysLeft + 1));
@@ -2254,10 +2254,10 @@ public class FixedDepositTest {
 
         Calendar todaysDate = Calendar.getInstance();
         todaysDate.add(Calendar.YEAR, -1);
-        Integer currentMonth = new Integer(currentMonthFormat.format(todaysDate.getTime()));
+        Integer currentMonth = Integer.valueOf(currentMonthFormat.format(todaysDate.getTime()));
         Integer numberOfMonths = 12 - currentMonth;
         todaysDate.add(Calendar.MONTH, numberOfMonths);
-        Integer currentDate = new Integer(currentDateFormat.format(todaysDate.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
         Integer daysLeft = daysInMonth - currentDate;
         todaysDate.add(Calendar.DATE, (daysLeft + 1));
@@ -2335,10 +2335,10 @@ public class FixedDepositTest {
 
         Calendar todaysDate = Calendar.getInstance();
         todaysDate.add(Calendar.YEAR, -1);
-        Integer currentMonth = new Integer(currentMonthFormat.format(todaysDate.getTime()));
+        Integer currentMonth = Integer.valueOf(currentMonthFormat.format(todaysDate.getTime()));
         Integer numberOfMonths = 12 - currentMonth;
         todaysDate.add(Calendar.MONTH, numberOfMonths);
-        Integer currentDate = new Integer(currentDateFormat.format(todaysDate.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
         Integer daysLeft = daysInMonth - currentDate;
         todaysDate.add(Calendar.DATE, (daysLeft + 1));
@@ -2576,4 +2576,4 @@ public class FixedDepositTest {
             Assert.assertEquals(financialActivityAccountId, deletedFinancialActivityAccountId);
         }
     }
-}
\ No newline at end of file
+}
diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/FundsIntegrationTest.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/FundsIntegrationTest.java
index 7dbd9b0..52fc430 100644
--- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/FundsIntegrationTest.java
+++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/FundsIntegrationTest.java
@@ -340,7 +340,7 @@ public class FundsIntegrationTest {
             return null;
         }
 
-        return new Long(fundId);
+        return Long.valueOf(fundId);
     }
 
 }
diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/RecurringDepositTest.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/RecurringDepositTest.java
index b88f20b..33b8fe4 100644
--- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/RecurringDepositTest.java
+++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/RecurringDepositTest.java
@@ -148,7 +148,7 @@ public class RecurringDepositTest {
         final String EXPECTED_FIRST_DEPOSIT_ON_DATE = dateFormat.format(todaysDate.getTime());
         final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
 
-        Integer currentDate = new Integer(currentDateFormat.format(todaysDate.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
         Integer numberOfDaysLeft = (daysInMonth - currentDate) + 1;
         todaysDate.add(Calendar.DATE, numberOfDaysLeft);
@@ -300,7 +300,7 @@ public class RecurringDepositTest {
         final String EXPECTED_FIRST_DEPOSIT_ON_DATE = dateFormat.format(todaysDate.getTime());
         final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
 
-        Integer currentDate = new Integer(currentDateFormat.format(todaysDate.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
         Integer numberOfDaysLeft = (daysInMonth - currentDate) + 1;
         todaysDate.add(Calendar.DATE, numberOfDaysLeft);
@@ -505,7 +505,7 @@ public class RecurringDepositTest {
         final String EXPECTED_FIRST_DEPOSIT_ON_DATE = dateFormat.format(todaysDate.getTime());
         final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
 
-        Integer currentDate = new Integer(currentDateFormat.format(todaysDate.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
         Integer numberOfDaysLeft = (daysInMonth - currentDate) + 1;
         todaysDate.add(Calendar.DATE, numberOfDaysLeft);
@@ -721,7 +721,7 @@ public class RecurringDepositTest {
         final String EXPECTED_FIRST_DEPOSIT_ON_DATE = dateFormat.format(todaysDate.getTime());
         final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
 
-        Integer currentDate = new Integer(currentDateFormat.format(todaysDate.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
         Integer numberOfDaysLeft = (daysInMonth - currentDate) + 1;
         todaysDate.add(Calendar.DATE, numberOfDaysLeft);
@@ -888,7 +888,7 @@ public class RecurringDepositTest {
         final String EXPECTED_FIRST_DEPOSIT_ON_DATE = dateFormat.format(todaysDate.getTime());
         final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
 
-        Integer currentDate = new Integer(currentDateFormat.format(todaysDate.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
         Integer numberOfDaysLeft = (daysInMonth - currentDate) + 1;
         todaysDate.add(Calendar.DATE, numberOfDaysLeft);
@@ -1374,7 +1374,7 @@ public class RecurringDepositTest {
 
         todaysDate = Calendar.getInstance();
         todaysDate.add(Calendar.MONTH, -1);
-        Integer currentDate = new Integer(currentDateFormat.format(todaysDate.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         todaysDate.add(Calendar.DATE, -(currentDate - 1));
         final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
         final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
@@ -1454,7 +1454,7 @@ public class RecurringDepositTest {
 
         todaysDate = Calendar.getInstance();
         todaysDate.add(Calendar.MONTH, -1);
-        Integer currentDate = new Integer(currentDateFormat.format(todaysDate.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         todaysDate.add(Calendar.DATE, -(currentDate - 1));
         final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
         final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
@@ -1591,7 +1591,7 @@ public class RecurringDepositTest {
         DecimalFormat decimalFormat = new DecimalFormat("", new DecimalFormatSymbols(Locale.US));
         decimalFormat.applyPattern(".");
 
-        Integer currentDate = new Integer(currentDateFormat.format(todaysDate.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
         daysInMonth = (daysInMonth - currentDate) + 1;
         Float interestToBePosted = new Float(decimalFormat.format(interestPerDay * principal * daysInMonth));
@@ -1698,7 +1698,7 @@ public class RecurringDepositTest {
 
         Calendar calendar = Calendar.getInstance();
         calendar.add(Calendar.MONTH, -1);
-        Integer currentDate = new Integer(currentDateFormat.format(calendar.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(calendar.getTime()));
         Integer daysInMonth = calendar.getActualMaximum(Calendar.DATE);
         daysInMonth = (daysInMonth - currentDate) + 1;
         Float interestPerMonth = (float) (interestPerDay * principal * daysInMonth);
@@ -1830,7 +1830,7 @@ public class RecurringDepositTest {
 
         Calendar calendar = Calendar.getInstance();
         calendar.add(Calendar.MONTH, -1);
-        Integer currentDate = new Integer(currentDateFormat.format(calendar.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(calendar.getTime()));
         Integer daysInMonth = calendar.getActualMaximum(Calendar.DATE);
         daysInMonth = (daysInMonth - currentDate) + 1;
         Float interestPerMonth = (float) (interestPerDay * principal * daysInMonth);
@@ -1970,7 +1970,7 @@ public class RecurringDepositTest {
         Calendar calendar = Calendar.getInstance();
         calendar.add(Calendar.MONTH, -1);
         calendar.add(Calendar.DAY_OF_MONTH, -1);
-        Integer currentDate = new Integer(currentDateFormat.format(calendar.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(calendar.getTime()));
         Integer daysInMonth = calendar.getActualMaximum(Calendar.DATE);
         daysInMonth = (daysInMonth - currentDate) + 1;
         Float interestPerMonth = (float) (interestPerDay * principal * daysInMonth);
@@ -2115,7 +2115,7 @@ public class RecurringDepositTest {
         Calendar calendar = Calendar.getInstance();
         calendar.add(Calendar.MONTH, -1);
         calendar.add(Calendar.DAY_OF_MONTH, -1);
-        Integer currentDate = new Integer(currentDateFormat.format(calendar.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(calendar.getTime()));
         Integer daysInMonth = calendar.getActualMaximum(Calendar.DATE);
         daysInMonth = (daysInMonth - currentDate) + 1;
         Float interestPerMonth = (float) (interestPerDay * principal * daysInMonth);
@@ -2178,7 +2178,7 @@ public class RecurringDepositTest {
 
         todaysDate = Calendar.getInstance();
         todaysDate.add(Calendar.MONTH, -1);
-        Integer currentDate = new Integer(currentDateFormat.format(todaysDate.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         todaysDate.add(Calendar.DATE, -(currentDate - 1));
         final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
         final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
@@ -2262,7 +2262,7 @@ public class RecurringDepositTest {
 
         todaysDate = Calendar.getInstance();
         todaysDate.add(Calendar.MONTH, -1);
-        Integer currentDate = new Integer(currentDateFormat.format(todaysDate.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         todaysDate.add(Calendar.DATE, -(currentDate - 1));
         final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
         final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
@@ -2344,10 +2344,10 @@ public class RecurringDepositTest {
 
         Calendar todaysDate = Calendar.getInstance();
         todaysDate.add(Calendar.YEAR, -1);
-        Integer currentMonth = new Integer(currentMonthFormat.format(todaysDate.getTime()));
+        Integer currentMonth = Integer.valueOf(currentMonthFormat.format(todaysDate.getTime()));
         Integer numberOfMonths = 12 - currentMonth;
         todaysDate.add(Calendar.MONTH, numberOfMonths);
-        Integer currentDate = new Integer(currentDateFormat.format(todaysDate.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
         Integer daysLeft = daysInMonth - currentDate;
         todaysDate.add(Calendar.DATE, (daysLeft + 1));
@@ -2435,10 +2435,10 @@ public class RecurringDepositTest {
 
         Calendar todaysDate = Calendar.getInstance();
         todaysDate.add(Calendar.YEAR, -1);
-        Integer currentMonth = new Integer(currentMonthFormat.format(todaysDate.getTime()));
+        Integer currentMonth = Integer.valueOf(currentMonthFormat.format(todaysDate.getTime()));
         Integer numberOfMonths = 12 - currentMonth;
         todaysDate.add(Calendar.MONTH, numberOfMonths);
-        Integer currentDate = new Integer(currentDateFormat.format(todaysDate.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
         Integer daysLeft = daysInMonth - currentDate;
         todaysDate.add(Calendar.DATE, (daysLeft + 1));
@@ -2525,10 +2525,10 @@ public class RecurringDepositTest {
         Calendar todaysDate = Calendar.getInstance();
 
         todaysDate.add(Calendar.YEAR, -1);
-        Integer currentMonth = new Integer(currentMonthFormat.format(todaysDate.getTime()));
+        Integer currentMonth = Integer.valueOf(currentMonthFormat.format(todaysDate.getTime()));
         Integer numberOfMonths = 12 - currentMonth;
         todaysDate.add(Calendar.MONTH, numberOfMonths);
-        Integer currentDate = new Integer(currentDateFormat.format(todaysDate.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
         Integer daysLeft = daysInMonth - currentDate;
         todaysDate.add(Calendar.DATE, (daysLeft + 1));
@@ -2616,10 +2616,10 @@ public class RecurringDepositTest {
         Calendar todaysDate = Calendar.getInstance();
 
         todaysDate.add(Calendar.YEAR, -1);
-        Integer currentMonth = new Integer(currentMonthFormat.format(todaysDate.getTime()));
+        Integer currentMonth = Integer.valueOf(currentMonthFormat.format(todaysDate.getTime()));
         Integer numberOfMonths = 12 - currentMonth;
         todaysDate.add(Calendar.MONTH, numberOfMonths);
-        Integer currentDate = new Integer(currentDateFormat.format(todaysDate.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
         Integer daysLeft = daysInMonth - currentDate;
         todaysDate.add(Calendar.DATE, (daysLeft + 1));
@@ -2708,10 +2708,10 @@ public class RecurringDepositTest {
 
         Calendar todaysDate = Calendar.getInstance();
         todaysDate.add(Calendar.YEAR, -1);
-        Integer currentMonth = new Integer(currentMonthFormat.format(todaysDate.getTime()));
+        Integer currentMonth = Integer.valueOf(currentMonthFormat.format(todaysDate.getTime()));
         Integer numberOfMonths = 12 - currentMonth;
         todaysDate.add(Calendar.MONTH, numberOfMonths);
-        Integer currentDate = new Integer(currentDateFormat.format(todaysDate.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
         Integer daysLeft = daysInMonth - currentDate;
         todaysDate.add(Calendar.DATE, (daysLeft + 1));
@@ -2799,10 +2799,10 @@ public class RecurringDepositTest {
 
         Calendar todaysDate = Calendar.getInstance();
         todaysDate.add(Calendar.YEAR, -1);
-        Integer currentMonth = new Integer(currentMonthFormat.format(todaysDate.getTime()));
+        Integer currentMonth = Integer.valueOf(currentMonthFormat.format(todaysDate.getTime()));
         Integer numberOfMonths = 12 - currentMonth;
         todaysDate.add(Calendar.MONTH, numberOfMonths);
-        Integer currentDate = new Integer(currentDateFormat.format(todaysDate.getTime()));
+        Integer currentDate = Integer.valueOf(currentDateFormat.format(todaysDate.getTime()));
         Integer daysInMonth = todaysDate.getActualMaximum(Calendar.DATE);
         Integer daysLeft = daysInMonth - currentDate;
         todaysDate.add(Calendar.DATE, (daysLeft + 1));
@@ -3206,4 +3206,4 @@ public class RecurringDepositTest {
             Assert.assertEquals(financialActivityAccountId, deletedFinancialActivityAccountId);
         }
     }
-}
\ No newline at end of file
+}
diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/SchedulerJobsTestResults.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/SchedulerJobsTestResults.java
index 2700d14..8192150 100644
--- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/SchedulerJobsTestResults.java
+++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/SchedulerJobsTestResults.java
@@ -425,7 +425,7 @@ public class SchedulerJobsTestResults {
         this.schedulerJobHelper.executeJob(JobName);
         final HashMap runningBalanceAfter = this.accountHelper.getAccountingWithRunningBalanceById(accountID.toString());
 
-        final Integer INT_BALANCE = new Integer(MINIMUM_OPENING_BALANCE);
+        final Integer INT_BALANCE = Integer.valueOf(MINIMUM_OPENING_BALANCE);
 
         Assert.assertEquals("Verifying Account Running Balance after running Update Accounting Running Balances Scheduler Job",
                 INT_BALANCE, runningBalanceAfter.get("organizationRunningBalance"));
diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/variableinstallments/VariableInstallmentsDecliningBalanceHelper.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/variableinstallments/VariableInstallmentsDecliningBalanceHelper.java
index cfdb9bc..1a3b857 100644
--- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/variableinstallments/VariableInstallmentsDecliningBalanceHelper.java
+++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/variableinstallments/VariableInstallmentsDecliningBalanceHelper.java
@@ -63,7 +63,7 @@ public class VariableInstallmentsDecliningBalanceHelper {
                 .withInterestTypeAsDecliningBalance() //
                 .withTranches(multiDisburseLoan) //
                 .withInterestCalculationPeriodTypeAsRepaymentPeriod(true)//
-                .withVariableInstallmentsConfig(Boolean.TRUE, new Integer(5), new Integer(90))//
+                .withVariableInstallmentsConfig(Boolean.TRUE, Integer.valueOf(5), Integer.valueOf(90))//
                 .withAccounting(accountingRule, accounts).build(null);
         return loanProductJSON ;
     }
@@ -81,7 +81,7 @@ public class VariableInstallmentsDecliningBalanceHelper {
                 .withInterestTypeAsDecliningBalance() //
                 .withTranches(multiDisburseLoan) //
                 .withInterestCalculationPeriodTypeAsRepaymentPeriod(true)//
-                .withVariableInstallmentsConfig(Boolean.TRUE, new Integer(5), new Integer(90))//
+                .withVariableInstallmentsConfig(Boolean.TRUE, Integer.valueOf(5), Integer.valueOf(90))//
                 .withAccounting(accountingRule, accounts).build(null);
         return loanProductJSON ;
     }
diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/variableinstallments/VariableInstallmentsFlatHelper.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/variableinstallments/VariableInstallmentsFlatHelper.java
index e39f6f1..95533b1 100644
--- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/variableinstallments/VariableInstallmentsFlatHelper.java
+++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/variableinstallments/VariableInstallmentsFlatHelper.java
@@ -46,7 +46,7 @@ public class VariableInstallmentsFlatHelper {
                 .withInterestTypeAsFlat() //
                 .withTranches(multiDisburseLoan) //
                 .withInterestCalculationPeriodTypeAsRepaymentPeriod(true)//
-                .withVariableInstallmentsConfig(Boolean.TRUE, new Integer(5), new Integer(90))//
+                .withVariableInstallmentsConfig(Boolean.TRUE, Integer.valueOf(5), Integer.valueOf(90))//
                 .withAccounting(accountingRule, accounts).build(null);
         return loanProductJSON ;
     }
diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/variableinstallments/VariableInstallmentsIntegrationTest.java b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/variableinstallments/VariableInstallmentsIntegrationTest.java
index 89ac2f2..dc6a164 100644
--- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/variableinstallments/VariableInstallmentsIntegrationTest.java
+++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/variableinstallments/VariableInstallmentsIntegrationTest.java
@@ -59,8 +59,8 @@ public class VariableInstallmentsIntegrationTest {
         System.out.println("------------------------------RETRIEVING CREATED LOAN PRODUCT DETAILS ---------------------------------------");
         Map loanProduct = (Map)loanTransactionHelper.getLoanProductDetail(requestSpec, responseSpec, loanProductID, "") ;
         Assert.assertTrue((Boolean)loanProduct.get("allowVariableInstallments")) ;
-        Assert.assertEquals(new Integer(5), loanProduct.get("minimumGap")) ;
-        Assert.assertEquals(new Integer(90), loanProduct.get("maximumGap")) ;
+        Assert.assertEquals(Integer.valueOf(5), loanProduct.get("minimumGap")) ;
+        Assert.assertEquals(Integer.valueOf(90), loanProduct.get("maximumGap")) ;
     }
 
 
diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/ClientTransactionDTO.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/ClientTransactionDTO.java
index 5e5bfc1..cff9679 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/ClientTransactionDTO.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/ClientTransactionDTO.java
@@ -86,7 +86,7 @@ public class ClientTransactionDTO {
     }
 
     public boolean isChargePayment() {
-        return ClientTransactionType.PAY_CHARGE.getValue().equals(new Integer(this.transactionType.getId().intValue()));
+        return ClientTransactionType.PAY_CHARGE.getValue().equals(Integer.valueOf(this.transactionType.getId().intValue()));
     }
 
     public String getCurrencyCode() {
diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/service/ProvisioningEntriesReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/service/ProvisioningEntriesReadPlatformServiceImpl.java
index b4e9ddf..100d3f6 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/service/ProvisioningEntriesReadPlatformServiceImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/service/ProvisioningEntriesReadPlatformServiceImpl.java
@@ -281,7 +281,7 @@ public class ProvisioningEntriesReadPlatformServiceImpl implements ProvisioningE
 
     private static final class ProvisioningEntryIdDateRowMapper implements RowMapper<ProvisioningEntryData> {
 
-        StringBuffer buff = new StringBuffer().append("select history1.id, history1.created_date from m_provisioning_history history1 ")
+        StringBuilder buff = new StringBuilder().append("select history1.id, history1.created_date from m_provisioning_history history1 ")
                 .append("where history1.created_date = (select max(history2.created_date) from m_provisioning_history history2 ")
                 .append("where history2.journal_entry_created='1')");
 
@@ -348,4 +348,4 @@ public class ProvisioningEntriesReadPlatformServiceImpl implements ProvisioningE
                 whereClauseItemsitems, mapper);
     }
 
-}
\ No newline at end of file
+}
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/ImportHandlerUtils.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/ImportHandlerUtils.java
index 53c0773..bdadfeb 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/ImportHandlerUtils.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/ImportHandlerUtils.java
@@ -229,14 +229,14 @@ public class ImportHandlerUtils {
     }
 
     public static String getDefaultUserMessages(List<ApiParameterError> ApiParameterErrorList){
-        StringBuffer defaultUserMessages=new StringBuffer();
+        StringBuilder defaultUserMessages=new StringBuilder();
         for (ApiParameterError error:ApiParameterErrorList) {
             defaultUserMessages=defaultUserMessages.append(error.getDefaultUserMessage()+'\t');
         }
         return defaultUserMessages.toString();
     }
     public static String getErrorList(List<String> errorList){
-        StringBuffer errors=new StringBuffer();
+        StringBuilder errors=new StringBuilder();
         for (String error: errorList) {
                 errors=errors.append(error);
         }
@@ -380,4 +380,4 @@ public class ImportHandlerUtils {
             return null;
         }
     }
-}
\ No newline at end of file
+}
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/constants/SmsCampaignEnumerations.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/constants/SmsCampaignEnumerations.java
index 2e3afcd..9691bec 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/constants/SmsCampaignEnumerations.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/constants/SmsCampaignEnumerations.java
@@ -68,7 +68,7 @@ public class SmsCampaignEnumerations {
     }
 
     public static EnumOptionData calendarMonthType(final Month entityType) {
-        final EnumOptionData optionData = new EnumOptionData(new Long(entityType.getValue()), entityType.name(), entityType.name());
+        final EnumOptionData optionData = new EnumOptionData(Long.valueOf(entityType.getValue()), entityType.name(), entityType.name());
         return optionData;
     }
 
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/domain/CodeValue.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/domain/CodeValue.java
index 2cc1b0d..3857ff1 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/domain/CodeValue.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/domain/CodeValue.java
@@ -93,7 +93,7 @@ public class CodeValue extends AbstractPersistableCustom<Long> {
             isActive = isActiveObj;
         }
         if (position == null) {
-            position = new Integer(0);
+            position = Integer.valueOf(0);
         }
 
         Boolean mandatory = command.booleanPrimitiveValueOfParameterNamed(
@@ -145,4 +145,4 @@ public class CodeValue extends AbstractPersistableCustom<Long> {
     public CodeValueData toData() {
         return CodeValueData.instance(getId(), this.label, this.position, this.isActive, this.mandatory);
     }
-}
\ No newline at end of file
+}
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/data/PaginationParameters.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/data/PaginationParameters.java
index e12ce57..5e6b87c 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/data/PaginationParameters.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/data/PaginationParameters.java
@@ -104,7 +104,7 @@ public class PaginationParameters {
     }
 
     public String orderBySql() {
-        final StringBuffer sql = new StringBuffer();
+        final StringBuilder sql = new StringBuilder();
 
         if (this.isOrderByRequested()) {
             sql.append(" order by ").append(this.getOrderBy());
@@ -116,7 +116,7 @@ public class PaginationParameters {
     }
 
     public String limitSql() {
-        final StringBuffer sql = new StringBuffer();
+        final StringBuilder sql = new StringBuilder();
         if (this.isLimited()) {
             sql.append(" limit ").append(this.getLimit());
             if (this.isOffset()) {
@@ -137,4 +137,4 @@ public class PaginationParameters {
 
         return sqlBuilder.toString();
     }
-}
\ No newline at end of file
+}
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/GenericDataServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/GenericDataServiceImpl.java
index fdb6b22..46b2958 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/GenericDataServiceImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/GenericDataServiceImpl.java
@@ -97,7 +97,7 @@ public class GenericDataServiceImpl implements GenericDataService {
         // apache one to be about the same then this can be removed.
         int s = 0;
         int e = 0;
-        final StringBuffer result = new StringBuffer();
+        final StringBuilder result = new StringBuilder();
 
         while ((e = str.indexOf(pattern, s)) >= 0) {
             result.append(str.substring(s, e));
@@ -122,7 +122,7 @@ public class GenericDataServiceImpl implements GenericDataService {
     @Override
     public String generateJsonFromGenericResultsetData(final GenericResultsetData grs) {
 
-        final StringBuffer writer = new StringBuffer();
+        final StringBuilder writer = new StringBuilder();
 
         writer.append("[");
 
@@ -316,4 +316,4 @@ public class GenericDataServiceImpl implements GenericDataService {
 
         return rsValues;
     }
-}
\ No newline at end of file
+}
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReadReportingServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReadReportingServiceImpl.java
index d1a0844..9808c61 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReadReportingServiceImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReadReportingServiceImpl.java
@@ -28,6 +28,7 @@ import java.io.File;
 import java.io.FileOutputStream;
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.nio.charset.StandardCharsets;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.util.ArrayList;
@@ -100,9 +101,9 @@ public class ReadReportingServiceImpl implements ReadReportingService {
                 try {
 
                     final GenericResultsetData result = retrieveGenericResultset(name, type, queryParams, isSelfServiceUserReport);
-                    final StringBuffer sb = generateCsvFileBuffer(result);
+                    final StringBuilder sb = generateCsvFileBuffer(result);
 
-                    final InputStream in = new ByteArrayInputStream(sb.toString().getBytes("UTF-8"));
+                    final InputStream in = new ByteArrayInputStream(sb.toString().getBytes(StandardCharsets.UTF_8));
 
                     final byte[] outputByte = new byte[4096];
                     Integer readLen = in.read(outputByte, 0, 4096);
@@ -122,8 +123,8 @@ public class ReadReportingServiceImpl implements ReadReportingService {
 
     }
 
-    private StringBuffer generateCsvFileBuffer(final GenericResultsetData result) {
-        final StringBuffer writer = new StringBuffer();
+    private StringBuilder generateCsvFileBuffer(final GenericResultsetData result) {
+        final StringBuilder writer = new StringBuilder();
 
         final List<ResultsetColumnHeaderData> columnHeaders = result.getColumnHeaders();
         logger.info("NO. of Columns: {}", columnHeaders.size());
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/service/FineractEntityAccessReadServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/service/FineractEntityAccessReadServiceImpl.java
index 4412754..db50b3f 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/service/FineractEntityAccessReadServiceImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/service/FineractEntityAccessReadServiceImpl.java
@@ -78,7 +78,7 @@ public class FineractEntityAccessReadServiceImpl implements FineractEntityAccess
                     Collection<FineractEntityToEntityMappingData> accesslist = retrieveEntityAccessFor(firstEntityType, relId, fromEntityId,
                             includeAllOffices);
         String returnIdListStr = null;
-        StringBuffer accessListCSVStrBuf = null;
+        StringBuilder accessListCSVStrBuf = null;
         if ((accesslist != null) && (accesslist.size() > 0)) {
             for(FineractEntityToEntityMappingData accessData: accesslist){
                                 if (accessData == null) {
@@ -86,7 +86,7 @@ public class FineractEntityAccessReadServiceImpl implements FineractEntityAccess
                                  }
 
                                 if(accessListCSVStrBuf == null){
-                                    accessListCSVStrBuf = new StringBuffer() ;
+                                    accessListCSVStrBuf = new StringBuilder() ;
                                 }else{
                                     accessListCSVStrBuf.append(",");
                                 }
@@ -99,7 +99,7 @@ public class FineractEntityAccessReadServiceImpl implements FineractEntityAccess
 
         } else {
 
-            accessListCSVStrBuf = new StringBuffer();
+            accessListCSVStrBuf = new StringBuilder();
             accessListCSVStrBuf.append("false"); // Append false so that no rows
                                                  // will be returned
         }
@@ -138,7 +138,7 @@ public class FineractEntityAccessReadServiceImpl implements FineractEntityAccess
     }
 
     private String getSQLForRetriveEntityAccessFor() {
-        StringBuffer str = new StringBuffer("select  eem.rel_id as relId,eem.from_id as fromId, ");
+        StringBuilder str = new StringBuilder("select  eem.rel_id as relId,eem.from_id as fromId, ");
                 str.append("eem.to_id as toId, eem.start_date as startDate, eem.end_date as endDate ");
                 str.append("from  m_entity_to_entity_mapping eem ");
                 str.append("where eem.rel_id = ? ");
@@ -268,7 +268,7 @@ public class FineractEntityAccessReadServiceImpl implements FineractEntityAccess
 
         public GetOneEntityMapper() {
 
-            StringBuffer str = new StringBuffer("select eem.rel_id as relId, ");
+            StringBuilder str = new StringBuilder("select eem.rel_id as relId, ");
             str.append("eem.from_id as fromId,eem.to_Id as toId,eem.start_date as startDate,eem.end_date as endDate ");
             str.append("from m_entity_to_entity_mapping eem ");
             str.append("where eem.id= ? ");
@@ -298,7 +298,7 @@ public class FineractEntityAccessReadServiceImpl implements FineractEntityAccess
 
         public EntityToEntityMapper() {
 
-            StringBuffer str = new StringBuffer("select eem.id as mapId, ");
+            StringBuilder str = new StringBuilder("select eem.id as mapId, ");
             str.append("eem.rel_id as relId, ");
             str.append("eem.from_id as from_id, ");
             str.append("eem.to_id as to_id, ");
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/Sender.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/Sender.java
index fef41ab..e9ba9e4 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/Sender.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/Sender.java
@@ -700,7 +700,7 @@ public class Sender {
         HttpURLConnection conn = getConnection(url);
         conn.setDoOutput(true);
         conn.setUseCaches(false);
-        conn.setFixedLengthStreamingMode(bytes.length);
+        conn.setFixedLengthStreamingMode(Long.valueOf(bytes.length));
         conn.setRequestMethod("POST");
         conn.setRequestProperty("Content-Type", contentType);
         conn.setRequestProperty("Authorization", "key=" + key);
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/TwilioHookProcessor.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/TwilioHookProcessor.java
index 49bd99a..9c56480 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/TwilioHookProcessor.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/TwilioHookProcessor.java
@@ -123,7 +123,7 @@ public class TwilioHookProcessor implements HookProcessor {
                     payload, HashMap.class);
             map.put("BASE_URI", System.getProperty("baseUrl"));
             if (map.containsKey("clientId")) {
-                final Long clientId = new Long(Integer.toString((int) map
+                final Long clientId = Long.valueOf(Integer.toString((int) map
                         .get("clientId")));
                 final Client client = this.clientRepositoryWrapper.findOneWithNotFoundDetection(clientId);
                 final String mobileNo = client.mobileNo();
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobRegisterServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobRegisterServiceImpl.java
index be9a684..47fd32f 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobRegisterServiceImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobRegisterServiceImpl.java
@@ -418,7 +418,7 @@ public class JobRegisterServiceImpl implements JobRegisterService, ApplicationLi
 
     private String getStackTraceAsString(final Throwable throwable) {
         final StackTraceElement[] stackTraceElements = throwable.getStackTrace();
-        final StringBuffer sb = new StringBuffer(throwable.toString());
+        final StringBuilder sb = new StringBuilder(throwable.toString());
         for (final StackTraceElement element : stackTraceElements) {
             sb.append("\n \t at ").append(element.getClassName()).append(".").append(element.getMethodName()).append("(")
                     .append(element.getLineNumber()).append(")");
@@ -435,4 +435,4 @@ public class JobRegisterServiceImpl implements JobRegisterService, ApplicationLi
         final JobKey JobKey = new JobKey(keyParams[0], keyParams[1]);
         return JobKey;
     }
-}
\ No newline at end of file
+}
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerJobListener.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerJobListener.java
index cfa5d4a..ffa5ed1 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerJobListener.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerJobListener.java
@@ -98,7 +98,7 @@ public class SchedulerJobListener implements JobListener {
             StackTraceElement[] stackTraceElements = null;
             errorMessage = throwable.getMessage();
             stackTraceElements = throwable.getStackTrace();
-            final StringBuffer sb = new StringBuffer(throwable.toString());
+            final StringBuilder sb = new StringBuilder(throwable.toString());
             for (final StackTraceElement element : stackTraceElements) {
                 sb.append("\n \t at ").append(element.getClassName()).append(".").append(element.getMethodName()).append("(")
                         .append(element.getLineNumber()).append(")");
diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/service/StaffReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/service/StaffReadPlatformServiceImpl.java
index ec069e8..afec998 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/service/StaffReadPlatformServiceImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/service/StaffReadPlatformServiceImpl.java
@@ -225,7 +225,7 @@ public class StaffReadPlatformServiceImpl implements StaffReadPlatformService {
 
     private String getStaffCriteria(final String sqlSearch, final Long officeId, final boolean loanOfficersOnly, final String status) {
 
-        final StringBuffer extraCriteria = new StringBuffer(200);
+        final StringBuilder extraCriteria = new StringBuilder(200);
 
         if (sqlSearch != null) {
             extraCriteria.append(" and (").append(sqlSearch).append(")");
@@ -310,4 +310,4 @@ public class StaffReadPlatformServiceImpl implements StaffReadPlatformService {
         return params.toArray();
 
     }
-}
\ No newline at end of file
+}
diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/service/TellerManagementReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/service/TellerManagementReadPlatformServiceImpl.java
index 0959bcf..5d6f812 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/service/TellerManagementReadPlatformServiceImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/service/TellerManagementReadPlatformServiceImpl.java
@@ -245,7 +245,7 @@ public class TellerManagementReadPlatformServiceImpl implements TellerManagement
 
     private String getTellerCriteria(final String sqlSearch, final Long officeId, final String status) {
 
-        final StringBuffer extraCriteria = new StringBuffer(200);
+        final StringBuilder extraCriteria = new StringBuilder(200);
 
         if (sqlSearch != null) {
             extraCriteria.append(" and (").append(sqlSearch).append(")");
@@ -291,7 +291,7 @@ public class TellerManagementReadPlatformServiceImpl implements TellerManagement
 
     private String getTellerCriteria(final String sqlSearch, final Long tellerId) {
 
-        final StringBuffer extraCriteria = new StringBuffer(200);
+        final StringBuilder extraCriteria = new StringBuilder(200);
 
         if (sqlSearch != null) {
             extraCriteria.append(" and (").append(sqlSearch).append(")");
@@ -918,4 +918,4 @@ public class TellerManagementReadPlatformServiceImpl implements TellerManagement
         }
     }
 
-}
\ No newline at end of file
+}
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/StandingInstructionWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/StandingInstructionWritePlatformServiceImpl.java
index 02fcd9a..a65bfec 100755
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/StandingInstructionWritePlatformServiceImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/StandingInstructionWritePlatformServiceImpl.java
@@ -258,8 +258,8 @@ public class StandingInstructionWritePlatformServiceImpl implements StandingInst
 
     private boolean transferAmount(final StringBuilder sb, final AccountTransferDTO accountTransferDTO, final Long instructionId) {
         boolean transferCompleted = true;
-        StringBuffer errorLog = new StringBuffer();
-        StringBuffer updateQuery = new StringBuffer(
+        StringBuilder errorLog = new StringBuilder();
+        StringBuilder updateQuery = new StringBuilder(
                 "INSERT INTO `m_account_transfer_standing_instructions_history` (`standing_instruction_id`, `status`, `amount`,`execution_time`, `error_log`) VALUES (");
         try {
             this.accountTransfersWritePlatformService.transferFunds(accountTransferDTO);
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accountdetails/data/ShareAccountSummaryData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accountdetails/data/ShareAccountSummaryData.java
index c624877..fab68f5 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accountdetails/data/ShareAccountSummaryData.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accountdetails/data/ShareAccountSummaryData.java
@@ -49,12 +49,12 @@ public class ShareAccountSummaryData implements Serializable {
         this.accountNo = accountNo;
         this.externalId = externalId;
         if(approvedShares == null) {
-            this.totalApprovedShares = new Long(0) ;
+            this.totalApprovedShares = Long.valueOf(0) ;
         }else {
             this.totalApprovedShares = approvedShares;
         }
         if(pendingForApprovalShares == null) {
-            this.totalPendingForApprovalShares = new Long(0) ;
+            this.totalPendingForApprovalShares = Long.valueOf(0) ;
         }else {
             this.totalPendingForApprovalShares = pendingForApprovalShares;
         }
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accountdetails/service/AccountDetailsReadPlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accountdetails/service/AccountDetailsReadPlatformServiceJpaRepositoryImpl.java
index 65deea9..b9cd852 100755
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accountdetails/service/AccountDetailsReadPlatformServiceJpaRepositoryImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accountdetails/service/AccountDetailsReadPlatformServiceJpaRepositoryImpl.java
@@ -168,7 +168,7 @@ public class AccountDetailsReadPlatformServiceJpaRepositoryImpl implements Accou
         private final String schema ;
 
         ShareAccountSummaryDataMapper() {
-            final StringBuffer buff = new StringBuffer()
+            final StringBuilder buff = new StringBuilder()
             .append("sa.id as id, sa.external_id as externalId, sa.status_enum as statusEnum, ")
             .append("sa.account_no as accountNo, sa.total_approved_shares as approvedShares, sa.total_pending_shares as pendingShares, ")
             .append("sa.savings_account_id as savingsAccountNo, sa.minimum_active_period_frequency as minimumactivePeriod,")
@@ -605,4 +605,4 @@ public class AccountDetailsReadPlatformServiceJpaRepositoryImpl implements Accou
 
     }
 
-}
\ No newline at end of file
+}
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/data/CalendarData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/data/CalendarData.java
index ac40467..835784b 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/data/CalendarData.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/data/CalendarData.java
@@ -259,17 +259,17 @@ public class CalendarData implements Serializable {
         final String location = null;
         final LocalDate startDate = null;
         final LocalDate endDate = null;
-        final Integer duration = new Integer(0);
+        final Integer duration = Integer.valueOf(0);
         final EnumOptionData type = CalendarEnumerations.calendarType(CalendarType.COLLECTION);
         final boolean repeating = false;
         final String recurrence = null;
         final EnumOptionData frequency = CalendarEnumerations.calendarFrequencyType(CalendarFrequencyType.DAILY);
-        final Integer interval = new Integer(1);
+        final Integer interval = Integer.valueOf(1);
         final EnumOptionData repeatsOnDay = CalendarEnumerations.calendarWeekDaysType(CalendarWeekDaysType.MO);
         final EnumOptionData repeatsOnNthDayOfMonth = CalendarEnumerations.calendarFrequencyNthDayType(NthDayType.ONE);
         final EnumOptionData remindBy = CalendarEnumerations.calendarRemindBy(CalendarRemindBy.EMAIL);
-        final Integer firstReminder = new Integer(0);
-        final Integer secondReminder = new Integer(0);
+        final Integer firstReminder = Integer.valueOf(0);
+        final Integer secondReminder = Integer.valueOf(0);
         final String humanReadable = null;
         final Collection<LocalDate> recurringDates = null;
         final Collection<LocalDate> nextTenRecurringDates = null;
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/Calendar.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/Calendar.java
index 7d009c0..dd67d64 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/Calendar.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/Calendar.java
@@ -640,7 +640,7 @@ public class Calendar extends AbstractAuditableCustom<AppUser, Long> {
     public void updateStartAndEndDate(final LocalDate startDate, final LocalDate endDate) {
 
         final CalendarFrequencyType frequencyType = CalendarUtils.getFrequency(this.recurrence);
-        final Integer interval = new Integer(CalendarUtils.getInterval(this.recurrence));
+        final Integer interval = Integer.valueOf(CalendarUtils.getInterval(this.recurrence));
         final String newRecurrence = Calendar.constructRecurrence(frequencyType, interval, startDate.getDayOfWeek(), null);
 
         this.recurrence = newRecurrence;
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarReadPlatformServiceImpl.java
index 68b1991..b3ae7cc 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarReadPlatformServiceImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarReadPlatformServiceImpl.java
@@ -86,7 +86,7 @@ public class CalendarReadPlatformServiceImpl implements CalendarReadPlatformServ
             final boolean repeating = rs.getBoolean("repeating");
             final String recurrence = rs.getString("recurrence");
             final EnumOptionData frequency = CalendarEnumerations.calendarFrequencyType(CalendarUtils.getFrequency(recurrence));
-            final Integer interval = new Integer(CalendarUtils.getInterval(recurrence));
+            final Integer interval = Integer.valueOf(CalendarUtils.getInterval(recurrence));
             final EnumOptionData repeatsOnDay = CalendarEnumerations.calendarWeekDaysType(CalendarUtils.getRepeatsOnDay(recurrence));
             final EnumOptionData repeatsOnNthDayOfMonth = CalendarEnumerations.calendarFrequencyNthDayType(CalendarUtils.getRepeatsOnNthDayOfMonth(recurrence));
             final Integer remindById = rs.getInt("remindById");
@@ -477,7 +477,7 @@ public class CalendarReadPlatformServiceImpl implements CalendarReadPlatformServ
             final boolean repeating = rs.getBoolean("repeating");
             final String recurrence = rs.getString("recurrence");
             final EnumOptionData frequency = CalendarEnumerations.calendarFrequencyType(CalendarUtils.getFrequency(recurrence));
-            final Integer interval = new Integer(CalendarUtils.getInterval(recurrence));
+            final Integer interval = Integer.valueOf(CalendarUtils.getInterval(recurrence));
             final EnumOptionData repeatsOnDay = CalendarEnumerations.calendarWeekDaysType(CalendarUtils.getRepeatsOnDay(recurrence));
             final EnumOptionData repeatsOnNthDayOfMonth = CalendarEnumerations.calendarFrequencyNthDayType(CalendarUtils
                     .getRepeatsOnNthDayOfMonth(recurrence));
@@ -510,4 +510,4 @@ public class CalendarReadPlatformServiceImpl implements CalendarReadPlatformServ
     }
 
 
-}
\ No newline at end of file
+}
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/service/CollectionSheetReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/service/CollectionSheetReadPlatformServiceImpl.java
index f831a85..f04ddb0 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/service/CollectionSheetReadPlatformServiceImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/service/CollectionSheetReadPlatformServiceImpl.java
@@ -215,7 +215,7 @@ public class CollectionSheetReadPlatformServiceImpl implements CollectionSheetRe
     private static final class JLGCollectionSheetFaltDataMapper implements RowMapper<JLGCollectionSheetFlatData> {
 
         public String collectionSheetSchema(final boolean isCenterCollection) {
-            StringBuffer sql = new StringBuffer(400);
+            StringBuilder sql = new StringBuilder(400);
             sql.append("SELECT loandata.*, sum(lc.amount_outstanding_derived) as chargesDue from ")
                     .append("(SELECT gp.display_name As groupName, ")
                     .append("gp.id As groupId, ")
@@ -498,7 +498,7 @@ public class CollectionSheetReadPlatformServiceImpl implements CollectionSheetRe
 
         public String collectionSheetSchema(final boolean isCenterCollection) {
 
-            final StringBuffer sql = new StringBuffer(400);
+            final StringBuilder sql = new StringBuilder(400);
             sql.append("SELECT gp.display_name As groupName, ")
                     .append("gp.id As groupId, ")
                     .append("cl.display_name As clientName, ")
@@ -820,7 +820,7 @@ public class CollectionSheetReadPlatformServiceImpl implements CollectionSheetRe
 
         public IndividualMandatorySavingsCollectionsheetExtractor(final boolean checkForOfficeId, final boolean checkforStaffId) {
 
-            final StringBuffer sb = new StringBuffer(400);
+            final StringBuilder sb = new StringBuilder(400);
             sb.append("SELECT if(sa.deposit_type_enum=100,'Saving Deposit',if(sa.deposit_type_enum=300,'Recurring Deposit','Current Deposit')) as depositAccountType, cl.display_name As clientName, cl.id As clientId, ");
             sb.append("sa.id As savingsId, sa.account_no As accountId, sa.status_enum As accountStatusId, ");
             sb.append("sp.short_name As productShortName, sp.id As productId, ");
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/CenterReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/CenterReadPlatformServiceImpl.java
index 0fbddc8..b2a6363 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/CenterReadPlatformServiceImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/CenterReadPlatformServiceImpl.java
@@ -123,7 +123,7 @@ public class CenterReadPlatformServiceImpl implements CenterReadPlatformService
     // caused by the same name of columns in m_office and m_group tables
     private String getCenterExtraCriteria(String schemaSl, List<Object> paramList,final SearchParameters searchCriteria) {
 
-        StringBuffer extraCriteria = new StringBuffer(200);
+        StringBuilder extraCriteria = new StringBuilder(200);
         extraCriteria.append(" and g.level_id = " + GroupTypes.CENTER.getId());
         if (searchCriteria!=null) {
             String sqlQueryCriteria = searchCriteria.getSqlSearch();
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupReadPlatformServiceImpl.java
index ecb8cb3..9d15bc0 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupReadPlatformServiceImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupReadPlatformServiceImpl.java
@@ -215,7 +215,7 @@ public class GroupReadPlatformServiceImpl implements GroupReadPlatformService {
     // caused by the same name of columns in m_office and m_group tables
     private String getGroupExtraCriteria(String schemaSql, List<Object> paramList, final SearchParameters searchCriteria) {
 
-        StringBuffer extraCriteria = new StringBuffer(200);
+        StringBuilder extraCriteria = new StringBuilder(200);
         extraCriteria.append(" and g.level_Id = ").append(GroupTypes.GROUP.getId());
             String sqlSearch = searchCriteria.getSqlSearch();
             if (sqlSearch != null) {
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanEnumerations.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanEnumerations.java
index 9a3f984..9e4f4e0 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanEnumerations.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanEnumerations.java
@@ -176,7 +176,7 @@ public class LoanEnumerations {
                 optionData = new EnumOptionData(nthDayValue, codePrefix + type.getCode(), "last");
             break;
             default:
-                optionData = new EnumOptionData(new Integer(0).longValue(), codePrefix + type.getCode(), "invalid");
+                optionData = new EnumOptionData(Integer.valueOf(0).longValue(), codePrefix + type.getCode(), "invalid");
             break;
         }
 
@@ -633,7 +633,7 @@ public class LoanEnumerations {
                 optionData = new EnumOptionData(nthDayValue, codePrefix + type.getCode(), "last");
             break;
             default:
-                optionData = new EnumOptionData(new Integer(0).longValue(), codePrefix + type.getCode(), "invalid");
+                optionData = new EnumOptionData(Integer.valueOf(0).longValue(), codePrefix + type.getCode(), "invalid");
             break;
         }
         return optionData;
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountReadPlatformServiceImpl.java
index 7a5dd9a..dd4b0c8 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountReadPlatformServiceImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountReadPlatformServiceImpl.java
@@ -1211,7 +1211,7 @@ public class SavingsAccountReadPlatformServiceImpl implements SavingsAccountRead
     public boolean isAccountBelongsToClient(final Long clientId, final Long accountId, final DepositAccountType depositAccountType,
             final String currencyCode) {
         try {
-            final StringBuffer buff = new StringBuffer("select count(*) from m_savings_account sa ") ;
+            final StringBuilder buff = new StringBuilder("select count(*) from m_savings_account sa ") ;
             buff.append(" where sa.id = ? and sa.client_id = ? and sa.deposit_type_enum = ? and sa.currency_code = ? and sa.status_enum = 300");
             return this.jdbcTemplate.queryForObject(buff.toString(),
                     new Object[] { accountId, clientId, depositAccountType.getValue(), currencyCode }, Integer.class) > 0;
@@ -1257,4 +1257,4 @@ public class SavingsAccountReadPlatformServiceImpl implements SavingsAccountRead
             throw new SavingsAccountNotFoundException(accountId);
         }
     }
-}
\ No newline at end of file
+}
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/search/service/SearchReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/search/service/SearchReadPlatformServiceImpl.java
index 0f315f6..a8d5a76 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/search/service/SearchReadPlatformServiceImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/search/service/SearchReadPlatformServiceImpl.java
@@ -113,7 +113,7 @@ public class SearchReadPlatformServiceImpl implements SearchReadPlatformService
             final String groupMatchSql = " (select IF(g.level_id=1,'CENTER','GROUP') as entityType, g.id as entityId, g.display_name as entityName, g.external_id as entityExternalId, g.account_no as entityAccountNo "
                     + " , g.office_id as parentId, o.name as parentName, null as entityMobileNo, g.status_enum as entityStatusEnum, null as parentType "
                     + " from m_group g join m_office o on o.id = g.office_id where o.hierarchy like :hierarchy and (g.account_no like :search or g.display_name like :search or g.external_id like :search or g.id like :search )) ";
-            final StringBuffer sql = new StringBuffer();
+            final StringBuilder sql = new StringBuilder();
 
             if (searchConditions.isClientSearch()) {
                 sql.append(clientMatchSql).append(union);
@@ -211,7 +211,7 @@ public class SearchReadPlatformServiceImpl implements SearchReadPlatformService
         // TODO- build the query dynamically based on selected entity types, for
         // now adding query for only loan entity.
         public String schema(final AdHocQuerySearchConditions searchConditions, final MapSqlParameterSource params) {
-            final StringBuffer sql = new StringBuffer();
+            final StringBuilder sql = new StringBuilder();
             sql.append(
                     "Select a.name as officeName, a.Product as productName, a.cnt as 'count', a.outstandingAmt as outstanding, a.percentOut as percentOut  ")
                     .append("from (select mo.name, mp.name Product, sum(ifnull(ml.total_expected_repayment_derived,0.0)) TotalAmt, count(*) cnt, ")
@@ -306,7 +306,7 @@ public class SearchReadPlatformServiceImpl implements SearchReadPlatformService
             return sql.toString();
         }
 
-        private void checkAndUpdateWhereClause(final StringBuffer sql) {
+        private void checkAndUpdateWhereClause(final StringBuilder sql) {
             if (isWhereClauseAdded) {
                 sql.append(" and ");
             } else {
@@ -330,4 +330,4 @@ public class SearchReadPlatformServiceImpl implements SearchReadPlatformService
 
     }
 
-}
\ No newline at end of file
+}
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/account/service/SelfAccountTransferReadServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/account/service/SelfAccountTransferReadServiceImpl.java
index af1c2e9..94d8dbc 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/account/service/SelfAccountTransferReadServiceImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/account/service/SelfAccountTransferReadServiceImpl.java
@@ -44,7 +44,7 @@ public class SelfAccountTransferReadServiceImpl implements
     public Collection<SelfAccountTemplateData> retrieveSelfAccountTemplateData(
             AppUser user) {
         SelfAccountTemplateMapper mapper = new SelfAccountTemplateMapper();
-        StringBuffer sql = new StringBuffer()
+        StringBuilder sql = new StringBuilder()
                 .append("select s.id as accountId, ")
                 .append("s.account_no as accountNo, ")
                 .append("2 as accountType, ")
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccount.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccount.java
index 2b4d8ef..e54cd7a 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccount.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccount.java
@@ -420,7 +420,7 @@ public class ShareAccount extends AbstractPersistableCustom<Long> {
         this.closedDate = null;
         this.closedBy = null;
         this.totalSharesApproved = null;
-        Long tempTotalShares = new Long(0);
+        Long tempTotalShares = Long.valueOf(0);
         for (ShareAccountTransaction transaction : this.shareAccountTransactions) {
             if(transaction.isPurchasTransaction()) {
                 transaction.undoApprove();
@@ -540,8 +540,8 @@ public class ShareAccount extends AbstractPersistableCustom<Long> {
         for(ShareAccountTransaction transaction: this.shareAccountTransactions) {
             transaction.setActive(false);
         }
-        this.totalSharesApproved = new Long(0) ;
-        this.totalSharesPending = new Long(0) ;
+        this.totalSharesApproved = Long.valueOf(0) ;
+        this.totalSharesPending = Long.valueOf(0) ;
     }
 
     public void removeCharges() {
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/serialization/ShareAccountDataSerializer.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/serialization/ShareAccountDataSerializer.java
index 368856f..2dc3b84 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/serialization/ShareAccountDataSerializer.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/serialization/ShareAccountDataSerializer.java
@@ -479,13 +479,13 @@ public class ShareAccountDataSerializer {
 
     private void validateTotalSubsribedShares(final ShareAccount account, final ShareAccountTransaction transaction, final  DataValidatorBuilder baseDataValidator) {
         Long totalSubsribedShares = account.getShareProduct().getSubscribedShares() ;
-        Long requested = new Long(0) ;
+        Long requested = Long.valueOf(0) ;
         if(transaction.isActive() && transaction.isPendingForApprovalTransaction()) {
            requested +=transaction.getTotalShares() ;
         }
         Long totalSharesIssuable = account.getShareProduct().getSharesIssued() ;
         if(totalSharesIssuable == null) totalSharesIssuable = account.getShareProduct().getTotalShares() ;
-        if(totalSubsribedShares == null) totalSubsribedShares = new Long(0) ;
+        if(totalSubsribedShares == null) totalSubsribedShares = Long.valueOf(0) ;
         if((totalSubsribedShares+requested) > totalSharesIssuable) {
             baseDataValidator.reset().parameter(ShareAccountApiConstants.requestedshares_paramname).value(requested)
             .failWithCodeNoParameterAddedToErrorCode("shares.requested.can.not.be.approved.exceeding.totalshares.issuable");
@@ -737,7 +737,7 @@ public class ShareAccountDataSerializer {
                 purchasedShares.add(purchasedSharesId);
             }
             if (totalShares > 0) {
-                account.updateApprovedShares(new Long(totalShares));
+                account.updateApprovedShares(Long.valueOf(totalShares));
             }
         }
         if (!dataValidationErrors.isEmpty()) { throw new PlatformApiDataValidationException(dataValidationErrors); }
@@ -783,7 +783,7 @@ public class ShareAccountDataSerializer {
                 purchasedShares.add(purchasedSharesId);
             }
             if (totalShares > 0) {
-                account.removePendingShares(new Long(totalShares));
+                account.removePendingShares(Long.valueOf(totalShares));
             }
         }
         actualChanges.put(ShareAccountApiConstants.requestedshares_paramname, purchasedShares);
@@ -862,8 +862,8 @@ public class ShareAccountDataSerializer {
         final Integer lockinPeriod = account.getLockinPeriodFrequency();
         final PeriodFrequencyType periodType = account.getLockinPeriodFrequencyType();
         if (lockinPeriod == null && periodType == null) { return; }
-        Long totalSharesCanBeRedeemed = new Long(0);
-        Long totalSharesPurchasedBeforeRedeem = new Long(0) ;
+        Long totalSharesCanBeRedeemed = Long.valueOf(0);
+        Long totalSharesPurchasedBeforeRedeem = Long.valueOf(0) ;
         boolean isPurchaseTransactionExist = false ;
 
         Set<ShareAccountTransaction> transactions = account.getShareAccountTransactions();
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/PurchasedSharesReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/PurchasedSharesReadPlatformServiceImpl.java
index fa5edde..927b8fb 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/PurchasedSharesReadPlatformServiceImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/PurchasedSharesReadPlatformServiceImpl.java
@@ -55,7 +55,7 @@ public class PurchasedSharesReadPlatformServiceImpl implements
         private final String schema ;
 
         public PurchasedSharesDataRowMapper() {
-            StringBuffer buff = new StringBuffer()
+            StringBuilder buff = new StringBuilder()
             .append("saps.id, saps.account_id, saps.transaction_date, saps.total_shares, saps.unit_price, ")
             .append("saps.status_enum, saps.type_enum, saps.amount, saps.charge_amount as chargeamount, ")
             .append("saps.amount_paid as amountPaid")
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountChargeReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountChargeReadPlatformServiceImpl.java
index 85ebc38..76c36dc 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountChargeReadPlatformServiceImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountChargeReadPlatformServiceImpl.java
@@ -70,7 +70,7 @@ public class ShareAccountChargeReadPlatformServiceImpl implements
         private final String schema;
 
         public ShareAccountChargeMapper() {
-            StringBuffer buff = new StringBuffer()
+            StringBuilder buff = new StringBuilder()
                     .append("sc.id as id, c.id as chargeId, sc.account_id as accountId, c.name as name, ")
                     .append("sc.amount as amountDue, sc.amount_paid_derived as amountPaid, ")
                     .append("sc.amount_waived_derived as amountWaived, sc.amount_writtenoff_derived as amountWrittenOff, ")
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountReadPlatformServiceImpl.java
index 7fa62a2..a8d4023 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountReadPlatformServiceImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountReadPlatformServiceImpl.java
@@ -253,7 +253,7 @@ public class ShareAccountReadPlatformServiceImpl implements ShareAccountReadPlat
         public ShareAccountMapper(final Collection<ShareAccountChargeData> charges, final Collection<ShareAccountTransactionData> purchasedShares) {
             this.charges = charges;
             this.purchasedShares = purchasedShares;
-            StringBuffer buff = new StringBuffer()
+            StringBuilder buff = new StringBuilder()
                     .append("sa.id as id, sa.external_id as externalId, sa.status_enum as statusEnum, ")
                     .append("sa.savings_account_id, msa.account_no as savingsAccNo, ")
                     .append("c.id as clientId, c.display_name as clientName, ")
@@ -443,7 +443,7 @@ public class ShareAccountReadPlatformServiceImpl implements ShareAccountReadPlat
         private final String schema;
 
         public PurchasedSharesDataRowMapper() {
-            StringBuffer buff = new StringBuffer()
+            StringBuilder buff = new StringBuilder()
                     .append("saps.id as purchasedId, saps.account_id as accountId, saps.transaction_date as transactionDate, saps.total_shares as purchasedShares, saps.unit_price as unitPrice, ")
                     .append("saps.status_enum as purchaseStatus, saps.type_enum as purchaseType, saps.amount as amount, saps.charge_amount as chargeamount, ")
                     .append("saps.amount_paid as amountPaid ");
@@ -479,7 +479,7 @@ public class ShareAccountReadPlatformServiceImpl implements ShareAccountReadPlat
         private final String schema;
 
         ShareAccountDividendRowMapper() {
-            StringBuffer buff = new StringBuffer()
+            StringBuilder buff = new StringBuilder()
                     .append("spdp.created_date, sadd.id, sadd.amount, sadd.savings_transaction_id, sadd.status ")
                     .append(" from m_share_account_dividend_details sadd ")
                     .append("JOIN m_share_product_dividend_pay_out spdp ON spdp.id = sadd.dividend_pay_out_id ");
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountWritePlatformServiceJpaRepositoryImpl.java
index f95bacd..022808e 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountWritePlatformServiceJpaRepositoryImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountWritePlatformServiceJpaRepositoryImpl.java
@@ -270,7 +270,7 @@ public class ShareAccountWritePlatformServiceJpaRepositoryImpl implements ShareA
             }
             Set<ShareAccountTransaction> transactions = account.getShareAccountTransactions();
             Set<ShareAccountTransaction> journalTransactions = new HashSet<>();
-            Long totalSubsribedShares = new Long(0) ;
+            Long totalSubsribedShares = Long.valueOf(0) ;
 
             for (ShareAccountTransaction transaction : transactions) {
                 if (transaction.isActive() && transaction.isPurchasTransaction()) {
@@ -401,7 +401,7 @@ public class ShareAccountWritePlatformServiceJpaRepositoryImpl implements ShareA
             if (!changes.isEmpty()) {
                 this.shareAccountRepository.save(account);
                 ArrayList<Long> transactionIds = (ArrayList<Long>) changes.get(ShareAccountApiConstants.requestedshares_paramname);
-                Long totalSubscribedShares = new Long(0) ;
+                Long totalSubscribedShares = Long.valueOf(0) ;
                 if (transactionIds != null) {
                     Set<ShareAccountTransaction> transactions = new HashSet<>();
                     for (Long id : transactionIds) {
@@ -411,7 +411,7 @@ public class ShareAccountWritePlatformServiceJpaRepositoryImpl implements ShareA
                     }
                     this.journalEntryWritePlatformService.createJournalEntriesForShares(populateJournalEntries(account, transactions));
                 }
-                if(!totalSubscribedShares.equals(new Long(0))) {
+                if(!totalSubscribedShares.equals(Long.valueOf(0))) {
                     ShareProduct shareProduct = account.getShareProduct() ;
                     shareProduct.addSubscribedShares(totalSubscribedShares);
                     this.shareProductRepository.save(shareProduct);
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/domain/ShareProduct.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/domain/ShareProduct.java
index 4fe9de8..d274504 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/domain/ShareProduct.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/domain/ShareProduct.java
@@ -416,7 +416,7 @@ public class ShareProduct extends AbstractAuditableCustom<AppUser, Long> {
 
     public void addSubscribedShares(final Long subscribedShares) {
         if(this.totalSubscribedShares == null) {
-            this.totalSubscribedShares = new Long(0) ;
+            this.totalSubscribedShares = Long.valueOf(0) ;
         }
         this.totalSubscribedShares += subscribedShares ;
     }
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductReadPlatformServiceImpl.java
index 90b1237..21ae1ef 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductReadPlatformServiceImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductReadPlatformServiceImpl.java
@@ -204,7 +204,7 @@ public class ShareProductReadPlatformServiceImpl implements ProductReadPlatformS
 
         Collection<ShareProductMarketPriceData> shareMarketCollection;
         Collection<ChargeData> charges;
-        private StringBuffer buff = new StringBuffer();
+        private StringBuilder buff = new StringBuilder();
 
         ShareProductRowMapper(Collection<ShareProductMarketPriceData> shareMarketCollection, Collection<ChargeData> charges) {
             this.shareMarketCollection = shareMarketCollection;
@@ -284,4 +284,4 @@ public class ShareProductReadPlatformServiceImpl implements ProductReadPlatformS
             return this.buff.toString();
         }
     }
-}
\ No newline at end of file
+}
diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/api/LookupTableApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/spm/api/LookupTableApiResource.java
index 1f60e80..b39ea6f 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/spm/api/LookupTableApiResource.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/spm/api/LookupTableApiResource.java
@@ -88,7 +88,7 @@ public class LookupTableApiResource {
             return LookupTableMapper.map(lookupTables);
         }
 
-        return Collections.EMPTY_LIST;
+        return Collections.emptyList();
     }
 
     @GET
diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/util/LookupTableMapper.java b/fineract-provider/src/main/java/org/apache/fineract/spm/util/LookupTableMapper.java
index 872132d..60e1fe4 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/spm/util/LookupTableMapper.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/spm/util/LookupTableMapper.java
@@ -53,7 +53,7 @@ public class LookupTableMapper {
             return new ArrayList<>(lookupTableDataMap.values());
         }
 
-        return Collections.EMPTY_LIST;
+        return Collections.emptyList();
     }
 
     public static List<LookupTable> map(final LookupTableData lookupTableData, final Survey survey) {
diff --git a/fineract-provider/src/test/java/org/apache/fineract/notification/StorageTest.java b/fineract-provider/src/test/java/org/apache/fineract/notification/StorageTest.java
index bf9a153..d60b585 100644
--- a/fineract-provider/src/test/java/org/apache/fineract/notification/StorageTest.java
+++ b/fineract-provider/src/test/java/org/apache/fineract/notification/StorageTest.java
@@ -125,7 +125,7 @@ public class StorageTest {
         verify(this.notificationGeneratorWritePlatformService, times(1)).create(refEq(notification));
         verify(this.notificationMapperWritePlatformService, times(1)).create(refEq(notificationMapper));
         verify(this.notificationGeneratorReadRepositoryWrapper, times(1)).findById(1L);
-        assertEquals(actualGeneratedNotificationId, new Long(1));
+        assertEquals(actualGeneratedNotificationId, Long.valueOf(1));
     }
 
     private String getCurrentDateTime() {
diff --git a/fineract-provider/src/test/java/org/apache/fineract/notification/TopicTest.java b/fineract-provider/src/test/java/org/apache/fineract/notification/TopicTest.java
index 10939eb..aab72ca 100644
--- a/fineract-provider/src/test/java/org/apache/fineract/notification/TopicTest.java
+++ b/fineract-provider/src/test/java/org/apache/fineract/notification/TopicTest.java
@@ -79,7 +79,7 @@ public class TopicTest {
 
         verify(this.roleRepository, times(1)).save(role);
         verify(this.topicWritePltfService, times(1)).create(refEq(topic));
-        assertEquals(topicId, new Long(1));
+        assertEquals(topicId, Long.valueOf(1));
 
     }
 
@@ -97,7 +97,7 @@ public class TopicTest {
         Long subscriberId = this.topicSubscriberWritePltfService.create(topicSubscriber);
 
         verify(this.topicSubscriberWritePltfService, times(1)).create(refEq(topicSubscriber));
-        assertEquals(subscriberId, new Long(1));
+        assertEquals(subscriberId, Long.valueOf(1));
 
     }
 
diff --git a/fineract-provider/src/test/java/org/apache/fineract/template/TemplateMergeServiceTest.java b/fineract-provider/src/test/java/org/apache/fineract/template/TemplateMergeServiceTest.java
index 42c6326..68f31e5 100644
--- a/fineract-provider/src/test/java/org/apache/fineract/template/TemplateMergeServiceTest.java
+++ b/fineract-provider/src/test/java/org/apache/fineract/template/TemplateMergeServiceTest.java
@@ -20,7 +20,6 @@ package org.apache.fineract.template;
 
 import static org.junit.Assert.assertEquals;
 
-import com.google.common.base.Charsets;
 import com.google.common.io.Resources;
 import com.google.common.reflect.TypeToken;
 import com.google.gson.Gson;
@@ -32,6 +31,7 @@ import java.lang.reflect.Field;
 import java.lang.reflect.Type;
 import java.math.RoundingMode;
 import java.net.MalformedURLException;
+import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -83,8 +83,8 @@ public class TemplateMergeServiceTest {
         Map<String, Object> scopes = new HashMap<>();
         scopes.put("installments", installments);
 
-        String templateText = Resources.toString(Resources.getResource("template.mustache"), Charsets.UTF_8);
-        String expectedOutput = Resources.toString(Resources.getResource("template-expected.html"), Charsets.UTF_8);
+        String templateText = Resources.toString(Resources.getResource("template.mustache"), StandardCharsets.UTF_8);
+        String expectedOutput = Resources.toString(Resources.getResource("template-expected.html"), StandardCharsets.UTF_8);
 
         String output = compileTemplateText(templateText, scopes);
         assertEquals(expectedOutput, output);


Mime
View raw message