Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IntegerとBoxing #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

IntegerとBoxing #3

wants to merge 2 commits into from

Conversation

Gaddict
Copy link
Member

@Gaddict Gaddict commented Jan 27, 2016

No description provided.

@@ -0,0 +1,4 @@
// エラーが出ないからOKという考え方をやめ、型をしっかり考えた方が良い

final int sysCdCount = Integer.valueOf(m.get("UNIQUE_SYSTEM_CD_COUNT").toString());
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不必要な boxing/unboxing を行ってる様に見えます。 Integer.parseInt で良さそうですね。

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

この指摘は、Integer.valueOf(戻り値の型がIntegerという指摘)
受け取るのがintならparseIntの方が効率が良いという話

@Gaddict
Copy link
Member Author

Gaddict commented Jan 27, 2016

👍

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.

1 participant