From: Marco Zanon <info@marcozanon.com>
Date: Fri, 11 Dec 2015 14:18:38 +0000 (+0000)
Subject: Modified code to remove some warnings at compile time.
X-Git-Tag: 4.1~5
X-Git-Url: https://gitweb.marcozanon.com/?a=commitdiff_plain;h=bb8a57750cdbd455ae32a9b790c37d49e805fa0a;p=Macaco

Modified code to remove some warnings at compile time.
---

diff --git a/src/java/com/marcozanon/macaco/conversion/MDateConverter.java b/src/java/com/marcozanon/macaco/conversion/MDateConverter.java
index e9282f7..31b7b26 100644
--- a/src/java/com/marcozanon/macaco/conversion/MDateConverter.java
+++ b/src/java/com/marcozanon/macaco/conversion/MDateConverter.java
@@ -57,9 +57,9 @@ public class MDateConverter extends MObject {
             throw new IllegalArgumentException("Invalid 'dateFormats': null.");
         }
         else {
-            Iterator i = dateFormats.iterator();
+            Iterator<String> i = dateFormats.iterator();
             while (i.hasNext()) {
-                MDateConverter.checkDateFormat((String)i.next());
+                MDateConverter.checkDateFormat(i.next());
             }
         }
         //
@@ -187,7 +187,7 @@ public class MDateConverter extends MObject {
         Date y = null;
         for (String dateFormat: this.getDateFormats()) {
             try {
-                y = this.getDateFromStringByParameters(x, dateFormat, this.getLocale(), this.getTimeZone());
+                y = MDateConverter.getDateFromStringByParameters(x, dateFormat, this.getLocale(), this.getTimeZone());
                 return y;
             }
             catch (MInvalidConversionFormatException exception) {
@@ -200,7 +200,7 @@ public class MDateConverter extends MObject {
     }
 
     public String getStringFromDate(Date x) {
-        return this.getStringFromDateByParameters(x, this.getDefaultDateFormat(), this.getLocale(), this.getTimeZone());
+        return MDateConverter.getStringFromDateByParameters(x, this.getDefaultDateFormat(), this.getLocale(), this.getTimeZone());
     }
 
     /* Helpers. */
diff --git a/src/java/com/marcozanon/macaco/conversion/MNumberConverter.java b/src/java/com/marcozanon/macaco/conversion/MNumberConverter.java
index a266afa..c4e6e2c 100644
--- a/src/java/com/marcozanon/macaco/conversion/MNumberConverter.java
+++ b/src/java/com/marcozanon/macaco/conversion/MNumberConverter.java
@@ -48,9 +48,9 @@ public class MNumberConverter extends MObject {
             throw new IllegalArgumentException("Invalid 'numberFormats': null.");
         }
         else {
-            Iterator i = numberFormats.iterator();
+            Iterator<String> i = numberFormats.iterator();
             while (i.hasNext()) {
-                MNumberConverter.checkNumberFormat((String)i.next());
+                MNumberConverter.checkNumberFormat(i.next());
             }
         }
         //
@@ -142,7 +142,7 @@ public class MNumberConverter extends MObject {
         BigDecimal y = null;
         for (String numberFormat: this.getNumberFormats()) {
             try {
-                y = this.getNumberFromStringByParameters(x, numberFormat, this.getLocale());
+                y = MNumberConverter.getNumberFromStringByParameters(x, numberFormat, this.getLocale());
                 return y;
             }
             catch (MInvalidConversionFormatException exception) {
@@ -155,7 +155,7 @@ public class MNumberConverter extends MObject {
     }
 
     public String getStringFromNumber(BigDecimal x) {
-        return this.getStringFromNumberByParameters(x, this.getDefaultNumberFormat(), this.getLocale());
+        return MNumberConverter.getStringFromNumberByParameters(x, this.getDefaultNumberFormat(), this.getLocale());
     }
 
 }