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

Unified Diff: pkg/analyzer/lib/src/generated/source.dart

Issue 687663002: More code clean-up (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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
« no previous file with comments | « pkg/analyzer/lib/src/generated/java_io.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/source.dart
diff --git a/pkg/analyzer/lib/src/generated/source.dart b/pkg/analyzer/lib/src/generated/source.dart
index b2967477f23c6128ef0c902d1a91e946afcfdd7a..3b3d79ba61b8e8d8cf98a0e92536de17a4114163 100644
--- a/pkg/analyzer/lib/src/generated/source.dart
+++ b/pkg/analyzer/lib/src/generated/source.dart
@@ -71,13 +71,17 @@ class ContentCache {
return _contentMap.remove(source);
} else {
int newStamp = JavaSystem.currentTimeMillis();
- int oldStamp = javaMapPut(_stampMap, source, newStamp);
- // Occasionally, if this method is called in rapid succession, the timestamps are equal.
- // Guard against this by artificially incrementing the new timestamp
+ int oldStamp = _stampMap[source];
+ _stampMap[source] = newStamp;
+ // Occasionally, if this method is called in rapid succession, the
+ // timestamps are equal. Guard against this by artificially incrementing
+ // the new timestamp.
if (newStamp == oldStamp) {
_stampMap[source] = newStamp + 1;
}
- return javaMapPut(_contentMap, source, contents);
+ String oldContent =_contentMap[source];
+ _contentMap[source] = contents;
+ return oldContent;
}
}
}
« no previous file with comments | « pkg/analyzer/lib/src/generated/java_io.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698