Fix NullPointerException caused by null-builder
Sometimes occurs java.lang.NullPointerException leading to app failed.
This commit is contained in:
parent
fbbbf59c82
commit
9f8083c41c
|
@ -336,6 +336,7 @@ public class AllocateResponsePBImpl extends AllocateResponse {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized void setNMTokens(List<NMToken> nmTokens) {
|
public synchronized void setNMTokens(List<NMToken> nmTokens) {
|
||||||
|
maybeInitBuilder();
|
||||||
if (nmTokens == null || nmTokens.isEmpty()) {
|
if (nmTokens == null || nmTokens.isEmpty()) {
|
||||||
if (this.nmTokens != null) {
|
if (this.nmTokens != null) {
|
||||||
this.nmTokens.clear();
|
this.nmTokens.clear();
|
||||||
|
|
Loading…
Reference in New Issue