| Index: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/scope/Namespace.java
|
| diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/scope/Namespace.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/scope/Namespace.java
|
| index a8023d496e2faed32dabef08eb3fb58c24a38f7e..7a7fe5d0da7e5b69cf4bb6817dd6471d5706c4eb 100644
|
| --- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/scope/Namespace.java
|
| +++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/scope/Namespace.java
|
| @@ -15,6 +15,7 @@ package com.google.dart.engine.internal.scope;
|
|
|
| import com.google.dart.engine.element.Element;
|
|
|
| +import java.util.Collections;
|
| import java.util.HashMap;
|
| import java.util.Map;
|
|
|
| @@ -29,7 +30,7 @@ public class Namespace {
|
| * A table mapping names that are defined in this namespace to the element representing the thing
|
| * declared with that name.
|
| */
|
| - private HashMap<String, Element> definedNames;
|
| + private final HashMap<String, Element> definedNames;
|
|
|
| /**
|
| * An empty namespace.
|
| @@ -63,6 +64,6 @@ public class Namespace {
|
| * @return a table containing the same mappings as those defined by this namespace
|
| */
|
| public Map<String, Element> getDefinedNames() {
|
| - return new HashMap<String, Element>(definedNames);
|
| + return Collections.unmodifiableMap(definedNames);
|
| }
|
| }
|
|
|