Home > Web Front-end > HTML Tutorial > God, please help me take a look at this. How to solve the Null Pointer Exception? _html/css_WEB-ITnose

God, please help me take a look at this. How to solve the Null Pointer Exception? _html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:53:55
Original
1249 people have browsed it

java.lang.NullPointerException
at com.ids.emr.client.technician.shared.models.plan.orderlabtest.OrderLabExaminationModel.getDisplayName(OrderLabExaminationModel.java:114)
at com.ids.emr. client.technician.shared.models.plan.orderlabtest.OrderLabExaminationModel.toString(OrderLabExaminationModel.java:134)

@Override
 public String getDisplayName() {
return labExam.getDisplayName() " - " labTestTime.getDisplayName();
}


Reply to discussion (solution)

return labExam.getDisplayName() " - " labTestTime.getDisplayName();
labExam or labTestTime is empty, please make sure the object is valid.
or:
if(labExam!=null && labTestTime !=null) return ...;
else return "";

return labExam.getDisplayName() " - " labTestTime.getDisplayName();
labExam or labTestTime is empty, please make sure the object is valid.
or:
if(labExam!=null && labTestTime !=null) return ...;
else return "";



Thank you. There is also a post about null pointers, please help to check it out

return labExam.getDisplayName() " - " labTestTime.getDisplayName();
labExam or labTestTime is empty, please make sure the object is valid.
or:
if(labExam!=null && labTestTime !=null) return ...;
else return "";



http://bbs.csdn. net/topics/390935163 Thank you here
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template