From 6eb7fa8f4b369dcb3a6d79ba4f8db6fa8746c6c2 Mon Sep 17 00:00:00 2001 From: imenuuu Date: Thu, 10 Oct 2024 20:56:58 +0900 Subject: [PATCH] =?UTF-8?q?refactor=20:=20null=20point=20Exception=20?= =?UTF-8?q?=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wineyapi/tastingNote/convertor/TastingNoteConvertor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Winey-API/src/main/java/com/example/wineyapi/tastingNote/convertor/TastingNoteConvertor.java b/Winey-API/src/main/java/com/example/wineyapi/tastingNote/convertor/TastingNoteConvertor.java index 33d34dd..d1dc514 100644 --- a/Winey-API/src/main/java/com/example/wineyapi/tastingNote/convertor/TastingNoteConvertor.java +++ b/Winey-API/src/main/java/com/example/wineyapi/tastingNote/convertor/TastingNoteConvertor.java @@ -86,7 +86,7 @@ public TastingNoteResponse.TasteAnalysisDTO TasteAnalysis(List tast sweetnessSum += tastingNote.getSweetness(); aciditySum += tastingNote.getAcidity(); - alcoholSum += tastingNote.getAlcohol(); + alcoholSum += (tastingNote.getAlcohol() != null ? tastingNote.getAlcohol() : 0); bodySum += tastingNote.getBody(); tanninSum += tastingNote.getTannins(); sparklingSum += tastingNote.getSparkling() != null ? tastingNote.getSparkling() : 0;