Skip to content

Commit 4e61dc8

Browse files
authored
[CQ] remove redundant warning suppressions (#7996)
Clean up a bunch of unneeded (redundant) warning suppressions.
1 parent 63a2216 commit 4e61dc8

14 files changed

+1
-18
lines changed

flutter-idea/src/io/flutter/FlutterErrorReportSubmitter.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,6 @@ private static void fail(@NotNull Consumer<SubmittedReportInfo> consumer) {
226226
}
227227

228228
private static byte[] readFully(InputStream in) throws IOException {
229-
//noinspection resource
230229
final ByteArrayOutputStream out = new ByteArrayOutputStream();
231230
final byte[] temp = new byte[4096];
232231
int count = in.read(temp);

flutter-idea/src/io/flutter/actions/ReloadAllFlutterApps.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
/**
2222
* Action that reloads all running Flutter apps.
2323
*/
24-
@SuppressWarnings("ComponentNotRegistered")
2524
public class ReloadAllFlutterApps extends FlutterAppAction {
2625
public static final String ID = "Flutter.ReloadAllFlutterApps"; //NON-NLS
2726
public static final String TEXT = FlutterBundle.message("app.reload.all.action.text");

flutter-idea/src/io/flutter/actions/RestartAllFlutterApps.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
/**
2020
* Action that restarts all running Flutter apps.
2121
*/
22-
@SuppressWarnings("ComponentNotRegistered")
2322
public class RestartAllFlutterApps extends FlutterAppAction {
2423
public static final String ID = "Flutter.RestartAllFlutterApps"; //NON-NLS
2524
public static final String TEXT = FlutterBundle.message("app.restart.all.action.text");

flutter-idea/src/io/flutter/editor/FlutterIconLineMarkerProvider.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,6 @@ private String getBasePathForFamily(@NotNull String family, @NotNull FlutterSdk
295295
private LineMarkerInfo<PsiElement> createLineMarker(@Nullable PsiElement element, @NotNull Icon icon) {
296296
if (element == null) return null;
297297
assert element.getTextRange() != null;
298-
//noinspection MissingRecentApi
299298
return new LineMarkerInfo<>(element, element.getTextRange(), icon, null, null,
300299
GutterIconRenderer.Alignment.LEFT, () -> "");
301300
}

flutter-idea/src/io/flutter/jxbrowser/JxBrowserManager.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ public void settingsChanged() {
157157
final FlutterSettings settings = FlutterSettings.getInstance();
158158

159159
// Set up JxBrowser files if the embedded inspector option has been turned on and the files aren't already loaded.
160-
//noinspection ConstantConditions
161160
if (getStatus().equals(JxBrowserStatus.NOT_INSTALLED)) {
162161
setUp(projectName);
163162
}

flutter-idea/src/io/flutter/project/FlutterProjectStructureDetector.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ public void projectOpened(@NotNull Project project) {
111111
}
112112
//noinspection ConstantConditions
113113
StartupManager.getInstance(project).runAfterOpened(() -> {
114-
//noinspection ConstantConditions
115114
DumbService.getInstance(project).smartInvokeLater(() -> {
116115
for (ModuleDescriptor module : modules) {
117116
assert module != null;

flutter-idea/src/io/flutter/run/test/DartTestLocationProviderZ.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
import java.util.Collections;
3535
import java.util.List;
3636

37-
@SuppressWarnings("Duplicates")
3837
public class DartTestLocationProviderZ implements SMTestLocator, DumbAware {
3938
@SuppressWarnings("rawtypes")
4039
private static final List<Location> NONE = Collections.emptyList();

flutter-idea/src/io/flutter/survey/FlutterSurveyNotifications.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ private void checkForDisplaySurvey() {
9797
null
9898
);
9999

100-
//noinspection DialogTitleCapitalization
101100
notification.addAction(new AnAction(SURVEY_ACTION_TEXT) {
102101
@Override
103102
public void actionPerformed(@NotNull AnActionEvent event) {
@@ -109,7 +108,6 @@ public void actionPerformed(@NotNull AnActionEvent event) {
109108
}
110109
});
111110

112-
//noinspection DialogTitleCapitalization
113111
notification.addAction(new AnAction(SURVEY_DISMISSAL_TEXT) {
114112
@Override
115113
public void actionPerformed(@NotNull AnActionEvent event) {

flutter-idea/src/io/flutter/test/DartTestEventsConverterZ.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* event followed some time later by an 'error' event for that same test. That should
3333
* convert a successful test into a failure. That case is not being handled.
3434
*/
35-
@SuppressWarnings({"Duplicates", "FieldMayBeFinal", "LocalCanBeFinal", "SameReturnValue"})
35+
@SuppressWarnings({"FieldMayBeFinal", "LocalCanBeFinal", "SameReturnValue"})
3636
public class DartTestEventsConverterZ extends OutputToGeneralTestEventsConverter {
3737
private static final Logger LOG = Logger.getInstance(DartTestEventsConverterZ.class);
3838

@@ -156,7 +156,6 @@ private boolean doProcessServiceMessages(@NotNull final String text) throws Pars
156156
return super.processServiceMessages(text, myCurrentOutputType, myCurrentVisitor);
157157
}
158158

159-
@SuppressWarnings("SimplifiableIfStatement")
160159
private boolean process(JsonObject obj) throws JsonSyntaxException, ParseException {
161160
String type = obj.get(JSON_TYPE).getAsString();
162161
if (TYPE_TEST_START.equals(type)) {

flutter-idea/src/io/flutter/vmService/DartVmServiceListener.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ public void connectionOpened() {
4040

4141
}
4242

43-
@SuppressWarnings("DuplicateBranchesInSwitch")
4443
@Override
4544
public void received(@NotNull final String streamId, @NotNull final Event event) {
4645
switch (event.getKind()) {

0 commit comments

Comments
 (0)