Skip to content

Commit 88593ea

Browse files
authored
Suppress superfluous warnings of 'Boolean method is always inverted' (#7930)
1 parent 4f3f223 commit 88593ea

File tree

4 files changed

+5
-1
lines changed

4 files changed

+5
-1
lines changed

flutter-idea/src/io/flutter/dart/FlutterDartAnalysisServer.java

+1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ public String getSdkVersion() {
7070
return getAnalysisService().getSdkVersion();
7171
}
7272

73+
/** @noinspection BooleanMethodIsAlwaysInverted*/
7374
public boolean isServerConnected() {
7475
return !getSdkVersion().isEmpty();
7576
}

flutter-idea/src/io/flutter/pub/PubRoot.java

+2
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ public String getRelativePath(@NotNull VirtualFile file) {
194194

195195
/**
196196
* Returns true if the given file is a directory that contains tests.
197+
* @noinspection BooleanMethodIsAlwaysInverted
197198
*/
198199
public boolean hasTests(@NotNull VirtualFile dir) {
199200
if (!dir.isDirectory()) return false;
@@ -313,6 +314,7 @@ public VirtualFile getPackagesFile() {
313314
/**
314315
* Returns true if the packages are up-to-date with regard to the `pubspec.yaml`. The `.packages` file is used if no
315316
* `.tool/package_config.json` is found. The default value returned is to return false.
317+
* @noinspection BooleanMethodIsAlwaysInverted
316318
*/
317319
public boolean hasUpToDatePackages() {
318320
// See context at these URLs for the reason we can't use VirtualFile#getTimeStamp()

flutter-idea/src/io/flutter/run/daemon/FlutterApp.java

+1
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ public ObservatoryConnector getConnector() {
302302
return myConnector;
303303
}
304304

305+
/** @noinspection BooleanMethodIsAlwaysInverted*/
305306
public boolean appSupportsHotReload() {
306307
// Introspect based on registered services.
307308
if (myVMServiceManager != null && myVMServiceManager.hasAnyRegisteredServices()) {

flutter-idea/src/io/flutter/sdk/FlutterSdkVersion.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public boolean canUseDevToolsMultiEmbed() {
131131
return supportsVersion(MIN_SUPPORTS_DEVTOOLS_MULTI_EMBED);
132132
}
133133

134-
@SuppressWarnings("BooleanMethodIsAlwaysInverted")
134+
/** @noinspection BooleanMethodIsAlwaysInverted*/
135135
public boolean canUseDtd() {
136136
return supportsVersion(MIN_SUPPORTS_DTD);
137137
}

0 commit comments

Comments
 (0)