This repository was archived by the owner on Feb 22, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ class DynamicMetadataExtractor implements MetadataExtractor {
42
42
var match;
43
43
var fieldMetadata = fieldMetadataExtractor (type);
44
44
if (fieldMetadata.isNotEmpty) {
45
- var newMap = annotation.map == null ? new HashMap () : new HashMap .from (annotation.map);
45
+ var newMap = annotation.map == null ? {} : new Map .from (annotation.map);
46
46
fieldMetadata.forEach ((String fieldName, DirectiveAnnotation ann) {
47
47
var attrName = ann.attrName;
48
48
if (newMap.containsKey (attrName)) {
@@ -61,11 +61,11 @@ class DynamicMetadataExtractor implements MetadataExtractor {
61
61
_fieldMetadataCache.putIfAbsent (type, () => _fieldMetadataExtractor (reflectType (type)));
62
62
63
63
Map <String , DirectiveAnnotation > _fieldMetadataExtractor (ClassMirror cm) {
64
- var fields = new HashMap <String , DirectiveAnnotation >() ;
64
+ var fields = < String , DirectiveAnnotation > {} ;
65
65
if (cm.superclass != null ) {
66
66
fields.addAll (_fieldMetadataExtractor (cm.superclass));
67
67
} else {
68
- fields = new HashMap () ;
68
+ fields = {} ;
69
69
}
70
70
Map <Symbol , DeclarationMirror > declarations = cm.declarations;
71
71
declarations.forEach ((symbol, dm) {
You can’t perform that action at this time.
0 commit comments