回答編集履歴
2
インデントの修正
test
CHANGED
@@ -34,13 +34,13 @@
|
|
34
34
|
|
35
35
|
if (price.intValue() >= 0)
|
36
36
|
|
37
|
-
// priceが0以上の場合はそのまま代入
|
37
|
+
// priceが0以上の場合はそのまま代入
|
38
38
|
|
39
39
|
this.price = price;
|
40
40
|
|
41
41
|
} else {
|
42
42
|
|
43
|
-
// 0以下の場合は例外をスローする
|
43
|
+
// 0以下の場合は例外をスローする
|
44
44
|
|
45
45
|
throw new HogeException("price is NOT positive number.");
|
46
46
|
|
1
ソースコードミス
test
CHANGED
@@ -32,7 +32,7 @@
|
|
32
32
|
|
33
33
|
public void setPrice(Integer price) {
|
34
34
|
|
35
|
-
if (price.intValue >= 0)
|
35
|
+
if (price.intValue() >= 0)
|
36
36
|
|
37
37
|
// priceが0以上の場合はそのまま代入
|
38
38
|
|