Fix NullPointerException on addErrorCode when input is Invalid error code
Problem: 1. When the errocode is not defined in DhcpErrorCode enum. Then the DhcpErrorCode.forNumber(errorCode) will return null. 2. Then use null as the parameter cause NullPointerException on addErrorCode. (Because the addErrorCode need nonNullable parameter) Solution: If the errorcode is not defined in the Dhcp ErrorCode enumeration, please use ET_UNKNOWN instead as AddErrorCode parameter, not null. Bug: 151796056 Test: atest Change-Id: I43b8415ab98b4cf6520c3240dc544a9f62730a4e
Loading