Skip to content

Commit 26fc585

Browse files
authored
[CQ] API: migrate from unstable CharsetToolkit (#8122)
The `com.intellij.openapi.vfs. CharsetToolkit` is marked unstable. ![image](https://github.com/user-attachments/assets/e5b65300-897d-4240-a31f-1c77474f731b) Luckily there's a standard Java substitute (as of Java 7). See: #7718 --- - [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 d3bde2c commit 26fc585

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

flutter-studio/src/io/flutter/utils/GradleUtils.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import com.intellij.openapi.project.Project;
2727
import com.intellij.openapi.util.io.FileUtil;
2828
import com.intellij.openapi.util.io.FileUtilRt;
29-
import com.intellij.openapi.vfs.CharsetToolkit;
3029
import com.intellij.openapi.vfs.VirtualFile;
3130
import com.intellij.psi.PsiElement;
3231
import com.intellij.util.ReflectionUtil;
@@ -458,7 +457,7 @@ private String readSettingsFile() {
458457
requireNonNull(pathToModule);
459458
requireNonNull(settingsFile);
460459
BufferedInputStream str = new BufferedInputStream(settingsFile.getInputStream());
461-
return FileUtil.loadTextAndClose(new InputStreamReader(str, CharsetToolkit.UTF8_CHARSET));
460+
return FileUtil.loadTextAndClose(new InputStreamReader(str, StandardCharsets.UTF_8));
462461
}
463462
catch (NullPointerException | IOException e) {
464463
cleanupAfterError();

0 commit comments

Comments
 (0)