Skip to content

Commit

Permalink
Merge pull request #41 from ri-naa/feat/message-3
Browse files Browse the repository at this point in the history
[fix] 해당 지역 문자 없을 경우 반환값 변경 #3
ri-naa authored Jan 12, 2024
2 parents 31db6b1 + ab5753b commit ddb0b4a
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -106,7 +106,11 @@ public MessageResponse message(User user) throws IOException, ParseException {
String gu = user.getGu() + " ";
String combinedCity = city + gu;

MessageResponse result = null;
MessageResponse result = new MessageResponse("", "", new ArrayList<>(), new ArrayList<>(), "", "", "");
result.setTrans_MSG_CN("");
result.setTrnas_DSSTR("");
result.setTrans_AREA("");

// 지역 찾기
for (int i=0; i<msgResArr.size(); i++) {

@@ -122,15 +126,16 @@ public MessageResponse message(User user) throws IOException, ParseException {
}

// 데이터 담겨 있으면 중단하기
if(result != null) {
if(!(result.getMSG_CN().equals(""))) {

break;
}

}

//String translatedMSG = naverTransService.getTransSentence(MSG_CN, user);

if(result != null){
if(!(result.getMSG_CN().equals(""))){
String MSG_CN = result.getMSG_CN();
String DSSTR = result.getDSSTR_SE_NM();

0 comments on commit ddb0b4a

Please sign in to comment.