[pi-code-cleaning] The unnecessary @supressWarnings of the code removed
authorNaroa Iriarte <naroa.iriarte@openbravo.com>
Wed, 27 Apr 2016 17:10:09 +0200
changeset 29522 712fa343d0d6
parent 29521 02c92e727d26
child 29523 d14b1ea13eb2
[pi-code-cleaning] The unnecessary @supressWarnings of the code removed

There were some unnecessary @supressWarnings that have been erased
to clean up the code.
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/MatchTransaction.java
modules/org.openbravo.client.application/src/org/openbravo/client/application/event/ElementValueEventHandler.java
modules/org.openbravo.client.application/src/org/openbravo/client/application/event/LocationSettingsHandler.java
modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/BaseKernelServlet.java
modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/RequestContext.java
modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/freemarker/FreemarkerTemplateProcessor.java
src/org/openbravo/costing/CostingAlgorithm.java
src/org/openbravo/erpCommon/utility/Utility.java
src/org/openbravo/erpCommon/utility/reporting/printing/PrintInvoices.java
src/org/openbravo/erpCommon/utility/reporting/printing/PrintOrders.java
src/org/openbravo/erpCommon/utility/reporting/printing/PrintQuotations.java
src/org/openbravo/erpCommon/utility/reporting/printing/PrintShipments.java
src/org/openbravo/event/CharacteristicValueEventHandler.java
src/org/openbravo/event/ProductCharacteristicValueEventHandler.java
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/MatchTransaction.java	Wed Apr 27 16:12:38 2016 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/MatchTransaction.java	Wed Apr 27 17:10:09 2016 +0200
@@ -361,7 +361,6 @@
     return ((FIN_ReconciliationLine_v) obc.uniqueResult()).getTransactionDate();
   }
 
-  @SuppressWarnings("unused")
   private void printPage(HttpServletResponse response, VariablesSecureApp vars, String strOrgId,
       String strWindowId, String strTabId, String strPaymentTypeFilter,
       String strFinancialAccountId, String reconciliationId, String strShowCleared,
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/ElementValueEventHandler.java	Wed Apr 27 16:12:38 2016 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/ElementValueEventHandler.java	Wed Apr 27 17:10:09 2016 +0200
@@ -54,7 +54,6 @@
     return entities;
   }
 
-  @SuppressWarnings("unused")
   public void onSave(@Observes EntityNewEvent event) {
     if (!isValidEvent(event)) {
       return;
@@ -96,7 +95,6 @@
     doIt(account);
   }
 
-  @SuppressWarnings("unused")
   private void doIt(ElementValue account) {
     boolean isNumber = true;
     try {
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/LocationSettingsHandler.java	Wed Apr 27 16:12:38 2016 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/LocationSettingsHandler.java	Wed Apr 27 17:10:09 2016 +0200
@@ -73,7 +73,6 @@
     }
   }
 
-  @SuppressWarnings("unused")
   private void checkCorrectValues(String numericmask, String datetimeformat, String dateformat) {
     if (numericmask != null) {
       if (checkNumericMask(numericmask)) {
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/BaseKernelServlet.java	Wed Apr 27 16:12:38 2016 +0200
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/BaseKernelServlet.java	Wed Apr 27 17:10:09 2016 +0200
@@ -34,7 +34,6 @@
  * 
  * @author mtaal
  */
-@SuppressWarnings("deprecation")
 public abstract class BaseKernelServlet extends HttpSecureAppServlet {
   protected static final String RESPONSE_HEADER_ETAG = "ETag";
   protected static final String RESPONSE_HEADER_LASTMODIFIED = "Last-Modified";
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/RequestContext.java	Wed Apr 27 16:12:38 2016 +0200
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/RequestContext.java	Wed Apr 27 17:10:09 2016 +0200
@@ -49,7 +49,6 @@
  * 
  * @author mtaal
  */
-@SuppressWarnings("deprecation")
 public class RequestContext {
   private static ServletContext servletContext = null;
 
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/freemarker/FreemarkerTemplateProcessor.java	Wed Apr 27 16:12:38 2016 +0200
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/freemarker/FreemarkerTemplateProcessor.java	Wed Apr 27 17:10:09 2016 +0200
@@ -93,7 +93,6 @@
    * @see
    * org.openbravo.client.kernel.TemplateProcessor#validate(org.openbravo.client.kernel.Template)
    */
-  @SuppressWarnings("unused")
   public void validate(Template template) throws ValidationException {
     try {
       final String source = createTemplateSource(template);
--- a/src/org/openbravo/costing/CostingAlgorithm.java	Wed Apr 27 16:12:38 2016 +0200
+++ b/src/org/openbravo/costing/CostingAlgorithm.java	Wed Apr 27 17:10:09 2016 +0200
@@ -297,7 +297,6 @@
 
     if (ppDate.before(olDate) && stdCostDate.before(olDate)) {
       // purchase order
-      @SuppressWarnings("null")
       BigDecimal cost = transaction.getMovementQuantity().abs().multiply(orderLine.getUnitPrice());
       if (costCurrency.getId().equals(orderLine.getCurrency().getId())) {
         return cost;
--- a/src/org/openbravo/erpCommon/utility/Utility.java	Wed Apr 27 16:12:38 2016 +0200
+++ b/src/org/openbravo/erpCommon/utility/Utility.java	Wed Apr 27 17:10:09 2016 +0200
@@ -1885,7 +1885,6 @@
    *          a String
    * @return true if the string can be parsed
    */
-  @SuppressWarnings("unused")
   public static boolean isBigDecimal(String str) {
     try {
       new BigDecimal(str.trim());
--- a/src/org/openbravo/erpCommon/utility/reporting/printing/PrintInvoices.java	Wed Apr 27 16:12:38 2016 +0200
+++ b/src/org/openbravo/erpCommon/utility/reporting/printing/PrintInvoices.java	Wed Apr 27 17:10:09 2016 +0200
@@ -37,7 +37,6 @@
     boolHist = false;
   }
 
-  @SuppressWarnings("unchecked")
   public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException,
       ServletException {
     VariablesSecureApp vars = new VariablesSecureApp(request);
--- a/src/org/openbravo/erpCommon/utility/reporting/printing/PrintOrders.java	Wed Apr 27 16:12:38 2016 +0200
+++ b/src/org/openbravo/erpCommon/utility/reporting/printing/PrintOrders.java	Wed Apr 27 17:10:09 2016 +0200
@@ -37,7 +37,6 @@
     boolHist = false;
   }
 
-  @SuppressWarnings("unchecked")
   public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException,
       ServletException {
     VariablesSecureApp vars = new VariablesSecureApp(request);
--- a/src/org/openbravo/erpCommon/utility/reporting/printing/PrintQuotations.java	Wed Apr 27 16:12:38 2016 +0200
+++ b/src/org/openbravo/erpCommon/utility/reporting/printing/PrintQuotations.java	Wed Apr 27 17:10:09 2016 +0200
@@ -37,7 +37,6 @@
     boolHist = false;
   }
 
-  @SuppressWarnings("unchecked")
   public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException,
       ServletException {
     VariablesSecureApp vars = new VariablesSecureApp(request);
--- a/src/org/openbravo/erpCommon/utility/reporting/printing/PrintShipments.java	Wed Apr 27 16:12:38 2016 +0200
+++ b/src/org/openbravo/erpCommon/utility/reporting/printing/PrintShipments.java	Wed Apr 27 17:10:09 2016 +0200
@@ -37,7 +37,6 @@
     boolHist = false;
   }
 
-  @SuppressWarnings("unchecked")
   public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException,
       ServletException {
     VariablesSecureApp vars = new VariablesSecureApp(request);
--- a/src/org/openbravo/event/CharacteristicValueEventHandler.java	Wed Apr 27 16:12:38 2016 +0200
+++ b/src/org/openbravo/event/CharacteristicValueEventHandler.java	Wed Apr 27 17:10:09 2016 +0200
@@ -54,14 +54,11 @@
     return entities;
   }
 
-  @SuppressWarnings("unused")
-  public void onTransactionBegin(@Observes
-  TransactionBeginEvent event) {
+  public void onTransactionBegin(@Observes TransactionBeginEvent event) {
     chvalueUpdated.set(null);
   }
 
-  public void onUpdate(@Observes
-  EntityUpdateEvent event) {
+  public void onUpdate(@Observes EntityUpdateEvent event) {
     if (!isValidEvent(event)) {
       return;
     }
@@ -100,8 +97,7 @@
     }
   }
 
-  public void onTransactionCompleted(@Observes
-  TransactionCompletedEvent event) {
+  public void onTransactionCompleted(@Observes TransactionCompletedEvent event) {
     String strChValueId = chvalueUpdated.get();
     chvalueUpdated.set(null);
     if (StringUtils.isBlank(strChValueId) || event.getTransaction().wasRolledBack()) {
--- a/src/org/openbravo/event/ProductCharacteristicValueEventHandler.java	Wed Apr 27 16:12:38 2016 +0200
+++ b/src/org/openbravo/event/ProductCharacteristicValueEventHandler.java	Wed Apr 27 17:10:09 2016 +0200
@@ -53,7 +53,6 @@
     return entities;
   }
 
-  @SuppressWarnings("unused")
   public void onTransactionBegin(@Observes TransactionBeginEvent event) {
     prodchvalueUpdated.set(null);
   }