Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Unified Diff: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/scope/Namespace.java

Issue 14657012: Report CTEC.AMBIGUOUS_EXPORT (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Move implementation to ErrorVerifier Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
}
}

Powered by Google App Engine
This is Rietveld 408576698