From: Marco Zanon Date: Fri, 11 Dec 2015 14:18:38 +0000 (+0000) Subject: Modified code to remove some warnings at compile time. X-Git-Tag: SVN-to-Git~80 X-Git-Url: https://gitweb.marcozanon.com/?a=commitdiff_plain;h=6d09a0898476f10cac9384b0a2d54655aea6326c;p=Macaco Modified code to remove some warnings at compile time. --- diff --git a/4.x/src/java/com/marcozanon/macaco/conversion/MDateConverter.java b/4.x/src/java/com/marcozanon/macaco/conversion/MDateConverter.java index e9282f7..31b7b26 100644 --- a/4.x/src/java/com/marcozanon/macaco/conversion/MDateConverter.java +++ b/4.x/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 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/4.x/src/java/com/marcozanon/macaco/conversion/MNumberConverter.java b/4.x/src/java/com/marcozanon/macaco/conversion/MNumberConverter.java index a266afa..c4e6e2c 100644 --- a/4.x/src/java/com/marcozanon/macaco/conversion/MNumberConverter.java +++ b/4.x/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 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()); } }