Bugfix: NullPointerException
This commit is contained in:
@@ -171,6 +171,9 @@ public class Utils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static ServerCode statusIsOK(Document document_, String rootname_) {
|
public static ServerCode statusIsOK(Document document_, String rootname_) {
|
||||||
|
if (document_ == null) {
|
||||||
|
return Error.ServerCode.UNKNOWN;
|
||||||
|
}
|
||||||
NodeList ns = document_.getElementsByTagName(rootname_);
|
NodeList ns = document_.getElementsByTagName(rootname_);
|
||||||
if (ns.getLength() == 0) {
|
if (ns.getLength() == 0) {
|
||||||
return Error.ServerCode.ERROR_NO_ROOT;
|
return Error.ServerCode.ERROR_NO_ROOT;
|
||||||
|
|||||||
Reference in New Issue
Block a user