1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Fixes a NPE.

This commit is contained in:
Markus Schorn 2008-01-14 15:47:04 +00:00
parent 3b962a362e
commit 46ea38b3b1

View file

@ -73,10 +73,14 @@ public class ASTModificationMap {
* Returns the list of modifications for a given node. The list can contain different modifications.
* It is guaranteed that INSERT_BEFORE modifications appear first. Furthermore, if there is a
* REPLACE modification the list will not contain any other REPLACE or APPEND_CHILD modifications.
* @return the modification list or <code>null</code>.
* @return the modification list, which may be empty.
*/
public List<ASTModification> getModificationsForNode(IASTNode node) {
return Collections.unmodifiableList(fModifications.get(node));
List<ASTModification> modList = fModifications.get(node);
if (modList == null) {
return Collections.emptyList();
}
return Collections.unmodifiableList(modList);
}
/**