cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i..@apache.org
Subject [1/9] git commit: CB-4908 Long.valueOf(0) instead of new Long(0)
Date Wed, 23 Apr 2014 18:57:14 GMT
Repository: cordova-plugin-globalization
Updated Branches:
  refs/heads/master 328c296bd -> 700a8e3e5


CB-4908 Long.valueOf(0) instead of new Long(0)

Use Long.valueOf(0) instead of new Long(0). Also do the same for new
Integer(0).

Reason:
http://stackoverflow.com/a/13145360/1412800


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-globalization/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-globalization/commit/19d81868
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-globalization/tree/19d81868
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-globalization/diff/19d81868

Branch: refs/heads/master
Commit: 19d81868b90ba187112b395b9fb64c7a6798913b
Parents: 7160a1f
Author: Bas Bosman <sbg.bosman@mindef.nl>
Authored: Sun Jan 26 22:28:53 2014 +0100
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Mon Feb 10 15:23:42 2014 -0500

----------------------------------------------------------------------
 src/android/Globalization.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-globalization/blob/19d81868/src/android/Globalization.java
----------------------------------------------------------------------
diff --git a/src/android/Globalization.java b/src/android/Globalization.java
index 94dcda8..588fe4a 100644
--- a/src/android/Globalization.java
+++ b/src/android/Globalization.java
@@ -226,7 +226,7 @@ public class Globalization extends CordovaPlugin  {
             obj.put("hour", time.hour);
             obj.put("minute", time.minute);
             obj.put("second", time.second);
-            obj.put("millisecond", new Long(0));
+            obj.put("millisecond", Long.valueOf(0));
             return obj;
         }catch(Exception ge){
             throw new GlobalizationError(GlobalizationError.PARSING_ERROR);
@@ -496,7 +496,7 @@ public class Globalization extends CordovaPlugin  {
             obj.put("pattern", fmt.toPattern());
             obj.put("symbol", symbol);
             obj.put("fraction", fmt.getMinimumFractionDigits());
-            obj.put("rounding", new Integer(0));
+            obj.put("rounding", Integer.valueOf(0));
             obj.put("positive", fmt.getPositivePrefix());
             obj.put("negative", fmt.getNegativePrefix());
             obj.put("decimal", String.valueOf(fmt.getDecimalFormatSymbols().getDecimalSeparator()));
@@ -541,7 +541,7 @@ public class Globalization extends CordovaPlugin  {
             obj.put("pattern", fmt.toPattern());
             obj.put("code", currency.getCurrencyCode());
             obj.put("fraction", fmt.getMinimumFractionDigits());
-            obj.put("rounding", new Integer(0));
+            obj.put("rounding", Integer.valueOf(0));
             obj.put("decimal", String.valueOf(fmt.getDecimalFormatSymbols().getDecimalSeparator()));
             obj.put("grouping", String.valueOf(fmt.getDecimalFormatSymbols().getGroupingSeparator()));
 


Mime
View raw message