Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2020-11-17 08:06:13 -0500
committerAlexander Kurtakov2020-11-17 09:50:33 -0500
commit57fd1b28475a8bada290fa4f0270db0319372548 (patch)
tree66a688fedd1db42eaebb94d3fc0d7cf30628c5ff /build/org.eclipse.cdt.managedbuilder.core/src/org
parentdc5b05442eddf3e53dcdc3dfa3dd11a2bb690b2a (diff)
downloadorg.eclipse.cdt-57fd1b28475a8bada290fa4f0270db0319372548.tar.gz
org.eclipse.cdt-57fd1b28475a8bada290fa4f0270db0319372548.tar.xz
org.eclipse.cdt-57fd1b28475a8bada290fa4f0270db0319372548.zip
Do not use deprecated CDataUtil.objectsEqual
Objects.equals should be used instead. Change-Id: I6713d0d4d0fb8b13b3b336af61cdd73048839969 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'build/org.eclipse.cdt.managedbuilder.core/src/org')
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig/PerFileSettingsCalculator.java5
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/OptionStringValue.java13
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Builder.java12
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolChain.java5
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/BuildLanguageData.java7
5 files changed, 21 insertions, 21 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig/PerFileSettingsCalculator.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig/PerFileSettingsCalculator.java
index e6660e7ade1..f5311da24cd 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig/PerFileSettingsCalculator.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig/PerFileSettingsCalculator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2016 Intel Corporation and others.
+ * Copyright (c) 2007, 2020 Intel Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -21,6 +21,7 @@ import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
+import java.util.Objects;
import java.util.Set;
import org.eclipse.cdt.core.settings.model.ICLanguageSettingEntry;
@@ -266,7 +267,7 @@ public class PerFileSettingsCalculator {
if (!fExtsSet.equals(other.fExtsSet))
return false;
- if (!CDataUtil.objectsEqual(fMaxMatchInfo, other.fMaxMatchInfo))
+ if (!Objects.equals(fMaxMatchInfo, other.fMaxMatchInfo))
return false;
return true;
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/OptionStringValue.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/OptionStringValue.java
index c5ffdabefe3..1ed9732ca14 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/OptionStringValue.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/OptionStringValue.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2016 Intel Corporation and others.
+ * Copyright (c) 2007, 2020 Intel Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -14,9 +14,10 @@
*******************************************************************************/
package org.eclipse.cdt.managedbuilder.core;
+import java.util.Objects;
+
import org.eclipse.cdt.core.settings.model.ICLibraryFileEntry;
import org.eclipse.cdt.core.settings.model.ICStorageElement;
-import org.eclipse.cdt.core.settings.model.util.CDataUtil;
import org.eclipse.cdt.internal.core.SafeStringInterner;
import org.eclipse.cdt.managedbuilder.internal.core.Option;
@@ -163,16 +164,16 @@ public final class OptionStringValue {
if (isBuiltIn != other.isBuiltIn)
return false;
- if (!CDataUtil.objectsEqual(value, other.value))
+ if (!Objects.equals(value, other.value))
return false;
- if (!CDataUtil.objectsEqual(srcPath, other.srcPath))
+ if (!Objects.equals(srcPath, other.srcPath))
return false;
- if (!CDataUtil.objectsEqual(srcRootPath, other.srcRootPath))
+ if (!Objects.equals(srcRootPath, other.srcRootPath))
return false;
- if (!CDataUtil.objectsEqual(srcPrefixMapping, other.srcPrefixMapping))
+ if (!Objects.equals(srcPrefixMapping, other.srcPrefixMapping))
return false;
return true;
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Builder.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Builder.java
index f658b9e67c9..fb218cdf7ab 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Builder.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Builder.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2016 Intel Corporation and others.
+ * Copyright (c) 2004, 2020 Intel Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -23,6 +23,7 @@ import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
+import java.util.Objects;
import java.util.Set;
import java.util.SortedMap;
import java.util.StringTokenizer;
@@ -408,14 +409,13 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
setCommand(builder.getCommand());
if (!getArgumentsAttribute().equals(builder.getArgumentsAttribute()))
setArgumentsAttribute(builder.getArgumentsAttribute());
- if (!CDataUtil.objectsEqual(getAutoBuildTargetAttribute(), builder.getAutoBuildTargetAttribute())) {
+ if (!Objects.equals(getAutoBuildTargetAttribute(), builder.getAutoBuildTargetAttribute())) {
autoBuildTarget = builder.getAutoBuildTargetAttribute();
}
- if (!CDataUtil.objectsEqual(getIncrementalBuildTargetAttribute(),
- builder.getIncrementalBuildTargetAttribute())) {
+ if (!Objects.equals(getIncrementalBuildTargetAttribute(), builder.getIncrementalBuildTargetAttribute())) {
incrementalBuildTarget = builder.getIncrementalBuildTargetAttribute();
}
- if (!CDataUtil.objectsEqual(getCleanBuildTargetAttribute(), builder.getCleanBuildTargetAttribute())) {
+ if (!Objects.equals(getCleanBuildTargetAttribute(), builder.getCleanBuildTargetAttribute())) {
cleanBuildTarget = builder.getCleanBuildTargetAttribute();
}
}
@@ -425,7 +425,6 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
/* public Builder(IToolChain parent, String Id, String name, Builder builder, ICStorageElement el) {
this(parent, Id, name, builder);
-
loadFromProject(el);
}
*/
@@ -1850,7 +1849,6 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
String path = getBuildPathAttribute();
if(path == null)
return true;
-
if(isWorkspaceBuildPath == null){
if(superClass != null)
return superClass.isWorkspaceBuildPath();
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolChain.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolChain.java
index 523dca4c776..c2f09859f11 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolChain.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolChain.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2016 Intel Corporation and others.
+ * Copyright (c) 2004, 2020 Intel Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -22,6 +22,7 @@ import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.Objects;
import java.util.Set;
import java.util.SortedMap;
import java.util.StringTokenizer;
@@ -2646,7 +2647,7 @@ public class ToolChain extends HoldsOptions
}
void setUnusedChildren(String children) {
- if (CDataUtil.objectsEqual(unusedChildren, children))
+ if (Objects.equals(unusedChildren, children))
return;
unusedChildrenSet = null;
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/BuildLanguageData.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/BuildLanguageData.java
index 9e4d91da569..68a0133508d 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/BuildLanguageData.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/BuildLanguageData.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2016 Intel Corporation and others.
+ * Copyright (c) 2007, 2020 Intel Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -18,6 +18,7 @@ import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.Objects;
import org.eclipse.cdt.core.settings.model.ICLanguageSettingEntry;
import org.eclipse.cdt.core.settings.model.extension.CLanguageData;
@@ -145,7 +146,6 @@ public class BuildLanguageData extends CLanguageData {
optValue = buf.toString();
}
return optValue;
-
}
*/
@Override
@@ -316,13 +316,12 @@ public class BuildLanguageData extends CLanguageData {
/* private IOption[] getOptionsForType(int type){
Map map = getTypeToOptionArrayMap();
return (IOption[])map.get(Integer.valueOf(type));
-
}
*/
@Override
public void setLanguageId(String id) {
- if (CDataUtil.objectsEqual(id, fInputType.getLanguageId(fTool))) {
+ if (Objects.equals(id, fInputType.getLanguageId(fTool))) {
// fInputType = fTool.getEdtableInputType(fInputType);
obtainEditableInputType();
fInputType.setLanguageIdAttribute(id);

Back to the top