Skip to content

Commit

Permalink
[fix] null point handling
Browse files Browse the repository at this point in the history
  • Loading branch information
drbug2000 committed Aug 8, 2024
1 parent 371601c commit 0070b0b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public List<GetVoiceRoomList.VoiceRoomInfo> getVoiceRoomInfoList(long spaceId,Ge
}
//RoomDto에 값 집어넣기
//showParticipant = ture 일때, 참가자가 없으면 빈문자열[] 출력
if(participantDtoList.isEmpty()||participantDtoList==null){
if(participantDtoList==null||participantDtoList.isEmpty()){
System.out.print("\n\n[DEBUG]participant response is empty or null"+participantDtoList.toString()+
"participant number is \n\n");
roomDto.setParticipantDTOList(Collections.emptyList());
Expand Down Expand Up @@ -133,6 +133,9 @@ private List<VoiceRoom> findBySpace(Space space){
private List<ParticipantDto> getParticipantDtoListById(long voiceRoomId){
Space space = voiceRoomRepository.findById(voiceRoomId).getSpace();
List<ParticipantDto> participantDtoList = liveKitUtils.getParticipantInfo(findNameTagById(voiceRoomId));
if(participantDtoList==null||participantDtoList.isEmpty()){
return Collections.emptyList();
}
for(ParticipantDto participantDto: participantDtoList){
//profileIamge 집어넣기
participantDto.setProfileImage(findProfileImageByUserId(participantDto.getId()));
Expand Down

0 comments on commit 0070b0b

Please sign in to comment.