related to ISSUE-43388: Finals added
authorIñigo Lerga <inigo.lerga@openbravo.com>
Tue, 03 Mar 2020 09:59:55 +0100
changeset 37151 2e054b8f16dc
parent 37150 864d0cc875ac
child 37152 9466c9337936
related to ISSUE 43388: Finals added

-Finals added
-No Sonarlint suggestions found
src/org/openbravo/event/ConversionRateEventHandler.java
--- a/src/org/openbravo/event/ConversionRateEventHandler.java	Tue Mar 03 09:46:52 2020 +0100
+++ b/src/org/openbravo/event/ConversionRateEventHandler.java	Tue Mar 03 09:59:55 2020 +0100
@@ -35,7 +35,7 @@
 import org.openbravo.model.common.currency.Currency;
 
 class ConversionRateEventHandler extends EntityPersistenceEventObserver {
-  private static Entity[] entities = {
+  private static final Entity[] entities = {
       ModelProvider.getInstance().getEntity(ConversionRate.ENTITY_NAME) };
 
   @Override
@@ -43,7 +43,7 @@
     return entities;
   }
 
-  public void onNew(@Observes EntityNewEvent event) {
+  public void onNew(final @Observes EntityNewEvent event) {
     if (!isValidEvent(event)) {
       return;
     }
@@ -57,7 +57,7 @@
     }
   }
 
-  public void onUpdate(@Observes EntityUpdateEvent event) {
+  public void onUpdate(final @Observes EntityUpdateEvent event) {
     if (!isValidEvent(event)) {
       return;
     }
@@ -72,8 +72,8 @@
   }
 
   // Check if exists another record using this currencyFrom - currencyTo in the same dates
-  private boolean existsRecord(String id, Client client, Currency currencyFrom, Currency currencyTo,
-      Date validFrom, Date validTo) {
+  private boolean existsRecord(final String id, final Client client, final Currency currencyFrom,
+      final Currency currencyTo, final Date validFrom, final Date validTo) {
     //@formatter:off
     final String hql = 
                   "select t.id" +
@@ -109,5 +109,4 @@
         .list()
         .isEmpty();
   }
-
 }