You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2014/02/10 21:25:19 UTC
[jira] [Commented] (CB-4908) FB - Globalization.java - use valueOf
instead of new Long/new Integer
[ https://issues.apache.org/jira/browse/CB-4908?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13896960#comment-13896960 ]
ASF subversion and git services commented on CB-4908:
-----------------------------------------------------
Commit 19d81868b90ba187112b395b9fb64c7a6798913b in branch refs/heads/dev from [~BBosman]
[ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-globalization.git;h=19d8186 ]
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
> FB - Globalization.java - use valueOf instead of new Long/new Integer
> ---------------------------------------------------------------------
>
> Key: CB-4908
> URL: https://issues.apache.org/jira/browse/CB-4908
> Project: Apache Cordova
> Issue Type: Sub-task
> Components: Android
> Affects Versions: 2.9.0
> Reporter: Peter
> Priority: Minor
>
> Resolve FindBugs reported issues in *Globalization.java*:
> Before
> {code}
> obj.put("millisecond", new Long(0));
> {code}
> After
> {code}
> obj.put("millisecond", Long.valueOf(0));
> {code}
> Before (2 places)
> {code}
> obj.put("rounding", new Integer(0));
> {code}
> After
> {code}
> obj.put("rounding", Integer.valueOf(0));
> {code}
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)