Bug 505666 - NullPointerException in ValidationInfo.addMessage Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
diff --git a/bundles/org.eclipse.wst.json.core/src/org/eclipse/wst/json/core/internal/validation/core/ValidationInfo.java b/bundles/org.eclipse.wst.json.core/src/org/eclipse/wst/json/core/internal/validation/core/ValidationInfo.java index 57ff456..62d2996 100644 --- a/bundles/org.eclipse.wst.json.core/src/org/eclipse/wst/json/core/internal/validation/core/ValidationInfo.java +++ b/bundles/org.eclipse.wst.json.core/src/org/eclipse/wst/json/core/internal/validation/core/ValidationInfo.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 2011 IBM Corporation and others. + * Copyright (c) 2001, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -207,7 +207,9 @@ nestedMessages.put(nesteduri, container); messages.add(container);*/ } - container.addNestedMessage(nestedmess); + if (container != null) { // TODO: Bug #505666: Need to decide if the if-block above is to be dropped or re-developed + container.addNestedMessage(nestedmess); + } } } return successfullyAdded;