mirror of
https://github.com/eclipse-cdt/cdt
synced 2024-10-28 12:09:40 +01:00
Do not use deprecated CDataUtil.objectsEqual
Objects.equals should be used instead. Change-Id: I6713d0d4d0fb8b13b3b336af61cdd73048839969 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
This commit is contained in:
parent
dc5b05442e
commit
57fd1b2847
7 changed files with 27 additions and 25 deletions
|
@ -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;
|
||||
|
@ -270,7 +271,7 @@ public class CDataDiscoveredInfoCalculator {
|
|||
if (!fExtsSet.equals(other.fExtsSet))
|
||||
return false;
|
||||
|
||||
if (!CDataUtil.objectsEqual(fMaxMatchInfo, other.fMaxMatchInfo))
|
||||
if (!Objects.equals(fMaxMatchInfo, other.fMaxMatchInfo))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2007, 2010 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
|
||||
|
@ -16,6 +16,7 @@ package org.eclipse.cdt.make.internal.core.scannerconfig;
|
|||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.cdt.core.settings.model.ICSettingBase;
|
||||
|
@ -116,7 +117,7 @@ public abstract class CDataDiscoveredInfoProcessor {
|
|||
}
|
||||
|
||||
protected boolean langDatasMatch(CLanguageData lData1, CLanguageData lData2) {
|
||||
if (!CDataUtil.objectsEqual(lData1.getLanguageId(), lData2.getLanguageId()))
|
||||
if (!Objects.equals(lData1.getLanguageId(), lData2.getLanguageId()))
|
||||
return false;
|
||||
|
||||
String[] tmp = lData1.getSourceContentTypeIds();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue