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

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

Issue 712083003: Create fewer unnecessary lists (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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/html.dart ('k') | pkg/analyzer/lib/src/generated/parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/java_core.dart
diff --git a/pkg/analyzer/lib/src/generated/java_core.dart b/pkg/analyzer/lib/src/generated/java_core.dart
index 011c4ebc17a19b38013ba7151d6372a4ff41cca9..9c86f235667495c9323ed111382f96bf6bd7b38f 100644
--- a/pkg/analyzer/lib/src/generated/java_core.dart
+++ b/pkg/analyzer/lib/src/generated/java_core.dart
@@ -420,11 +420,14 @@ String format(String pattern, [arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7])
* format('{0} are you {1}ing?', ['How', 'do']) = 'How are you doing?'
* format('{0} are you {1}ing?', ['What', 'read']) = 'What are you reading?'
*/
-String formatList(String pattern, List args) {
+String formatList(String pattern, List<Object> arguments) {
+ if (arguments == null || arguments.isEmpty) {
+ return pattern;
+ }
return pattern.replaceAllMapped(new RegExp(r'\{(\d+)\}'), (match) {
String indexStr = match.group(1);
int index = int.parse(indexStr);
- var arg = args[index];
+ Object arg = arguments[index];
return arg != null ? arg.toString() : null;
});
}
« no previous file with comments | « pkg/analyzer/lib/src/generated/html.dart ('k') | pkg/analyzer/lib/src/generated/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698