Skip to content

Commit 054ce1a

Browse files
authored
[CQ] migrate off deprecated PropertiesComponent.getValues invocations (#8357)
`PropertiesComponent.getValues` is deprecated in favor of `PropertiesComponent.getList`. Verifier output: ``` #Deprecated method com.intellij.ide.util.PropertiesComponent.getValues(String) invocation Deprecated method com.intellij.ide.util.PropertiesComponent.getValues(java.lang.String arg0) : java.lang.String[] is invoked in io.flutter.sdk.FlutterSdkUtil.updateKnownPaths(String, String) : void Deprecated method com.intellij.ide.util.PropertiesComponent.getValues(java.lang.String arg0) : java.lang.String[] is invoked in io.flutter.sdk.FlutterSdkUtil.getKnownFlutterSdkPaths() : String[] ``` --- - [x] I’ve reviewed the contributor guide and applied the relevant portions to this PR. <details> <summary>Contribution guidelines:</summary><br> - See our [contributor guide]([https://github.com/dart-lang/sdk/blob/main/CONTRIBUTING.md](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview) for general expectations for PRs. - Larger or significant changes should be discussed in an issue before creating a PR. - Dart contributions to our repos should follow the [Dart style guide](https://dart.dev/guides/language/effective-dart) and use `dart format`. - Java and Kotlin contributions should strive to follow Java and Kotlin best practices ([discussion](#8098)). </details>
1 parent 6a06b25 commit 054ce1a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/io/flutter/sdk/FlutterSdkUtil.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ private static void updateKnownPaths(@SuppressWarnings("SameParameterValue") @No
7878
final PropertiesComponent props = PropertiesComponent.getInstance();
7979

8080
// Add the existing known paths.
81-
final String[] oldPaths = props.getValues(propertyKey);
81+
final List<String> oldPaths = props.getList(propertyKey);
8282
if (oldPaths != null) {
83-
allPaths.addAll(Arrays.asList(oldPaths));
83+
allPaths.addAll(oldPaths);
8484
}
8585

8686
// Store the values back.
@@ -131,9 +131,9 @@ public static String[] getKnownFlutterSdkPaths() {
131131
}
132132

133133
// use the list of paths they've entered in the past
134-
final String[] knownPaths = PropertiesComponent.getInstance().getValues(FLUTTER_SDK_KNOWN_PATHS);
134+
final List<String> knownPaths = PropertiesComponent.getInstance().getList(FLUTTER_SDK_KNOWN_PATHS);
135135
if (knownPaths != null) {
136-
paths.addAll(Arrays.asList(knownPaths));
136+
paths.addAll(knownPaths);
137137
}
138138

139139
// search the user's path

0 commit comments

Comments
 (0)