Chromium Code Reviews| Index: pkg/analyzer/lib/source/error_processor.dart |
| diff --git a/pkg/analyzer/lib/source/error_processor.dart b/pkg/analyzer/lib/source/error_processor.dart |
| index 6b69cb71fe24ab6d1049a89088f36faa637015b4..d9049cb70820f86952f555d5d9415853b59f7c9e 100644 |
| --- a/pkg/analyzer/lib/source/error_processor.dart |
| +++ b/pkg/analyzer/lib/source/error_processor.dart |
| @@ -94,20 +94,18 @@ class ErrorProcessor { |
| return null; |
| } |
| - // By default, the error is not processed. |
| - ErrorProcessor processor; |
| + // Let the user configure how specific errors are processed. |
| + List<ErrorProcessor> processors = |
| + context.getConfigurationData(CONFIGURED_ERROR_PROCESSORS); |
| // Give strong mode a chance to upgrade it. |
| if (context.analysisOptions.strongMode) { |
| - processor = _StrongModeTypeErrorProcessor.instance; |
| + processors = processors.toList(); |
|
Brian Wilkerson
2016/03/17 19:54:14
It looks like it should already be a list. Is 'get
Bob Nystrom
2016/03/17 19:58:25
It is a list, but I want to copy it so I don't mut
|
| + processors.add(_StrongModeTypeErrorProcessor.instance); |
| } |
| - // Let the user configure how specific errors are processed. |
| - List<ErrorProcessor> processors = |
| - context.getConfigurationData(CONFIGURED_ERROR_PROCESSORS); |
| - |
| return processors.firstWhere((ErrorProcessor p) => p.appliesTo(error), |
| - orElse: () => processor); |
| + orElse: () => null); |
| } |
| } |