Index: pkg/analyzer/lib/src/generated/sdk.dart |
diff --git a/pkg/analyzer/lib/src/generated/sdk.dart b/pkg/analyzer/lib/src/generated/sdk.dart |
index 6f50b44c1185a0d6cbcbc8b44c08f597c511b899..feadee663b33a1783290a16d8c90971a96027ec5 100644 |
--- a/pkg/analyzer/lib/src/generated/sdk.dart |
+++ b/pkg/analyzer/lib/src/generated/sdk.dart |
@@ -124,12 +124,7 @@ class DartSdkManager { |
*/ |
DartSdk getSdkForOptions(AnalysisOptions options) { |
int encoding = options.encodeCrossContextOptions(); |
- DartSdk sdk = sdkMap[encoding]; |
- if (sdk == null) { |
- sdk = sdkCreator(options); |
- sdkMap[encoding] = sdk; |
- } |
- return sdk; |
+ return sdkMap.putIfAbsent(encoding, () => sdkCreator(options)); |
Brian Wilkerson
2016/06/01 04:16:51
This is just code clean-up. I'm happy to back it o
pquitslund
2016/06/01 04:28:17
I'm all of keeping it. Yay for opportunistic clea
|
} |
} |