Skip to content

Replace Long.valueOf with Long.parseLong#15

Merged
sasaxie merged 1 commit intotronprotocol:developfrom
khuezy:send-command-parse-long
Dec 29, 2017
Merged

Replace Long.valueOf with Long.parseLong#15
sasaxie merged 1 commit intotronprotocol:developfrom
khuezy:send-command-parse-long

Conversation

@khuezy
Copy link
Contributor

@khuezy khuezy commented Dec 28, 2017

What does this PR do?
Replaces function call to parse transaction amount from send parameters.

Why are these changes required?
To make code a little more efficient.

Long.valueOf calls parseLong and returns a new Long object.

 public static Long valueOf(String s) throws NumberFormatException {
   return new Long(parseLong(s, 10));
 }

A primitive long seems to be sufficient.

This PR has been tested by:

@sasaxie
Copy link
Contributor

sasaxie commented Dec 29, 2017

LGTM

@sasaxie sasaxie merged commit 8224183 into tronprotocol:develop Dec 29, 2017
conglinduye pushed a commit that referenced this pull request Jan 5, 2018
zhaohong pushed a commit that referenced this pull request Feb 5, 2018
 Y7SS+OhvhTlhl711b0iLvzRPRM0NJn3+r/s/u5DZs0NSZM/QPZKJeOm9zli9tOWo
 7jBmYnswhXet8dH1tPYhIQRT35p33SuzGY6HUsCQhtolLzzBfXtasUs+2YRcAzBJ
 zJG3JgevB5Tgb9X1u3jKAiAp/hQ6zulO1wYUX9K0LsiCu8Q60emYDkMD301uLo9e
 WK8ffLmPxw6JA582/2GI0zUPxp51WgbAdWDc/+F7wVlPmY8uCR+2BRzciOiJ/GDT
 PCqyHXvZsln7ShK1ITjCZ/W8So4Gpy1N9s4og90CnI0jQtIInP5dI4nQ4NvAdgY=
 =ZNa0
 -----END PGP SIGNATURE-----
 

Merge pull request #15 from tron-network/feature/contract

Feature/contract
zhaohong pushed a commit that referenced this pull request Feb 5, 2018
 zJNi793OQQIrGC22hcPSO4FsOzwIRdKYFDFxRqzoQLK9fCM7LjcJZcxIWfVv3PYZ
 biwEagRf4VbmVwH5Fs+jheGw/9LgIPjeLkwY197l85gS6IcbIaib18BAu2TUu/Ug
 6P3XKkfqih17YLMCeNyrPq9OwkEI5jLB+uOQi/9Z1gb/7MpD5bQur1hqpdN+q6xo
 n4lSMEzP3R4/vDgQOTTut8jkcd5v8GmodXztBj2NOXwA+guek2co4p3b/OiQnoVV
 S5aLdVNv0lgs+aUHDnz0GLKCEfBaWfTp2F2B7Y9JbtG2enEyiZqDMxVlDsKgjjM=
 =ssm+
 -----END PGP SIGNATURE-----
 

Merge pull request #15 from khuezy/send-command-parse-long

:zap:perf: Replace Long.valueOf with Long.parseLong
@ybhgenius
Copy link
Contributor

Hello, I am a crew member of TRON, and now we are planning to provide an incentive for your contribution. Please leave me your email address. Thanks.

@khuezy
Copy link
Contributor Author

khuezy commented Mar 15, 2018

@ybhgenius Hi, my email is: khuelude@gmail.com

CodeNinjaEvan added a commit that referenced this pull request Mar 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants