Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/AutotoolsNewMakeGenerator.java4
-rw-r--r--build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/AutotoolsConfiguration.java6
-rw-r--r--build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/AutotoolsOptionValueHandler.java4
-rw-r--r--build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/wizards/NewAutotoolsProject.java4
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/properties/AutotoolsBuildPropertyPage.java4
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/text/hover/AutoconfTextHover.java4
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/wizards/ConfigurationLabelProvider.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeBuilder.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/ProjectTargets.java2
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MultipleInputDialog.java10
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/MakeTargetDialog.java6
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/SettingsBlock.java6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/OptionEnablementTests.java8
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/templateengine/tests/TemplateEngineTestsHelper.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Builder.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ProjectType.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ResourceConfiguration.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolChain.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/envvar/EnvironmentVariableProvider.java6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/ManagedBuildGnuToolInfo.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/AppendToMBSStringListOptionValues.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/AppendToMBSStringOptionValue.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/NewManagedProject.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/SetMBSBooleanOptionValue.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/SetMBSStringListOptionValues.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/SetMBSStringOptionValue.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildOptionComboFieldEditor.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildToolSettingUI.java6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/FileListControlFieldEditor.java6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/NewBuildConfigurationDialog.java8
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/NewCfgDialog.java2
-rw-r--r--codan/org.eclipse.cdt.codan.ui.cfgview/src/org/eclipse/cdt/codan/ui/cfgview/views/ControlFlowGraphView.java4
-rw-r--r--core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/BinaryTests.java4
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/AutomatedFramework.java4
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/BTreeTests.java2
-rw-r--r--core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/Main.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/GCCBuiltinSymbolProvider.java4
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/resources/ACBuilder.java4
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/EclipseVariablesVariableSupplier.java4
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/EnvironmentVariableSupplier.java6
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/UserDefinedVariableSupplier.java10
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/envvar/EnvironmentVariableManager.java6
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/SharedDefaults.java4
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateDescriptor.java4
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ConditionalProcessGroup.java4
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/CygPath.java4
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/envvar/EnvVarOperationProcessor.java4
-rw-r--r--core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/Main.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/util/Strings.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CView.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPage.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPerFilePage.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/utils/Checks.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CHelpProviderDescriptor.java8
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/dialogfields/DialogField.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/CElementWorkingSetPage.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/NewConfigurationDialog.java4
-rw-r--r--core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/uitree/uiwidgets/UITextWidget.java4
-rw-r--r--core/org.eclipse.cdt.ui/utils.ui/org/eclipse/cdt/utils/ui/controls/FileListControl.java4
-rw-r--r--cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/RSEHelper.java6
-rw-r--r--cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/launching/RemoteGdbLaunchDelegate.java2
-rw-r--r--cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteCDSFMainTab.java4
-rw-r--r--debug/org.eclipse.cdt.debug.application/src/org/eclipse/cdt/debug/application/ApplicationWorkbenchWindowAdvisor.java8
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPropertyPage.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/dialogfields/DialogField.java4
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/PersistentSettingsManager.java6
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CDebuggerTab.java8
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CLaunchConfigurationTab.java6
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/WorkingDirectoryBlock.java4
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepoints/AbstractImageRegistry.java6
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_0.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpointDMData.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIListThreadGroupsInfo.java4
-rw-r--r--dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIBreakpointsTest.java10
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/AbstractImageRegistry.java6
-rw-r--r--launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerTab.java4
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/LaunchUtils.java4
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/WorkingDirectoryBlock.java4
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CLaunchConfigurationTab.java6
-rwxr-xr-xllvm/org.eclipse.cdt.managedbuilder.llvm.ui/src/org/eclipse/cdt/managedbuilder/llvm/util/LlvmToolOptionPathUtil.java4
82 files changed, 190 insertions, 190 deletions
diff --git a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/AutotoolsNewMakeGenerator.java b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/AutotoolsNewMakeGenerator.java
index c017c0bafb..09f3adf7e3 100644
--- a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/AutotoolsNewMakeGenerator.java
+++ b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/AutotoolsNewMakeGenerator.java
@@ -410,7 +410,7 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
if (target == null)
target = AutotoolsPropertyConstants.CLEAN_MAKE_TARGET_DEFAULT;
String args = builder.getBuildArguments();
- if (args != null && !(args = args.trim()).equals("")) { //$NON-NLS-1$
+ if (args != null && !(args = args.trim()).isEmpty()) {
String[] newArgs = makeArray(args);
makeargs = new String[newArgs.length + 1];
System.arraycopy(newArgs, 0, makeargs, 0, newArgs.length);
@@ -460,7 +460,7 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
if (target == null)
target = AutotoolsPropertyConstants.CLEAN_MAKE_TARGET_DEFAULT;
String args = builder.getBuildArguments();
- if (args != null && !(args = args.trim()).equals("")) { //$NON-NLS-1$
+ if (args != null && !(args = args.trim()).isEmpty()) {
String[] newArgs = makeArray(args);
makeargs = new String[newArgs.length + 1];
System.arraycopy(newArgs, 0, makeargs, 0, newArgs.length);
diff --git a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/AutotoolsConfiguration.java b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/AutotoolsConfiguration.java
index 5a1b16e07b..42ad8f0f91 100644
--- a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/AutotoolsConfiguration.java
+++ b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/AutotoolsConfiguration.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2015 Red Hat Inc.
+ * Copyright (c) 2009, 2016 Red Hat Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -302,12 +302,12 @@ public class AutotoolsConfiguration implements IAConfiguration {
for (int j = 0; j < childOptions.length; ++j) {
IConfigureOption childOption = getOption(childOptions[j].getName());
String parameter = childOption.getParameter();
- if (!parameter.equals(""))
+ if (!parameter.isEmpty())
buf.append(" " + parameter);
}
} else {
String parameter = option.getParameter();
- if (!parameter.equals(""))
+ if (!parameter.isEmpty())
buf.append(" " + parameter);
}
}
diff --git a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/AutotoolsOptionValueHandler.java b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/AutotoolsOptionValueHandler.java
index e21bf2b03d..84bc34bd41 100644
--- a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/AutotoolsOptionValueHandler.java
+++ b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/AutotoolsOptionValueHandler.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2015 Red Hat Inc..
+ * Copyright (c) 2007, 2016 Red Hat Inc..
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -53,7 +53,7 @@ public class AutotoolsOptionValueHandler extends ManagedOptionValueHandler
ICConfigurationDescription cfgd = ManagedBuildManager.getDescriptionForConfiguration(configuration);
if (option.getName().equals("Name") && cfgd != null) {
String cfgId = cfgd.getId();
- if (!value.equals("") && !value.equals(cfgId)) {
+ if (!value.isEmpty() && !value.equals(cfgId)) {
// we have a cloned configuration and we know that the
// clonee's name is the value of the option
IProject project = (IProject)configuration.getManagedProject().getOwner();
diff --git a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/wizards/NewAutotoolsProject.java b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/wizards/NewAutotoolsProject.java
index 555e4e361b..2d65334341 100644
--- a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/wizards/NewAutotoolsProject.java
+++ b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/wizards/NewAutotoolsProject.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2015 Symbian Software Limited and others.
+ * Copyright (c) 2007, 2016 Symbian Software Limited and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -66,7 +66,7 @@ public class NewAutotoolsProject extends ProcessRunner {
turnOffAutoBuild(workspace);
IPath locationPath = null;
- if (location != null && !location.trim().equals("")) { //$NON-NLS-1$
+ if (location != null && !location.trim().isEmpty()) {
locationPath = Path.fromPortableString(location);
}
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/properties/AutotoolsBuildPropertyPage.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/properties/AutotoolsBuildPropertyPage.java
index c2a4a865d9..54af1ce7db 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/properties/AutotoolsBuildPropertyPage.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/properties/AutotoolsBuildPropertyPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2015 Red Hat Inc.
+ * Copyright (c) 2007, 2016 Red Hat Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -119,7 +119,7 @@ public class AutotoolsBuildPropertyPage extends AbstractCBuildPropertyTab {
});
fCleanMakeTarget.addModifyListener(e -> {
- if (fCleanMakeTarget.getText().equals("")) { // $NON-NLS-1$
+ if (fCleanMakeTarget.getText().isEmpty()) {
// FIXME: should probably issue warning here, but how?
}
});
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/text/hover/AutoconfTextHover.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/text/hover/AutoconfTextHover.java
index 338c6ded8b..9aed7224b8 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/text/hover/AutoconfTextHover.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/text/hover/AutoconfTextHover.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2015 Red Hat, Inc.
+ * Copyright (c) 2006, 2016 Red Hat, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -314,7 +314,7 @@ public class AutoconfTextHover implements ITextHover, ITextHoverExtension {
NamedNodeMap parms = v.getAttributes();
Node parmNode = parms.item(0);
String parm = parmNode.getNodeValue();
- if (prototype.toString().equals(""))
+ if (prototype.toString().isEmpty())
prototype.append(parm);
else
prototype.append(", " + parm);
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/wizards/ConfigurationLabelProvider.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/wizards/ConfigurationLabelProvider.java
index 2f3177c573..c4b9b50cc6 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/wizards/ConfigurationLabelProvider.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/wizards/ConfigurationLabelProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002, 2015 Rational Software Corporation and others.
+ * Copyright (c) 2002, 2016 Rational Software Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -29,7 +29,7 @@ public class ConfigurationLabelProvider extends LabelProvider implements ITableL
if (obj instanceof IConfiguration) {
IConfiguration tmpConfig = (IConfiguration) obj;
- if( (tmpConfig.getDescription() == null)|| (tmpConfig.getDescription().equals("")) ) //$NON-NLS-1$
+ if( (tmpConfig.getDescription() == null)|| (tmpConfig.getDescription().isEmpty()) )
return ((IConfiguration) obj).getName();
else
return ( tmpConfig.getName() + " ( " + tmpConfig.getDescription() + " )"); //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeBuilder.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeBuilder.java
index 18a64ede80..4d9b9ad51c 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeBuilder.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeBuilder.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -262,7 +262,7 @@ public class MakeBuilder extends ACBuilder {
}
} else {
String argsStr = info.getBuildArguments();
- if (argsStr != null && !argsStr.equals("")) { //$NON-NLS-1$
+ if (argsStr != null && !argsStr.isEmpty()) {
String[] newArgs = makeArray(argsStr);
args = new String[targets.length + newArgs.length];
System.arraycopy(newArgs, 0, args, 0, newArgs.length);
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/ProjectTargets.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/ProjectTargets.java
index 71c6150455..6f4e705d05 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/ProjectTargets.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/ProjectTargets.java
@@ -256,7 +256,7 @@ public class ProjectTargets {
if (node.getName().equals(TARGET_ELEMENT)) {
IContainer container = null;
String path = node.getAttribute(TARGET_ATTR_PATH);
- if (path != null && !path.equals("")) { //$NON-NLS-1$
+ if (path != null && !path.isEmpty()) {
container = project.getFolder(path);
} else {
container = project;
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MultipleInputDialog.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MultipleInputDialog.java
index 5d839eb42d..1326d6c57d 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MultipleInputDialog.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MultipleInputDialog.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2011 IBM Corporation and others.
+ * Copyright (c) 2003, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -148,7 +148,7 @@ public class MultipleInputDialog extends Dialog {
validators.add(new Validator() {
@Override
public boolean validate() {
- return !text.getText().equals(""); //$NON-NLS-1$
+ return !text.getText().isEmpty();
}
});
text.addModifyListener(new ModifyListener() {
@@ -191,7 +191,7 @@ public class MultipleInputDialog extends Dialog {
validators.add(new Validator() {
@Override
public boolean validate() {
- return !text.getText().equals(""); //$NON-NLS-1$
+ return !text.getText().isEmpty();
}
});
@@ -210,7 +210,7 @@ public class MultipleInputDialog extends Dialog {
DirectoryDialog dialog = new DirectoryDialog(getShell());
dialog.setMessage(MakeUIPlugin.getResourceString("MultipleInputDialog.1")); //$NON-NLS-1$
String currentWorkingDir = text.getText();
- if (!currentWorkingDir.trim().equals("")) { //$NON-NLS-1$
+ if (!currentWorkingDir.trim().isEmpty()) {
File path = new File(currentWorkingDir);
if (path.exists()) {
dialog.setFilterPath(currentWorkingDir);
@@ -258,7 +258,7 @@ public class MultipleInputDialog extends Dialog {
validators.add(new Validator() {
@Override
public boolean validate() {
- return !text.getText().equals(""); //$NON-NLS-1$
+ return !text.getText().isEmpty();
}
});
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/MakeTargetDialog.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/MakeTargetDialog.java
index cdb9f71f5b..f7bc22963e 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/MakeTargetDialog.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/MakeTargetDialog.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -288,7 +288,7 @@ public class MakeTargetDialog extends Dialog {
public void widgetSelected(SelectionEvent e) {
if (useBuilderCommandCheckBox.getSelection() == true) {
StringBuffer cmd = new StringBuffer(builderCommand.toString());
- if (builderArguments != null && !builderArguments.equals("")) { //$NON-NLS-1$
+ if (builderArguments != null && !builderArguments.isEmpty()) {
cmd.append(" "); //$NON-NLS-1$
cmd.append(builderArguments);
}
@@ -399,7 +399,7 @@ public class MakeTargetDialog extends Dialog {
targetNameText.selectAll();
if (targetBuildCommand != null) {
StringBuffer cmd = new StringBuffer(targetBuildCommand.toOSString());
- if (targetBuildArguments != null && !targetBuildArguments.equals("")) { //$NON-NLS-1$
+ if (targetBuildArguments != null && !targetBuildArguments.isEmpty()) {
cmd.append(" "); //$NON-NLS-1$
cmd.append(targetBuildArguments);
}
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/SettingsBlock.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/SettingsBlock.java
index a4bcbceb9b..4f8e5095b9 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/SettingsBlock.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/SettingsBlock.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -178,7 +178,7 @@ public class SettingsBlock extends AbstractCOptionPage {
StringBuffer cmd = new StringBuffer(fBuildInfo.getBuildAttribute(IMakeCommonBuildInfo.BUILD_COMMAND, "")); //$NON-NLS-1$
if (!fBuildInfo.isDefaultBuildCmd()) {
String args = fBuildInfo.getBuildAttribute(IMakeCommonBuildInfo.BUILD_ARGUMENTS, ""); //$NON-NLS-1$
- if (args != null && !args.equals("")) { //$NON-NLS-1$
+ if (args != null && !args.isEmpty()) {
cmd.append(" "); //$NON-NLS-1$
cmd.append(args);
}
@@ -545,7 +545,7 @@ public class SettingsBlock extends AbstractCOptionPage {
StringBuffer cmd = new StringBuffer(info.getBuildCommand().toOSString());
if (!info.isDefaultBuildCmd()) {
String args = info.getBuildArguments();
- if (args != null && !args.equals("")) { //$NON-NLS-1$
+ if (args != null && !args.isEmpty()) {
cmd.append(" "); //$NON-NLS-1$
cmd.append(args);
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/OptionEnablementTests.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/OptionEnablementTests.java
index 3494b7a749..26a0612ac8 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/OptionEnablementTests.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/OptionEnablementTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2011 Intel Corporation and others.
+ * Copyright (c) 2005, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -423,11 +423,11 @@ public class OptionEnablementTests extends TestCase implements IManagedOptionVal
option = tool.getOptionBySuperClassId("enablement.checkOpt.all.Q.this.string.Q.empty");
assertEquals(option.getCommand(), "cmd");
assertEquals(option.getCommandFalse(), "cmdF");
- assertEquals(thisString.getStringValue().equals(""),
+ assertEquals(thisString.getStringValue().isEmpty(),
option.getApplicabilityCalculator().isOptionUsedInCommandLine(cfg, tool, option));
- assertEquals(thisString.getStringValue().equals(""),
+ assertEquals(thisString.getStringValue().isEmpty(),
option.getApplicabilityCalculator().isOptionVisible(cfg, tool, option));
- assertEquals(thisString.getStringValue().equals(""),
+ assertEquals(thisString.getStringValue().isEmpty(),
option.getApplicabilityCalculator().isOptionEnabled(cfg, tool, option));
option = tool.getOptionBySuperClassId("enablement.checkOpt.all.Q.this.string.Q.test a b c");
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/templateengine/tests/TemplateEngineTestsHelper.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/templateengine/tests/TemplateEngineTestsHelper.java
index 41ab227ef7..9a584e27a4 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/templateengine/tests/TemplateEngineTestsHelper.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/templateengine/tests/TemplateEngineTestsHelper.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 Symbian Software Limited and others.
+ * Copyright (c) 2010, 2016 Symbian Software Limited and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -131,7 +131,7 @@ public class TemplateEngineTestsHelper {
IProjectType type = allProjectTypes[index];
if (!type.isAbstract() && !type.isTestProjectType()) {
- if (!type.getConvertToId().equals("")) //$NON-NLS-1$
+ if (!type.getConvertToId().isEmpty())
continue;
if (type.isSupported()) {
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 a764145d94..662e3cc875 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
@@ -1562,7 +1562,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
.getVersionsSupported();
if ((versionsSupported != null)
- && (!versionsSupported.equals(""))) { //$NON-NLS-1$
+ && (!versionsSupported.isEmpty())) {
String[] tmpVersions = versionsSupported.split(","); //$NON-NLS-1$
for (int j = 0; j < tmpVersions.length; j++) {
@@ -1597,7 +1597,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
// If 'getSuperClass()' is not null, look for 'convertToId' attribute in plugin
// manifest file for this builder.
String convertToId = getSuperClass().getConvertToId();
- if ((convertToId == null) || (convertToId.equals(""))) { //$NON-NLS-1$
+ if ((convertToId == null) || (convertToId.isEmpty())) {
// It means there is no 'convertToId' attribute available and
// the version is still actively
// supported by the tool integrator. So do nothing, just return
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ProjectType.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ProjectType.java
index a359ae7ff7..780b7f374e 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ProjectType.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ProjectType.java
@@ -605,7 +605,7 @@ public class ProjectType extends BuildObject implements IProjectType, IBuildProp
public boolean checkForMigrationSupport() {
String convertToId = getConvertToId();
- if ((convertToId == null) || (convertToId.equals(""))) { //$NON-NLS-1$
+ if ((convertToId == null) || (convertToId.isEmpty())) {
// It means there is no 'convertToId' attribute available and
// the project type is still actively
// supported by the tool integrator. So do nothing, just return
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ResourceConfiguration.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ResourceConfiguration.java
index 4808ca9840..177719d977 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ResourceConfiguration.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ResourceConfiguration.java
@@ -586,7 +586,7 @@ public class ResourceConfiguration extends ResourceInfo implements IFileInfo {
break;
}
}
- if (!rcbsToolId.equals("")){ // $NON-NLS-1$
+ if (!rcbsToolId.isEmpty()){
/*
* Here if an rcbs tool is defined.
* Apply the tools according to the current rcbsApplicability setting.
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java
index 9feba44f1e..fd8c4d594d 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java
@@ -3231,7 +3231,7 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
.getVersionsSupported();
if ((versionsSupported != null)
- && (!versionsSupported.equals(""))) { //$NON-NLS-1$
+ && (!versionsSupported.isEmpty())) {
String[] tmpVersions = versionsSupported.split(","); //$NON-NLS-1$
for (String tmpVersion : tmpVersions) {
@@ -3269,7 +3269,7 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
// attribute in plugin
// manifest file for this tool.
String convertToId = getSuperClass().getConvertToId();
- if ((convertToId == null) || (convertToId.equals(""))) { //$NON-NLS-1$
+ if ((convertToId == null) || (convertToId.isEmpty())) {
// It means there is no 'convertToId' attribute available and
// the version is still actively
// supported by the tool integrator. So do nothing, just return
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 e7438365ba..b6d25d12fc 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
@@ -1894,7 +1894,7 @@ public class ToolChain extends HoldsOptions implements IToolChain, IMatchKeyProv
String versionsSupported = toolChainElement.getVersionsSupported();
if ((versionsSupported != null)
- && (!versionsSupported.equals(""))) { //$NON-NLS-1$
+ && (!versionsSupported.isEmpty())) {
String[] tmpVersions = versionsSupported.split(","); //$NON-NLS-1$
for (int j = 0; j < tmpVersions.length; j++) {
@@ -1927,7 +1927,7 @@ public class ToolChain extends HoldsOptions implements IToolChain, IMatchKeyProv
// If 'getSuperClass()' is not null, look for 'convertToId' attribute in plugin
// manifest file for this toolchain.
String convertToId = getSuperClass().getConvertToId();
- if ((convertToId == null) || (convertToId.equals(""))) { //$NON-NLS-1$
+ if ((convertToId == null) || (convertToId.isEmpty())) {
// It means there is no 'convertToId' attribute available and
// the version is still actively
// supported by the tool integrator. So do nothing, just return
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/envvar/EnvironmentVariableProvider.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/envvar/EnvironmentVariableProvider.java
index 5b4ceefba3..0af5622d9b 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/envvar/EnvironmentVariableProvider.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/envvar/EnvironmentVariableProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2012 Intel Corporation and others.
+ * Copyright (c) 2005, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -66,7 +66,7 @@ public class EnvironmentVariableProvider implements IEnvironmentVariableProvider
@Override
public String[] resolveBuildPaths(int pathType, String variableName, String variableValue, IConfiguration configuration) {
- if (fDelimiter == null || "".equals(fDelimiter)) //$NON-NLS-1$
+ if (fDelimiter == null || fDelimiter.isEmpty())
return new String[]{variableValue};
List<String> list = EnvVarOperationProcessor.convertToList(variableValue,fDelimiter);
@@ -89,7 +89,7 @@ public class EnvironmentVariableProvider implements IEnvironmentVariableProvider
@Override
public IBuildEnvironmentVariable getVariable(String variableName, Object level, boolean includeParentLevels, boolean resolveMacros) {
- if (variableName == null || "".equals(variableName)) //$NON-NLS-1$
+ if (variableName == null || variableName.isEmpty())
return null;
if (level instanceof IConfiguration) {
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java
index ce332fcef1..2f69a70c6a 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java
@@ -1250,7 +1250,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
List<String> subDirList = new ArrayList<String>();
for (IContainer subDir : getSubdirList()) {
IPath projectRelativePath = subDir.getProjectRelativePath();
- if(!projectRelativePath.toString().equals("")) //$NON-NLS-1$
+ if(!projectRelativePath.toString().isEmpty())
subDirList.add(0, projectRelativePath.toString());
}
Collections.sort(subDirList, Collections.reverseOrder());
@@ -4370,7 +4370,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
rcInfo = config.getResourceInfo(folderPath.removeLastSegments(1), false);
}
String targetExtension = ((IFolderInfo)rcInfo).getOutputExtension(srcExtension);
- if (!targetExtension.equals("")) //$NON-NLS-1$
+ if (!targetExtension.isEmpty())
fileName += DOT + targetExtension;
IPath projectRelativePath = deletedFile.getProjectRelativePath().removeLastSegments(1);
IPath targetFilePath = getBuildWorkingDir().append(projectRelativePath).append(fileName);
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/ManagedBuildGnuToolInfo.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/ManagedBuildGnuToolInfo.java
index e8dbd2bf75..88d31534b5 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/ManagedBuildGnuToolInfo.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/ManagedBuildGnuToolInfo.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2012 Intel Corporation and others.
+ * Copyright (c) 2005, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -1013,7 +1013,7 @@ public class ManagedBuildGnuToolInfo implements IManagedBuildGnuToolInfo {
if (outExtensionName != null) {
OptDotExt = DOT + outExtensionName;
} else
- if (!tool.getOutputExtension(srcExtensionName).equals("")) //$NON-NLS-1$
+ if (!tool.getOutputExtension(srcExtensionName).isEmpty())
OptDotExt = DOT + tool.getOutputExtension(srcExtensionName);
// create rule of the form
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/AppendToMBSStringListOptionValues.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/AppendToMBSStringListOptionValues.java
index 64384f69b6..539d6b5454 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/AppendToMBSStringListOptionValues.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/AppendToMBSStringListOptionValues.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 Symbian Software Limited and others.
+ * Copyright (c) 2007, 2016 Symbian Software Limited and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -84,7 +84,7 @@ public class AppendToMBSStringListOptionValues extends ProcessRunner {
private boolean setOptionValue(IProject projectHandle, String id, String[] value, String path) throws BuildException, ProcessFailureException {
IConfiguration[] projectConfigs = ManagedBuildManager.getBuildInfo(projectHandle).getManagedProject().getConfigurations();
- boolean resource = !(path == null || path.equals("") || path.equals("/")); //$NON-NLS-1$ //$NON-NLS-2$
+ boolean resource = !(path == null || path.isEmpty() || path.equals("/")); //$NON-NLS-1$
boolean modified = false;
for (IConfiguration config : projectConfigs) {
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/AppendToMBSStringOptionValue.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/AppendToMBSStringOptionValue.java
index 9399e991d4..0e4919b760 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/AppendToMBSStringOptionValue.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/AppendToMBSStringOptionValue.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 Symbian Software Limited and others.
+ * Copyright (c) 2007, 2016 Symbian Software Limited and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -83,7 +83,7 @@ public class AppendToMBSStringOptionValue extends ProcessRunner {
private boolean setOptionValue(IProject projectHandle, String id, String value, String path) throws BuildException, ProcessFailureException {
IConfiguration[] projectConfigs = ManagedBuildManager.getBuildInfo(projectHandle).getManagedProject().getConfigurations();
- boolean resource = !(path == null || path.equals("") || path.equals("/")); //$NON-NLS-1$ //$NON-NLS-2$
+ boolean resource = !(path == null || path.isEmpty() || path.equals("/")); //$NON-NLS-1$
boolean modified = false;
for (IConfiguration config : projectConfigs) {
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/NewManagedProject.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/NewManagedProject.java
index fe1dc041ab..eea55e0286 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/NewManagedProject.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/NewManagedProject.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 Symbian Software Limited and others.
+ * Copyright (c) 2007, 2016 Symbian Software Limited and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -65,7 +65,7 @@ public class NewManagedProject extends ProcessRunner {
turnOffAutoBuild(workspace);
IPath locationPath = null;
- if (location != null && !location.trim().equals("")) { //$NON-NLS-1$
+ if (location != null && !location.trim().isEmpty()) {
locationPath = Path.fromPortableString(location);
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/SetMBSBooleanOptionValue.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/SetMBSBooleanOptionValue.java
index b0f14f1812..c3da04b4c4 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/SetMBSBooleanOptionValue.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/SetMBSBooleanOptionValue.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 Symbian Software Limited and others.
+ * Copyright (c) 2007, 2016 Symbian Software Limited and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -79,7 +79,7 @@ public class SetMBSBooleanOptionValue extends ProcessRunner {
private boolean setOptionValue(IProject projectHandle, String id, String value, String path) throws BuildException, ProcessFailureException {
IConfiguration[] projectConfigs = ManagedBuildManager.getBuildInfo(projectHandle).getManagedProject().getConfigurations();
- boolean resource = !(path == null || path.equals("") || path.equals("/")); //$NON-NLS-1$ //$NON-NLS-2$
+ boolean resource = !(path == null || path.isEmpty() || path.equals("/")); //$NON-NLS-1$
boolean modified = false;
for (IConfiguration config : projectConfigs) {
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/SetMBSStringListOptionValues.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/SetMBSStringListOptionValues.java
index 74ab0cb50f..faf3578368 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/SetMBSStringListOptionValues.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/SetMBSStringListOptionValues.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 Symbian Software Limited and others.
+ * Copyright (c) 2007, 2016 Symbian Software Limited and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -79,7 +79,7 @@ public class SetMBSStringListOptionValues extends ProcessRunner {
private boolean setOptionValue(IProject projectHandle, String id, String[] value, String path) throws BuildException, ProcessFailureException {
IConfiguration[] projectConfigs = ManagedBuildManager.getBuildInfo(projectHandle).getManagedProject().getConfigurations();
- boolean resource = !(path == null || path.equals("") || path.equals("/")); //$NON-NLS-1$ //$NON-NLS-2$
+ boolean resource = !(path == null || path.isEmpty() || path.equals("/")); //$NON-NLS-1$
boolean modified = false;
for (IConfiguration config : projectConfigs) {
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/SetMBSStringOptionValue.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/SetMBSStringOptionValue.java
index 3a040c5baa..08362ab54b 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/SetMBSStringOptionValue.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/SetMBSStringOptionValue.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2012 Symbian Software Limited and others.
+ * Copyright (c) 2007, 2016 Symbian Software Limited and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -80,7 +80,7 @@ public class SetMBSStringOptionValue extends ProcessRunner {
private boolean setOptionValue(IProject projectHandle, String id, String value, String path) throws BuildException, ProcessFailureException {
IConfiguration[] projectConfigs = ManagedBuildManager.getBuildInfo(projectHandle).getManagedProject().getConfigurations();
- boolean resource = !(path == null || path.equals("") || path.equals("/")); //$NON-NLS-1$ //$NON-NLS-2$
+ boolean resource = !(path == null || path.isEmpty() || path.equals("/")); //$NON-NLS-1$
boolean modified = false;
for (IConfiguration config : projectConfigs) {
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildOptionComboFieldEditor.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildOptionComboFieldEditor.java
index a9131a7e76..2c89993142 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildOptionComboFieldEditor.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildOptionComboFieldEditor.java
@@ -60,7 +60,7 @@ public class BuildOptionComboFieldEditor extends FieldEditor {
public BuildOptionComboFieldEditor(String name, String label, String tooltip, String contextId, String [] opts, String sel, Composite parent) {
this(name, label, opts, sel, parent);
setToolTip(tooltip);
- if (!contextId.equals("")) PlatformUI.getWorkbench().getHelpSystem().setHelp(optionSelector, contextId); //$NON-NLS-1$
+ if (!contextId.isEmpty()) PlatformUI.getWorkbench().getHelpSystem().setHelp(optionSelector, contextId);
}
/**
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildToolSettingUI.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildToolSettingUI.java
index 668e8ac531..48d2104885 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildToolSettingUI.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildToolSettingUI.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2012 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -314,7 +314,7 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
optionValueExist = true;
}
}
- if (!enumeration.equals("")) //$NON-NLS-1$
+ if (!enumeration.isEmpty())
setOption(opt, enumeration);
break;
case IOption.TREE :
@@ -328,7 +328,7 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
optionValueExist = true;
}
}
- if (!selectedID.equals("")) //$NON-NLS-1$
+ if (!selectedID.isEmpty())
setOption(opt, selectedID);
break;
case IOption.STRING_LIST :
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/FileListControlFieldEditor.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/FileListControlFieldEditor.java
index e74b00b901..9e6bae401c 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/FileListControlFieldEditor.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/FileListControlFieldEditor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2011 BitMethods Inc and others.
+ * Copyright (c) 2004, 2016 BitMethods Inc and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -89,7 +89,7 @@ public class FileListControlFieldEditor extends FieldEditor {
this(name, labelText, parent, type);
// can't use setToolTip(tooltip) as label not created yet
getLabelControl(parent).setToolTipText(tooltip);
- if (!contextId.equals("")) PlatformUI.getWorkbench().getHelpSystem().setHelp(list.getListControl(), contextId); //$NON-NLS-1$
+ if (!contextId.isEmpty()) PlatformUI.getWorkbench().getHelpSystem().setHelp(list.getListControl(), contextId);
}
/**
@@ -299,7 +299,7 @@ public class FileListControlFieldEditor extends FieldEditor {
* @return
*/
private String createList(String[] items) {
- StringBuffer path = new StringBuffer(""); //$NON-NLS-1$
+ StringBuffer path = new StringBuffer();
for (int i = 0; i < items.length; i++) {
path.append(items[i]);
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/NewBuildConfigurationDialog.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/NewBuildConfigurationDialog.java
index b8d0218048..d037e40b0b 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/NewBuildConfigurationDialog.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/NewBuildConfigurationDialog.java
@@ -122,7 +122,7 @@ public class NewBuildConfigurationDialog extends Dialog {
for (int i = 0; i < definedCfgds.length; i++) {
description = definedCfgds[i].getDescription();
- if( (description == null) || (description.equals("")) ){ //$NON-NLS-1$
+ if( (description == null) || (description.isEmpty()) ){
nameAndDescription = definedCfgds[i].getName();
} else {
nameAndDescription = definedCfgds[i].getName() + "( " + description + " )"; //$NON-NLS-1$ //$NON-NLS-2$
@@ -138,7 +138,7 @@ public class NewBuildConfigurationDialog extends Dialog {
for (int i = 0; i < defaultCfgds.length; i++) {
description = defaultCfgds[i].getDescription();
- if( (description == null) || (description.equals("")) ) { //$NON-NLS-1$
+ if( (description == null) || (description.isEmpty()) ) {
nameAndDescription = defaultCfgds[i].getName();
} else {
nameAndDescription = defaultCfgds[i].getName() + "( " + description + " )"; //$NON-NLS-1$ //$NON-NLS-2$
@@ -330,7 +330,7 @@ public class NewBuildConfigurationDialog extends Dialog {
if(defaultCfgds.length != 0){
String namesAndDescriptions[] = new String[defaultCfgds.length];
for (int i = 0; i < defaultCfgds.length; ++i) {
- if ( (defaultCfgds[i].getDescription() == null) || defaultCfgds[i].getDescription().equals("")) //$NON-NLS-1$
+ if ( (defaultCfgds[i].getDescription() == null) || defaultCfgds[i].getDescription().isEmpty())
namesAndDescriptions[i] = defaultCfgds[i].getName();
else
namesAndDescriptions[i] = defaultCfgds[i].getName() + "( " + defaultCfgds[i].getDescription() + " )"; //$NON-NLS-1$ //$NON-NLS-2$
@@ -362,7 +362,7 @@ public class NewBuildConfigurationDialog extends Dialog {
private String [] getDefinedConfigNamesAndDescriptions() {
String [] namesAndDescriptions = new String[definedCfgds.length];
for (int i = 0; i < definedCfgds.length; ++i) {
- if ( (definedCfgds[i].getDescription() == null) || definedCfgds[i].getDescription().equals("")) //$NON-NLS-1$
+ if ( (definedCfgds[i].getDescription() == null) || definedCfgds[i].getDescription().isEmpty())
namesAndDescriptions[i] = definedCfgds[i].getName();
else
namesAndDescriptions[i] = definedCfgds[i].getName() + "( " + definedCfgds[i].getDescription() +" )"; //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/NewCfgDialog.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/NewCfgDialog.java
index 608814b92d..6b10300156 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/NewCfgDialog.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/NewCfgDialog.java
@@ -481,7 +481,7 @@ public class NewCfgDialog implements INewCfgDialog {
private String getNameAndDescription(IConfiguration cfg) {
String name = cfg.getName();
if (name == null) name = NULL;
- if ( (cfg.getDescription() == null) || cfg.getDescription().equals("")) //$NON-NLS-1$
+ if ( (cfg.getDescription() == null) || cfg.getDescription().isEmpty())
return name;
else
return name + "( " + cfg.getDescription() +" )"; //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/codan/org.eclipse.cdt.codan.ui.cfgview/src/org/eclipse/cdt/codan/ui/cfgview/views/ControlFlowGraphView.java b/codan/org.eclipse.cdt.codan.ui.cfgview/src/org/eclipse/cdt/codan/ui/cfgview/views/ControlFlowGraphView.java
index eb6f492f0c..11d393da2c 100644
--- a/codan/org.eclipse.cdt.codan.ui.cfgview/src/org/eclipse/cdt/codan/ui/cfgview/views/ControlFlowGraphView.java
+++ b/codan/org.eclipse.cdt.codan.ui.cfgview/src/org/eclipse/cdt/codan/ui/cfgview/views/ControlFlowGraphView.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 QNX Software Systems and others.
+ * Copyright (c) 2010, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -355,7 +355,7 @@ public class ControlFlowGraphView extends ViewPart {
}
protected boolean open(String filename) throws PartInitException, CModelException {
- if (filename.equals(""))
+ if (filename.isEmpty())
return false;
IResource r = ParserUtil.getResourceForFilename(filename);
if (r != null) {
diff --git a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/BinaryTests.java b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/BinaryTests.java
index d79040b891..5502799c33 100644
--- a/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/BinaryTests.java
+++ b/core/org.eclipse.cdt.core.tests/model/org/eclipse/cdt/core/model/tests/BinaryTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -307,7 +307,7 @@ public class BinaryTests extends TestCase {
IBinary myBinary;
String name;
myBinary=CProjectHelper.findBinary(testProject, "test_g");
- assertTrue(myBinary.getSoname().equals(""));
+ assertTrue(myBinary.getSoname().isEmpty());
myBinary=CProjectHelper.findBinary(testProject, "libtestlib_g.so");
name=myBinary.getSoname();
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/AutomatedFramework.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/AutomatedFramework.java
index 630ad8d5df..3ed5a77236 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/AutomatedFramework.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/AutomatedFramework.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2012 IBM Corporation and others.
+ * Copyright (c) 2001, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -120,7 +120,7 @@ public abstract class AutomatedFramework extends TestCase {
suite.addTest( newTest( "propertiesFailed") ); //$NON-NLS-1$
}
- if( outputFile != null && !outputFile.equals("") ){ //$NON-NLS-1$
+ if( outputFile != null && !outputFile.isEmpty() ){
try{
File output = new File( outputFile );
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/BTreeTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/BTreeTests.java
index 681d76208d..6d4d5a2b4d 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/BTreeTests.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/BTreeTests.java
@@ -185,7 +185,7 @@ public class BTreeTests extends BaseTestCase {
public void assertBTreeInvariantsHold(String msg) throws CoreException {
String errorReport = btree.getInvariantsErrorReport();
- if (!errorReport.equals("")) {
+ if (!errorReport.isEmpty()) {
fail("Invariants do not hold: " + errorReport);
}
}
diff --git a/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/Main.java b/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/Main.java
index ba25446069..047872faaf 100644
--- a/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/Main.java
+++ b/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/Main.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2014 IBM Corporation and others.
+ * Copyright (c) 2005, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -178,13 +178,13 @@ public class Main {
* @param prop the initial comma-separated string
*/
private String[] getArrayFromList(String prop) {
- if (prop == null || prop.trim().equals(""))
+ if (prop == null || prop.trim().isEmpty())
return new String[0];
List<String> list = new ArrayList<>();
StringTokenizer tokens = new StringTokenizer(prop, ",");
while (tokens.hasMoreTokens()) {
String token = tokens.nextToken().trim();
- if (!token.equals(""))
+ if (!token.isEmpty())
list.add(token);
}
return list.toArray(new String[list.size()]);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/GCCBuiltinSymbolProvider.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/GCCBuiltinSymbolProvider.java
index 4286925fa7..643ab39bcc 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/GCCBuiltinSymbolProvider.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/GCCBuiltinSymbolProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2015 IBM Corporation and others.
+ * Copyright (c) 2005, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -548,7 +548,7 @@ public class GCCBuiltinSymbolProvider implements IBuiltinBindingsProvider {
if (tstr.equals("void")) {
Kind kind = Kind.eVoid;
t = fCpp ? new CPPBasicType(kind, q) : new CBasicType(kind, q);
- } else if (tstr.equals("")) {
+ } else if (tstr.isEmpty()) {
Kind kind = Kind.eUnspecified;
t = fCpp ? new CPPBasicType(kind, q) : new CBasicType(kind, q);
} else if (tstr.equals("char")) {
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/resources/ACBuilder.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/resources/ACBuilder.java
index c27b1a9abf..50a7fc2de4 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/resources/ACBuilder.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/resources/ACBuilder.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -240,7 +240,7 @@ public abstract class ACBuilder extends IncrementalProjectBuilder implements IMa
}
names = names + name;
}
- if (names.equals("")) {
+ if (names.isEmpty()) {
return strIds;
}
return names;
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/EclipseVariablesVariableSupplier.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/EclipseVariablesVariableSupplier.java
index d32980bdd3..f620c992fa 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/EclipseVariablesVariableSupplier.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/EclipseVariablesVariableSupplier.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2011 Intel Corporation and others.
+ * Copyright (c) 2005, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -133,7 +133,7 @@ public class EclipseVariablesVariableSupplier implements ICdtVariableSupplier {
// if(contextType != DefaultMacroContextInfo.CONTEXT_WORKSPACE)
// return null;
- if(macroName == null || "".equals(macroName)) //$NON-NLS-1$
+ if(macroName == null || macroName.isEmpty())
return null;
String varName = null;
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/EnvironmentVariableSupplier.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/EnvironmentVariableSupplier.java
index 2c52c3fd5e..33af789267 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/EnvironmentVariableSupplier.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/EnvironmentVariableSupplier.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2009 Intel Corporation and others.
+ * Copyright (c) 2005, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -101,7 +101,7 @@ public class EnvironmentVariableSupplier extends CoreMacroSupplierBase {
}
private static boolean isTextList(String str, String delimiter) {
- if (delimiter == null || "".equals(delimiter)) //$NON-NLS-1$
+ if (delimiter == null || delimiter.isEmpty())
return false;
// Regex: ([^:]+:)+[^:]*
@@ -127,7 +127,7 @@ public class EnvironmentVariableSupplier extends CoreMacroSupplierBase {
@Override
public ICdtVariable getMacro(String macroName, int contextType,
Object contextData) {
- if(macroName == null || "".equals(macroName)) //$NON-NLS-1$
+ if(macroName == null || macroName.isEmpty())
return null;
IEnvironmentVariable var = null;
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/UserDefinedVariableSupplier.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/UserDefinedVariableSupplier.java
index 9ff9e6a0b6..c0fb06957a 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/UserDefinedVariableSupplier.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/cdtvariables/UserDefinedVariableSupplier.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2015 Intel Corporation and others.
+ * Copyright (c) 2005, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -113,7 +113,7 @@ public class UserDefinedVariableSupplier extends CoreMacroSupplierBase {
*/
@Override
public ICdtVariable getMacro(String macroName, int contextType, Object contextData) {
- if(macroName == null || "".equals(macroName)) //$NON-NLS-1$
+ if(macroName == null || macroName.isEmpty())
return null;
StorableCdtVariables macros = getStorableMacros(contextType,contextData);
@@ -138,7 +138,7 @@ public class UserDefinedVariableSupplier extends CoreMacroSupplierBase {
String value,
int contextType,
Object contextData){
- if(macroName == null || "".equals(macroName)) //$NON-NLS-1$
+ if(macroName == null || macroName.isEmpty())
return null;
StorableCdtVariables macros = getStorableMacros(contextType, contextData);
if(macros == null)
@@ -168,7 +168,7 @@ public class UserDefinedVariableSupplier extends CoreMacroSupplierBase {
String value[],
int contextType,
Object contextData){
- if(macroName == null || "".equals(macroName)) //$NON-NLS-1$
+ if(macroName == null || macroName.isEmpty())
return null;
StorableCdtVariables macros = getStorableMacros(contextType, contextData);
if(macros == null)
@@ -197,7 +197,7 @@ public class UserDefinedVariableSupplier extends CoreMacroSupplierBase {
if(copy == null)
return null;
String macroName = copy.getName();
- if(macroName == null || "".equals(macroName)) //$NON-NLS-1$
+ if(macroName == null || macroName.isEmpty())
return null;
StorableCdtVariables macros = getStorableMacros(contextType, contextData);
if(macros == null)
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/envvar/EnvironmentVariableManager.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/envvar/EnvironmentVariableManager.java
index 1b5bbf341c..b00b7fae88 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/envvar/EnvironmentVariableManager.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/envvar/EnvironmentVariableManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2012 Intel Corporation and others.
+ * Copyright (c) 2005, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -179,7 +179,7 @@ public class EnvironmentVariableManager implements IEnvironmentVariableManager {
@Override
public IEnvironmentVariable getVariable(String variableName, ICConfigurationDescription cfg, boolean resolveMacros) {
- if (variableName == null || "".equals(variableName)) //$NON-NLS-1$
+ if (variableName == null || variableName.isEmpty())
return null;
IEnvironmentContextInfo info = getContextInfo(cfg);
@@ -193,7 +193,7 @@ public class EnvironmentVariableManager implements IEnvironmentVariableManager {
@Override
public IEnvironmentVariable getVariable(String name, IBuildConfiguration config, boolean resolveMacros) {
- if (name == null || "".equals(name)) //$NON-NLS-1$
+ if (name == null || name.isEmpty())
return null;
IEnvironmentContextInfo info = getContextInfo(config);
diff --git a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/SharedDefaults.java b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/SharedDefaults.java
index 20a45520ce..5f8af78a0f 100644
--- a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/SharedDefaults.java
+++ b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/SharedDefaults.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2008 Symbian Software Limited and others.
+ * Copyright (c) 2007, 2016 Symbian Software Limited and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -135,7 +135,7 @@ public class SharedDefaults extends HashMap<String, String> {
Element xmlElement = sharedElementList.get(i);
key = xmlElement.getAttribute(TemplateEngineHelper.ID);
value = xmlElement.getAttribute(TemplateEngineHelper.VALUE);
- if (key != null && !key.trim().equals("")) { //$NON-NLS-1$
+ if (key != null && !key.trim().isEmpty()) {
sharedDefaultsMap.put(key, value);
}
}
diff --git a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateDescriptor.java b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateDescriptor.java
index 7e60e8dde4..45e4c28621 100644
--- a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateDescriptor.java
+++ b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateDescriptor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2014 Symbian Software Limited and others.
+ * Copyright (c) 2007, 2016 Symbian Software Limited and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -176,7 +176,7 @@ public class TemplateDescriptor {
Element propertyElement = children.get(i);
String key = propertyElement.getAttribute(ID);
String value = propertyElement.getAttribute(DEFAULT);
- if (key != null && !key.equals("")) { //$NON-NLS-1$
+ if (key != null && !key.isEmpty()) {
defaults.put(key, value);
}
diff --git a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ConditionalProcessGroup.java b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ConditionalProcessGroup.java
index 56979cc7e7..c324ff3f0a 100644
--- a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ConditionalProcessGroup.java
+++ b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ConditionalProcessGroup.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2014 Symbian Software Limited and others.
+ * Copyright (c) 2007, 2016 Symbian Software Limited and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -75,7 +75,7 @@ public class ConditionalProcessGroup {
this.id = "Condition " + id; //$NON-NLS-1$
conditionString = conditionElement.getAttribute(ProcessHelper.CONDITION);
if (conditionString != null) {
- if (conditionString.trim().equals("")) { //$NON-NLS-1$
+ if (conditionString.trim().isEmpty()) {
conditionString = null;
} else {
int op = conditionString.indexOf(ProcessHelper.EQUALS);
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/CygPath.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/CygPath.java
index 8ca653949f..3f6ffa223c 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/CygPath.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/CygPath.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -109,7 +109,7 @@ public class CygPath {
reader = new BufferedReader(new InputStreamReader(cygPath.getInputStream()));
String newPath = reader.readLine();
IPath ipath;
- if (path != null && !path.equals("")) { //$NON-NLS-1$
+ if (path != null && !path.isEmpty()) {
ipath = new Path(newPath);
} else {
ipath = new Path(path);
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/envvar/EnvVarOperationProcessor.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/envvar/EnvVarOperationProcessor.java
index 7100fc4bf2..92bdb50e03 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/envvar/EnvVarOperationProcessor.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/envvar/EnvVarOperationProcessor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2015 Intel Corporation and others.
+ * Copyright (c) 2005, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -83,7 +83,7 @@ public class EnvVarOperationProcessor {
if(addValue == null)
return initialValue;
- if(delimiter == null || "".equals(delimiter)){ //$NON-NLS-1$
+ if(delimiter == null || delimiter.isEmpty()){
return prepend ? addValue + initialValue : initialValue + addValue;
}
diff --git a/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/Main.java b/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/Main.java
index e147053d5f..b77a27e338 100644
--- a/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/Main.java
+++ b/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/testplugin/Main.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -169,13 +169,13 @@ protected Object basicRun(String[] args) throws Exception {
* @param prop the initial comma-separated string
*/
private String[] getArrayFromList(String prop) {
- if (prop == null || prop.trim().equals("")) //$NON-NLS-1$
+ if (prop == null || prop.trim().isEmpty())
return new String[0];
Vector list = new Vector();
StringTokenizer tokens = new StringTokenizer(prop, ","); //$NON-NLS-1$
while (tokens.hasMoreTokens()) {
String token = tokens.nextToken().trim();
- if (!token.equals("")) //$NON-NLS-1$
+ if (!token.isEmpty())
list.addElement(token);
}
return list.isEmpty() ? new String[0] : (String[]) list.toArray(new String[0]);
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/util/Strings.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/util/Strings.java
index 8242e9cdd5..45403cdda0 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/util/Strings.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/util/Strings.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -344,7 +344,7 @@ public class Strings {
private static int findLastNonEmptyLineIndex(String[] sourceLines) {
for (int i= sourceLines.length - 1; i >= 0; i--) {
- if (! sourceLines[i].trim().equals(""))//$NON-NLS-1$
+ if (! sourceLines[i].trim().isEmpty())
return i;
}
return -1;
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CView.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CView.java
index 1a457f310d..e0ebe0f7a0 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CView.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CView.java
@@ -477,7 +477,7 @@ public class CView extends ViewPart implements ISetSelectionTarget, IPropertyCha
}
String wsname = memento.getString(TAG_WORKINGSET);
- if (wsname != null && wsname.equals("") == false) { //$NON-NLS-1$
+ if (wsname != null && !wsname.isEmpty()) {
IWorkingSetManager wsmanager = getViewSite().getWorkbenchWindow().getWorkbench().getWorkingSetManager();
IWorkingSet workingSet = wsmanager.getWorkingSet(wsname);
if (workingSet != null) {
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPage.java
index aae3ed5a24..60e471ab03 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPage.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2012 QNX Software Systems and others.
+ * Copyright (c) 2004, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -910,7 +910,7 @@ public class CPathIncludeSymbolEntryPage extends CPathIncludeSymbolEntryBasePage
String newItem = null;
if (dialog.open() == Window.OK) {
newItem = dialog.getValue();
- if (newItem != null && !newItem.equals("")) { //$NON-NLS-1$
+ if (newItem != null && !newItem.isEmpty()) {
if (existing == null) {
CPElementGroup group = getSelectedGroup();
CPElement newPath = new CPElement(fCurrCProject, IPathEntry.CDT_INCLUDE, group.getResource().getFullPath(),
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPerFilePage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPerFilePage.java
index 4c66e015ff..4173f91e3a 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPerFilePage.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPerFilePage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2012 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -968,7 +968,7 @@ public class CPathIncludeSymbolEntryPerFilePage extends CPathIncludeSymbolEntryB
String newItem = null;
if (dialog.open() == Window.OK) {
newItem = dialog.getValue();
- if (newItem != null && !newItem.equals("")) { //$NON-NLS-1$
+ if (newItem != null && !newItem.isEmpty()) {
if (existing == null) {
CPElementGroup group = getSelectedGroup();
CPElement newPath = new CPElement(fCurrCProject, IPathEntry.CDT_INCLUDE, group.getResource().getFullPath(),
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/utils/Checks.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/utils/Checks.java
index 645002113f..ef8f3ef9bc 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/utils/Checks.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/utils/Checks.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -51,7 +51,7 @@ public class Checks {
public static boolean startsWithUpperCase(String s) {
if (s == null) {
return false;
- } else if ("".equals(s)) { //$NON-NLS-1$
+ } else if (s.isEmpty()) {
return false;
} else {
// Workaround for JDK bug (see 26529)
@@ -62,7 +62,7 @@ public class Checks {
public static boolean startsWithLowerCase(String s){
if (s == null) {
return false;
- } else if ("".equals(s)) { //$NON-NLS-1$
+ } else if (s.isEmpty()) {
return false;
} else {
// Workaround for JDK bug (see 26529)
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CHelpProviderDescriptor.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CHelpProviderDescriptor.java
index b52cbaf7c1..c62b7281a7 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CHelpProviderDescriptor.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CHelpProviderDescriptor.java
@@ -1,5 +1,5 @@
/**********************************************************************
- * Copyright (c) 2004, 2012 Intel Corporation and others.
+ * Copyright (c) 2004, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -66,7 +66,7 @@ public class CHelpProviderDescriptor {
private Element getDescriptorElement(Element parentElement){
String id = getConfigurationElement().getAttribute(ATTRIBUTE_ID);
- if(id == null || "".equals(id)) //$NON-NLS-1$
+ if(id == null || id.isEmpty())
return null;
NodeList nodes = parentElement.getElementsByTagName(ELEMENT_PROVIDER);
@@ -88,7 +88,7 @@ public class CHelpProviderDescriptor {
private static ICHelpProvider getCHelpProvider(IConfigurationElement element){
String id = element.getAttribute(ATTRIBUTE_ID);
- if(id == null || "".equals(id)) //$NON-NLS-1$
+ if(id == null || id.isEmpty())
return null;
Map<String, ICHelpProvider> providersMap = getProvidersMap();
@@ -168,7 +168,7 @@ public class CHelpProviderDescriptor {
public void serialize(Document doc, Element parentElement){
String id = getConfigurationElement().getAttribute(ATTRIBUTE_ID);
- if(id == null || "".equals(id)) //$NON-NLS-1$
+ if(id == null || id.isEmpty())
return;
CHelpBookDescriptor bookDescriptors[] = getCHelpBookDescriptors();
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/dialogfields/DialogField.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/dialogfields/DialogField.java
index 9f1bfeecb8..993d798959 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/dialogfields/DialogField.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/dialogfields/DialogField.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2014 IBM Corporation and others.
+ * Copyright (c) 2005, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -132,7 +132,7 @@ public class DialogField {
fLabel= new Label(parent, SWT.LEFT);
fLabel.setFont(parent.getFont());
fLabel.setEnabled(fEnabled);
- if (fLabelText != null && !"".equals(fLabelText)) { //$NON-NLS-1$
+ if (fLabelText != null && !fLabelText.isEmpty()) {
fLabel.setText(fLabelText);
} else {
// XXX: to avoid a 16 pixel wide empty label - revisit
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/CElementWorkingSetPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/CElementWorkingSetPage.java
index fac9353a12..02a76cf937 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/CElementWorkingSetPage.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/CElementWorkingSetPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -420,7 +420,7 @@ public class CElementWorkingSetPage extends WizardPage implements IWorkingSetPag
if (newText.equals(newText.trim()) == false) {
errorMessage = WorkingSetMessages.CElementWorkingSetPage_warning_nameMustNotBeEmpty;
}
- if (newText.equals("")) { //$NON-NLS-1$
+ if (newText.isEmpty()) {
if (fFirstCheck) {
setPageComplete(false);
fFirstCheck= false;
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/NewConfigurationDialog.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/NewConfigurationDialog.java
index ef7eec48a2..ddaf7e7d89 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/NewConfigurationDialog.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/NewConfigurationDialog.java
@@ -96,7 +96,7 @@ public class NewConfigurationDialog extends Dialog implements INewCfgDialog {
for (int i = 0; i < cfgds.length; i++) {
description = cfgds[i].getDescription();
- if( (description == null) || (description.equals("")) ){ //$NON-NLS-1$
+ if( (description == null) || (description.isEmpty()) ){
nameAndDescription = cfgds[i].getName();
} else {
nameAndDescription = cfgds[i].getName() + "( " + description + " )"; //$NON-NLS-1$ //$NON-NLS-2$
@@ -250,7 +250,7 @@ public class NewConfigurationDialog extends Dialog implements INewCfgDialog {
private String [] getDefinedConfigNamesAndDescriptions() {
String [] namesAndDescriptions = new String[cfgds.length];
for (int i = 0; i < cfgds.length; ++i) {
- if ( (cfgds[i].getDescription() == null) || cfgds[i].getDescription().equals("")) //$NON-NLS-1$
+ if ( (cfgds[i].getDescription() == null) || cfgds[i].getDescription().isEmpty())
namesAndDescriptions[i] = cfgds[i].getName();
else
namesAndDescriptions[i] = cfgds[i].getName() + "( " + cfgds[i].getDescription() +" )"; //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/uitree/uiwidgets/UITextWidget.java b/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/uitree/uiwidgets/UITextWidget.java
index f53479b218..2eb0b4807f 100644
--- a/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/uitree/uiwidgets/UITextWidget.java
+++ b/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/uitree/uiwidgets/UITextWidget.java
@@ -221,7 +221,7 @@ public class UITextWidget extends InputUIElement implements ModifyListener {
return;
String mandatory = uiAttributes.get(InputUIElement.MANDATORY);
- if ((mandatory == null || !mandatory.equalsIgnoreCase("true")) && textValue.equals("")) { //$NON-NLS-1$ //$NON-NLS-2$
+ if ((mandatory == null || !mandatory.equalsIgnoreCase("true")) && textValue.isEmpty()) { //$NON-NLS-1$
return;
}
@@ -264,7 +264,7 @@ public class UITextWidget extends InputUIElement implements ModifyListener {
String mandatory = uiAttributes.get(InputUIElement.MANDATORY);
if (((mandatory != null) && (mandatory.equalsIgnoreCase(TemplateEngineHelper.BOOLTRUE)))
- && ((textValue == null) || (textValue.equals("")) || //$NON-NLS-1$
+ && ((textValue == null) || (textValue.isEmpty()) ||
(textValue.trim().length() < 1))) {
retVal = false;
diff --git a/core/org.eclipse.cdt.ui/utils.ui/org/eclipse/cdt/utils/ui/controls/FileListControl.java b/core/org.eclipse.cdt.ui/utils.ui/org/eclipse/cdt/utils/ui/controls/FileListControl.java
index a0bea44220..f6c5da0805 100644
--- a/core/org.eclipse.cdt.ui/utils.ui/org/eclipse/cdt/utils/ui/controls/FileListControl.java
+++ b/core/org.eclipse.cdt.ui/utils.ui/org/eclipse/cdt/utils/ui/controls/FileListControl.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2015 BitMethods Inc and others.
+ * Copyright (c) 2004, 2016 BitMethods Inc and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -432,7 +432,7 @@ public class FileListControl {
int i = getSelectionIndex();
// insert items at the correct location
for (String item : pasteBuffer)
- if (!item.trim().equals("")) //$NON-NLS-1$
+ if (!item.trim().isEmpty())
add(item.trim(), ++i);
checkNotificationNeeded();
}
diff --git a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/RSEHelper.java b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/RSEHelper.java
index e2ba346086..2e7dcf70fe 100644
--- a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/RSEHelper.java
+++ b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/RSEHelper.java
@@ -1,5 +1,5 @@
/********************************************************************************
- * Copyright (c) 2009, 2015 MontaVista Software, Inc. and others.
+ * Copyright (c) 2009, 2016 MontaVista Software, Inc. and others.
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
@@ -249,7 +249,7 @@ public class RSEHelper {
String remoteCommand = realRemoteCommand + CMD_DELIMITER + EXIT_CMD;
- if (!prelaunchCmd.trim().equals("")) //$NON-NLS-1$
+ if (!prelaunchCmd.trim().isEmpty())
remoteCommand = prelaunchCmd + CMD_DELIMITER + remoteCommand;
IShellService shellService;
@@ -299,7 +299,7 @@ public class RSEHelper {
String remoteCommand = realRemoteCommand + CMD_DELIMITER + EXIT_CMD;
- if (!prelaunchCmd.trim().equals("")) //$NON-NLS-1$
+ if (!prelaunchCmd.trim().isEmpty())
remoteCommand = prelaunchCmd + CMD_DELIMITER + remoteCommand;
IShellService shellService = null;
diff --git a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/launching/RemoteGdbLaunchDelegate.java b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/launching/RemoteGdbLaunchDelegate.java
index c225ec4089..8721e16403 100644
--- a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/launching/RemoteGdbLaunchDelegate.java
+++ b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/launching/RemoteGdbLaunchDelegate.java
@@ -95,7 +95,7 @@ public class RemoteGdbLaunchDelegate extends GdbLaunchDelegate {
IRemoteConnectionConfigurationConstants.ATTR_PRERUN_COMMANDS,
""); //$NON-NLS-1$
- if (arguments != null && !arguments.equals("")) //$NON-NLS-1$
+ if (arguments != null && !arguments.isEmpty())
commandArguments += " " + arguments; //$NON-NLS-1$
monitor.setTaskName(Messages.RemoteRunLaunchDelegate_9);
diff --git a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteCDSFMainTab.java b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteCDSFMainTab.java
index 9dea8f8de6..6e4f12e59e 100644
--- a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteCDSFMainTab.java
+++ b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteCDSFMainTab.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2015 PalmSource, Inc. and others.
+ * Copyright (c) 2006, 2016 PalmSource, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -146,7 +146,7 @@ public class RemoteCDSFMainTab extends CMainTab {
int currentSelection = connectionCombo.getSelectionIndex();
String connection_name = currentSelection >= 0 ? connectionCombo
.getItem(currentSelection) : ""; //$NON-NLS-1$
- if (connection_name.equals("")) { //$NON-NLS-1$
+ if (connection_name.isEmpty()) {
setErrorMessage(CONNECTION_TEXT_ERROR);
retVal = false;
}
diff --git a/debug/org.eclipse.cdt.debug.application/src/org/eclipse/cdt/debug/application/ApplicationWorkbenchWindowAdvisor.java b/debug/org.eclipse.cdt.debug.application/src/org/eclipse/cdt/debug/application/ApplicationWorkbenchWindowAdvisor.java
index 9069ace3c8..b95100dd3e 100644
--- a/debug/org.eclipse.cdt.debug.application/src/org/eclipse/cdt/debug/application/ApplicationWorkbenchWindowAdvisor.java
+++ b/debug/org.eclipse.cdt.debug.application/src/org/eclipse/cdt/debug/application/ApplicationWorkbenchWindowAdvisor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013, 2015 Red Hat, Inc.
+ * Copyright (c) 2013, 2016 Red Hat, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -242,7 +242,7 @@ public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
}
});
// Check and see if we failed above and if so, quit
- if (info.getHostPath().equals("")) { //$NON-NLS-1$
+ if (info.getHostPath().isEmpty()) {
monitor.done();
// throw internal exception which will be caught below
throw new StartupException(errorStatus.getMessage());
@@ -342,7 +342,7 @@ public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
}
});
// Check and see if we failed above and if so, quit
- if (info.getHostPath().equals("")) { //$NON-NLS-1$
+ if (info.getHostPath().isEmpty()) {
monitor.done();
// throw internal exception which will be caught below
throw new StartupException(errorStatus.getMessage());
@@ -405,7 +405,7 @@ public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
}
});
// Check and see if we failed above and if so, quit
- if (info.getHostPath().equals("")) { //$NON-NLS-1$
+ if (info.getHostPath().isEmpty()) {
monitor.done();
// throw internal exception which will be caught below
throw new StartupException(errorStatus.getMessage());
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPropertyPage.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPropertyPage.java
index 19b6e6b83f..8390e668df 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPropertyPage.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPropertyPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2015 QNX Software Systems and others.
+ * Copyright (c) 2004, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -630,7 +630,7 @@ public class CBreakpointPropertyPage extends FieldEditorPreferencePage implement
}
}
String filename = getPreferenceStore().getString(ICBreakpoint.SOURCE_HANDLE);
- if (filename != null && !"".equals(filename)) { //$NON-NLS-1$
+ if (filename != null && !filename.isEmpty()) {
addField( createLabelEditor( getFieldEditorParent(), BreakpointsMessages.getString( "CBreakpointPropertyPage.sourceHandle_label" ), filename ) ); //$NON-NLS-1$
}
createWatchExpressionEditor(getFieldEditorParent());
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/dialogfields/DialogField.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/dialogfields/DialogField.java
index 5d577e95cf..b5d2caf0a7 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/dialogfields/DialogField.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/dialogfields/DialogField.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2014 IBM Corporation and others.
+ * Copyright (c) 2005, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -141,7 +141,7 @@ public class DialogField {
fLabel= new Label(parent, SWT.LEFT | SWT.WRAP);
fLabel.setFont(parent.getFont());
fLabel.setEnabled(fEnabled);
- if (fLabelText != null && !"".equals(fLabelText)) { //$NON-NLS-1$
+ if (fLabelText != null && !fLabelText.isEmpty()) {
fLabel.setText(fLabelText);
} else {
// XXX: to avoid a 16 pixel wide empty label - revisit
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/PersistentSettingsManager.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/PersistentSettingsManager.java
index 168f884e1d..e9d119e828 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/PersistentSettingsManager.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/utils/PersistentSettingsManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2015 Ericsson and others.
+ * Copyright (c) 2015, 2016 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -491,6 +491,6 @@ public class PersistentSettingsManager {
/** Returns the key to be used to save parameter, taking into account the
* instance id, if applicable */
private String getStorageKey(boolean perInstance) {
- return (perInstance ? m_instance : "") + (!m_category.equals("") ? "." + m_category : ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ return (perInstance ? m_instance : "") + (!m_category.isEmpty() ? "." + m_category : ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
-} \ No newline at end of file
+}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CDebuggerTab.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CDebuggerTab.java
index 41d0ecf9f8..6a8b6d9720 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CDebuggerTab.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CDebuggerTab.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2013 QNX Software Systems and others.
+ * Copyright (c) 2008, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -138,9 +138,9 @@ public class CDebuggerTab extends CLaunchConfigurationTab {
protected void initDebuggerTypes(String selection) {
if (fAttachMode) {
- setInitializeDefault(selection.equals("") ? true : false); //$NON-NLS-1$
+ setInitializeDefault(selection.isEmpty());
- if (selection.equals("")) { //$NON-NLS-1$
+ if (selection.isEmpty()) {
selection = LOCAL_DEBUGGER_ID;
}
@@ -623,4 +623,4 @@ public class CDebuggerTab extends CLaunchConfigurationTab {
return fDCombo.getItem(selectedIndex);
}
}
-} \ No newline at end of file
+}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CLaunchConfigurationTab.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CLaunchConfigurationTab.java
index 5f310e7e58..eb4d42f777 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CLaunchConfigurationTab.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CLaunchConfigurationTab.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2012 QNX Software Systems and others.
+ * Copyright (c) 2008, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -60,7 +60,7 @@ public abstract class CLaunchConfigurationTab extends AbstractLaunchConfiguratio
} catch (CoreException e) {
}
- if (projectName != null && !projectName.equals("")) { //$NON-NLS-1$
+ if (projectName != null && !projectName.isEmpty()) {
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
ICProject cProject = CCorePlugin.getDefault().getCoreModel().create(project);
if (cProject != null && cProject.exists()) {
@@ -101,7 +101,7 @@ public abstract class CLaunchConfigurationTab extends AbstractLaunchConfiguratio
}
}
if (obj != null) {
- if (programName == null || programName.equals("")) { //$NON-NLS-1$
+ if (programName == null || programName.isEmpty()) {
return (ICElement)obj;
}
ICElement ce = (ICElement)obj;
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/WorkingDirectoryBlock.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/WorkingDirectoryBlock.java
index 3affe4bb76..268f83766c 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/WorkingDirectoryBlock.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/WorkingDirectoryBlock.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -170,7 +170,7 @@ public class WorkingDirectoryBlock extends CLaunchConfigurationTab {
DirectoryDialog dialog = new DirectoryDialog(getShell());
dialog.setMessage(LaunchUIMessages.getString("WorkingDirectoryBlock.7")); //$NON-NLS-1$
String currentWorkingDir = fWorkingDirText.getText();
- if (!currentWorkingDir.trim().equals("")) { //$NON-NLS-1$
+ if (!currentWorkingDir.trim().isEmpty()) {
File path = new File(currentWorkingDir);
if (path.exists()) {
dialog.setFilterPath(currentWorkingDir);
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepoints/AbstractImageRegistry.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepoints/AbstractImageRegistry.java
index 413e914882..1e1a1edd61 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepoints/AbstractImageRegistry.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepoints/AbstractImageRegistry.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 Wind River Systems and others.
+ * Copyright (c) 2010, 2016 Wind River Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -49,7 +49,7 @@ public abstract class AbstractImageRegistry extends ImageRegistry {
* key.
*/
protected void localImage(String key, String dir, String name) {
- if (dir== null || dir.equals(""))//$NON-NLS-1$
+ if (dir== null || dir.isEmpty())
fLocations.put(key, new String[] {"icons/" + name}); //$NON-NLS-1$
else
fLocations.put(key, new String[] {"icons/" + dir + "/" + name}); //$NON-NLS-1$ //$NON-NLS-2$
@@ -72,7 +72,7 @@ public abstract class AbstractImageRegistry extends ImageRegistry {
String[] locations = new String[dirs.length];
for (int i = 0; i < dirs.length; i++) {
String dir = dirs[i];
- if (dir== null || dir.equals(""))//$NON-NLS-1$
+ if (dir== null || dir.isEmpty())
locations[i] = "icons/" + name; //$NON-NLS-1$
else
locations[i] = "icons/" + dir + "/" + name; //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_0.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_0.java
index acb7838df0..8af114956c 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_0.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_0.java
@@ -1421,7 +1421,7 @@ public class GDBProcesses_7_0 extends AbstractDsfService
List<IMIContainerDMContext> containerDmcs = new ArrayList<IMIContainerDMContext>(groups.length);
for (IThreadGroupInfo group : groups) {
if (group.getPid() == null ||
- group.getPid().equals("") || group.getPid().equals("0")) { //$NON-NLS-1$ //$NON-NLS-2$
+ group.getPid().isEmpty() || group.getPid().equals("0")) { //$NON-NLS-1$
continue;
}
String groupId = group.getGroupId();
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpointDMData.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpointDMData.java
index 7bf6fd1dd4..8c8d6e3630 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpointDMData.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpointDMData.java
@@ -222,7 +222,7 @@ public class MIBreakpointDMData implements IBreakpointDMData {
Integer lineNumber = fBreakpoint.getLine();
String function = fBreakpoint.getFunction();
- if (!fileName.equals("")) { //$NON-NLS-1$
+ if (!fileName.isEmpty()) {
if (lineNumber != -1) {
location = fileName + ":" + lineNumber; //$NON-NLS-1$
} else {
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIListThreadGroupsInfo.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIListThreadGroupsInfo.java
index a71ba6db15..6884a5f5ac 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIListThreadGroupsInfo.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIListThreadGroupsInfo.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2015 Ericsson and others.
+ * Copyright (c) 2008, 2016 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -450,7 +450,7 @@ public class MIListThreadGroupsInfo extends MIInfo {
// a description, that only happens for -list-thread-groups --available
// We must check this because with GDB 7.2, there will be no pid field as a result
// of -list-thread-groups, if no process is actually running yet.
- if (pid.equals("") && !desc.equals("")) { //$NON-NLS-1$ //$NON-NLS-2$
+ if (pid.isEmpty() && !desc.isEmpty()) {
pid = id;
}
fGroupList[i] = new ThreadGroupInfo(id, desc, type, pid, user, cores, exec, threads, exitCode);
diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIBreakpointsTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIBreakpointsTest.java
index 7273efa26a..d9eb4581f0 100644
--- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIBreakpointsTest.java
+++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIBreakpointsTest.java
@@ -1823,7 +1823,7 @@ public class MIBreakpointsTest extends BaseParametrizedTestCase {
// Verify the state of the breakpoint
MIBreakpointDMData breakpoint2 = (MIBreakpointDMData) getBreakpoint(ref);
assertTrue("BreakpointEvent problem: breakpoint mismatch (wrong condition)",
- breakpoint2.getCondition().equals(""));
+ breakpoint2.getCondition().isEmpty());
}
// ------------------------------------------------------------------------
@@ -2010,7 +2010,7 @@ public class MIBreakpointsTest extends BaseParametrizedTestCase {
// Verify the state of the watchpoint
MIBreakpointDMData watchpoint2 = (MIBreakpointDMData) getBreakpoint(ref);
assertTrue("BreakpointEvent problem: breakpoint mismatch (wrong condition)",
- watchpoint2.getCondition().equals(""));
+ watchpoint2.getCondition().isEmpty());
}
// ------------------------------------------------------------------------
@@ -3246,7 +3246,7 @@ public class MIBreakpointsTest extends BaseParametrizedTestCase {
// Ensure that the breakpoint was correctly installed
MIBreakpointDMData breakpoint1 = (MIBreakpointDMData) getBreakpoint(ref);
assertTrue("BreakpointService problem: breakpoint mismatch (wrong file name)",
- breakpoint1.getFileName().equals(""));
+ breakpoint1.getFileName().isEmpty());
assertTrue("BreakpointService problem: breakpoint mismatch (wrong line number)",
breakpoint1.getLineNumber() == -1);
assertTrue("BreakpointService problem: breakpoint mismatch (wrong condition)",
@@ -3297,9 +3297,9 @@ public class MIBreakpointsTest extends BaseParametrizedTestCase {
// Ensure that the breakpoint was correctly installed
MIBreakpointDMData breakpoint1 = (MIBreakpointDMData) getBreakpoint(ref);
assertTrue("BreakpointService problem: breakpoint mismatch (wrong file name)",
- breakpoint1.getFileName().equals(""));
+ breakpoint1.getFileName().isEmpty());
assertTrue("BreakpointService problem: breakpoint mismatch (wrong function)",
- breakpoint1.getFunctionName().equals(""));
+ breakpoint1.getFunctionName().isEmpty());
assertTrue("BreakpointService problem: breakpoint mismatch (wrong condition)",
breakpoint1.getCondition().equals(NO_CONDITION));
assertTrue("BreakpointService problem: breakpoint mismatch (wrong ignore count)",
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/AbstractImageRegistry.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/AbstractImageRegistry.java
index a0bf5df226..dfd97ef610 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/AbstractImageRegistry.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/AbstractImageRegistry.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 Wind River Systems and others.
+ * Copyright (c) 2007, 2016 Wind River Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -49,7 +49,7 @@ public abstract class AbstractImageRegistry {
* key.
*/
protected void localImage(String key, String dir, String name) {
- if (dir== null || dir.equals(""))//$NON-NLS-1$
+ if (dir== null || dir.isEmpty())
fLocations.put(key, new String[] {"icons/" + name}); //$NON-NLS-1$
else
fLocations.put(key, new String[] {"icons/" + dir + "/" + name}); //$NON-NLS-1$ //$NON-NLS-2$
@@ -72,7 +72,7 @@ public abstract class AbstractImageRegistry {
String[] locations = new String[dirs.length];
for (int i = 0; i < dirs.length; i++) {
String dir = dirs[i];
- if (dir== null || dir.equals(""))//$NON-NLS-1$
+ if (dir== null || dir.isEmpty())
locations[i] = "icons/" + name; //$NON-NLS-1$
else
locations[i] = "icons/" + dir + "/" + name; //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerTab.java b/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerTab.java
index 2cb4f8302d..78e0dd1808 100644
--- a/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerTab.java
+++ b/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerTab.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2015 Red Hat.
+ * Copyright (c) 2015, 2016 Red Hat
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -414,7 +414,7 @@ public class ContainerTab extends AbstractLaunchConfigurationTab implements
connections = DockerConnectionManager.getInstance()
.getConnections();
if (connections.length > 0) {
- if (!connectionUri.equals("")) { //$NON-NLS-1$
+ if (!connectionUri.isEmpty()) {
String[] connectionNames = new String[connections.length];
for (int i = 0; i < connections.length; ++i) {
connectionNames[i] = connections[i].getName();
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/LaunchUtils.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/LaunchUtils.java
index 1bfa15e64f..22afaa52fa 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/LaunchUtils.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/LaunchUtils.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2012 QNX Software Systems and others.
+ * Copyright (c) 2004, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -134,7 +134,7 @@ public class LaunchUtils {
if (programName != null ) {
IPath exePath = new Path(programName);
IProject project = null;
- if (projectName != null && !projectName.equals("")) { //$NON-NLS-1$
+ if (projectName != null && !projectName.isEmpty()) {
project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
if (project == null || project.getLocation() == null)
{
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/WorkingDirectoryBlock.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/WorkingDirectoryBlock.java
index cd51893b3b..e42277cac1 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/WorkingDirectoryBlock.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/WorkingDirectoryBlock.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -164,7 +164,7 @@ public class WorkingDirectoryBlock extends CLaunchConfigurationTab {
DirectoryDialog dialog = new DirectoryDialog(getShell());
dialog.setMessage(LaunchMessages.WorkingDirectoryBlock_7);
String currentWorkingDir = fWorkingDirText.getText();
- if (!currentWorkingDir.trim().equals("")) { //$NON-NLS-1$
+ if (!currentWorkingDir.trim().isEmpty()) {
File path = new File(currentWorkingDir);
if (path.exists()) {
dialog.setFilterPath(currentWorkingDir);
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CLaunchConfigurationTab.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CLaunchConfigurationTab.java
index 1433322b5a..53b26d9ac3 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CLaunchConfigurationTab.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CLaunchConfigurationTab.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2015 QNX Software Systems and others.
+ * Copyright (c) 2005, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -65,7 +65,7 @@ public abstract class CLaunchConfigurationTab extends AbstractLaunchConfiguratio
}
} catch (CoreException e) {
}
- if (projectName != null && !projectName.equals("")) { //$NON-NLS-1$
+ if (projectName != null && !projectName.isEmpty()) {
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
ICProject cProject = CCorePlugin.getDefault().getCoreModel().create(project);
if (cProject != null && cProject.exists()) {
@@ -106,7 +106,7 @@ public abstract class CLaunchConfigurationTab extends AbstractLaunchConfiguratio
}
}
if (obj != null) {
- if (programName == null || programName.equals("")) { //$NON-NLS-1$
+ if (programName == null || programName.isEmpty()) {
return (ICElement) obj;
}
ICElement ce = (ICElement) obj;
diff --git a/llvm/org.eclipse.cdt.managedbuilder.llvm.ui/src/org/eclipse/cdt/managedbuilder/llvm/util/LlvmToolOptionPathUtil.java b/llvm/org.eclipse.cdt.managedbuilder.llvm.ui/src/org/eclipse/cdt/managedbuilder/llvm/util/LlvmToolOptionPathUtil.java
index 66de451622..362614cc15 100755
--- a/llvm/org.eclipse.cdt.managedbuilder.llvm.ui/src/org/eclipse/cdt/managedbuilder/llvm/util/LlvmToolOptionPathUtil.java
+++ b/llvm/org.eclipse.cdt.managedbuilder.llvm.ui/src/org/eclipse/cdt/managedbuilder/llvm/util/LlvmToolOptionPathUtil.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010-2013 Nokia Siemens Networks Oyj, Finland.
+ * Copyright (c) 2010-2016 Nokia Siemens Networks Oyj, Finland.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -833,7 +833,7 @@ public class LlvmToolOptionPathUtil {
public static String arrayToString(String[] array) {
StringBuffer sB = new StringBuffer();
//if array isn't empty and doesn't contain an empty String
- if (array.length>0 /*&& !array[0].equals("")*/) {
+ if (array.length>0 /*&& !array[0].isEmpty()*/) {
for (String i : array) {
sB.append(i);
sB.append(System.getProperty("path.separator")); //$NON-NLS-1$

Back to the top