From 2738cb51f23b5d6aac7290a90177eaf710f6ba6d Mon Sep 17 00:00:00 2001 From: Gaddict Date: Wed, 27 Jan 2016 14:15:51 +0900 Subject: [PATCH 1/2] =?UTF-8?q?Integer=E3=81=A8Boxing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- java/boxing/IntegerBoxing.java | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 java/boxing/IntegerBoxing.java diff --git a/java/boxing/IntegerBoxing.java b/java/boxing/IntegerBoxing.java new file mode 100644 index 0000000..cce04bf --- /dev/null +++ b/java/boxing/IntegerBoxing.java @@ -0,0 +1,4 @@ +// エラーが出ないからOKという考え方をやめ、型をしっかり考えた方が良い + + final int sysCdCount = Integer.valueOf(m.get("UNIQUE_SYSTEM_CD_COUNT").toString()); + final int dcfCdCount = Integer.valueOf(m.get("UNIQUE_DCF_DR_CD_COUNT").toString()); From 5089ff799bf5547d68bdc5a1e431d23bebc87bf0 Mon Sep 17 00:00:00 2001 From: Gaddict Date: Wed, 27 Jan 2016 15:04:44 +0900 Subject: [PATCH 2/2] =?UTF-8?q?[Java][Boxing]parseInt=E3=81=AB=E5=A4=89?= =?UTF-8?q?=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- java/boxing/IntegerBoxing.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/boxing/IntegerBoxing.java b/java/boxing/IntegerBoxing.java index cce04bf..b619e21 100644 --- a/java/boxing/IntegerBoxing.java +++ b/java/boxing/IntegerBoxing.java @@ -1,4 +1,4 @@ // エラーが出ないからOKという考え方をやめ、型をしっかり考えた方が良い - final int sysCdCount = Integer.valueOf(m.get("UNIQUE_SYSTEM_CD_COUNT").toString()); - final int dcfCdCount = Integer.valueOf(m.get("UNIQUE_DCF_DR_CD_COUNT").toString()); + final int sysCdCount = Integer.parseInt(m.get("UNIQUE_SYSTEM_CD_COUNT").toString()); + final int dcfCdCount = Integer.parseInt(m.get("UNIQUE_DCF_DR_CD_COUNT").toString());