Skip to content

Suppress superfluous warnings of 'Boolean method is always inverted' #7930

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public String getSdkVersion() {
return getAnalysisService().getSdkVersion();
}

/** @noinspection BooleanMethodIsAlwaysInverted*/
public boolean isServerConnected() {
return !getSdkVersion().isEmpty();
}
Expand Down
2 changes: 2 additions & 0 deletions flutter-idea/src/io/flutter/pub/PubRoot.java
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ public String getRelativePath(@NotNull VirtualFile file) {

/**
* Returns true if the given file is a directory that contains tests.
* @noinspection BooleanMethodIsAlwaysInverted
*/
public boolean hasTests(@NotNull VirtualFile dir) {
if (!dir.isDirectory()) return false;
Expand Down Expand Up @@ -313,6 +314,7 @@ public VirtualFile getPackagesFile() {
/**
* Returns true if the packages are up-to-date with regard to the `pubspec.yaml`. The `.packages` file is used if no
* `.tool/package_config.json` is found. The default value returned is to return false.
* @noinspection BooleanMethodIsAlwaysInverted
*/
public boolean hasUpToDatePackages() {
// See context at these URLs for the reason we can't use VirtualFile#getTimeStamp()
Expand Down
1 change: 1 addition & 0 deletions flutter-idea/src/io/flutter/run/daemon/FlutterApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ public ObservatoryConnector getConnector() {
return myConnector;
}

/** @noinspection BooleanMethodIsAlwaysInverted*/
public boolean appSupportsHotReload() {
// Introspect based on registered services.
if (myVMServiceManager != null && myVMServiceManager.hasAnyRegisteredServices()) {
Expand Down
2 changes: 1 addition & 1 deletion flutter-idea/src/io/flutter/sdk/FlutterSdkVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public boolean canUseDevToolsMultiEmbed() {
return supportsVersion(MIN_SUPPORTS_DEVTOOLS_MULTI_EMBED);
}

@SuppressWarnings("BooleanMethodIsAlwaysInverted")
/** @noinspection BooleanMethodIsAlwaysInverted*/
public boolean canUseDtd() {
return supportsVersion(MIN_SUPPORTS_DTD);
}
Expand Down