@@ -58,23 +58,23 @@ public class SearchPlaceRes {
5858
5959 public SearchPlaceRes (Place place , String imageUrl ) {
6060 this .id = place .getId ();
61- this .buildingId = place .getBuilding (). getId ();
62- this .buildingName = place .getBuilding (). getName ();
61+ this .buildingId = place .getBuilding () != null ? place . getBuilding (). getId () : null ;
62+ this .buildingName = place .getBuilding () != null ? place . getBuilding (). getName () : "" ;
6363 this .name = place .getName ();
6464 this .imageUrl = imageUrl != null ? imageUrl : place .getImageUrl ();
6565 this .detail = place .getDetail ();
6666 this .weekdayOperatingTime = place .getWeekdayOperatingTime ();
6767 this .saturdayOperatingTime = place .getSaturdayOperatingTime ();
6868 this .sundayOperatingTime = place .getSundayOperatingTime ();
6969 this .isOperating = place .isOperating ();
70- this .needStudentCard = place .getBuilding (). isNeedStudentCard ();
70+ this .needStudentCard = place .getBuilding () != null ? place . getBuilding (). isNeedStudentCard () : false ;
7171 this .floor = place .getFloor ();
72- this .address = place .getBuilding (). getAddress ();
72+ this .address = place .getBuilding () != null ? place . getBuilding (). getAddress () : "" ;
7373 this .plugAvailability = place .isPlugAvailability ();
74- this .longitude = place .getNode (). getLongitude ();
75- this .latitude = place .getNode (). getLatitude ();
76- this .xCoord = place .getNode (). getXCoord ();
77- this .yCoord = place .getNode (). getYCoord ();
74+ this .longitude = place .getNode () != null ? place . getNode (). getLongitude () : null ;
75+ this .latitude = place .getNode () != null ? place . getNode (). getLatitude () : null ;
76+ this .xCoord = place .getNode () != null ? place . getNode (). getXCoord () : null ;
77+ this .yCoord = place .getNode () != null ? place . getNode (). getYCoord () : null ;
7878 this .locationType = LocationType .PLACE ;
7979 this .placeType = place .getType ();
8080 this .description = place .getDescription ();
0 commit comments