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
WBOYOriginal
2016-06-24 11:53:551228browse

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
Statement:
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