[gradle] compare strings using 'equals' instead of '==' or '!=' (IDEA-312368)

This is needed to avoid possible errors and get rid of warnings.

GitOrigin-RevId: 90c7d10b385cd41986c61237f502e8f6b24489c5
This commit is contained in:
Nikolay Chashnikov
2023-02-06 11:17:35 +01:00
committed by intellij-monorepo-bot
parent e4febd654e
commit e1a038a4ff
4 changed files with 4 additions and 4 deletions

View File

@@ -120,7 +120,7 @@ public class CompilerConfigurationHandler implements ConfigurationHandler {
changed = true;
}
String additionalVmOptions = getString(configurationMap, "additionalVmOptions");
if (additionalVmOptions != null && workspaceConfiguration.COMPILER_PROCESS_ADDITIONAL_VM_OPTIONS != additionalVmOptions) {
if (additionalVmOptions != null && !additionalVmOptions.equals(workspaceConfiguration.COMPILER_PROCESS_ADDITIONAL_VM_OPTIONS)) {
workspaceConfiguration.COMPILER_PROCESS_ADDITIONAL_VM_OPTIONS = additionalVmOptions;
changed = true;
}

View File

@@ -53,7 +53,7 @@ public class EarResource implements Serializable {
EarResource resource = (EarResource)o;
if (!file.getPath().equals(resource.file.getPath())) return false;
if (earDirectory != resource.earDirectory) return false;
if (!earDirectory.equals(resource.earDirectory)) return false;
if (!relativePath.equals(resource.relativePath)) return false;
return true;

View File

@@ -62,7 +62,7 @@ public class EarResourceImpl implements EarConfiguration.EarResource {
EarResourceImpl resource = (EarResourceImpl)o;
if (!file.getPath().equals(resource.file.getPath())) return false;
if (myEarDirectory != resource.myEarDirectory) return false;
if (!myEarDirectory.equals(resource.myEarDirectory)) return false;
if (!myRelativePath.equals(resource.myRelativePath)) return false;
return true;

View File

@@ -62,7 +62,7 @@ public class WebResourceImpl implements WebConfiguration.WebResource {
WebResourceImpl resource = (WebResourceImpl)o;
if (!file.getPath().equals(resource.file.getPath())) return false;
if (myWarDirectory != resource.myWarDirectory) return false;
if (!myWarDirectory.equals(resource.myWarDirectory)) return false;
if (!myRelativePath.equals(resource.myRelativePath)) return false;
return true;