diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/StringMatcher.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/StringMatcher.java index 5f9bc943ae1..88de0e6787e 100644 --- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/StringMatcher.java +++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/StringMatcher.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 @@ -132,11 +132,7 @@ public class StringMatcher { /* convert case */ if (fIgnoreCase) { - char[] chars= aPattern.toCharArray(); - for (int i = 0; i < chars.length; i++) { - chars[i]= Character.toUpperCase(chars[i]); - } - fPattern= new String(chars); + fPattern= aPattern.toUpperCase(); } else { fPattern= aPattern; } diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildCommandLineGenerator.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildCommandLineGenerator.java index 0651dad6c80..ace33ea19e7 100644 --- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildCommandLineGenerator.java +++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedBuildCommandLineGenerator.java @@ -31,7 +31,7 @@ public class ManagedBuildCommandLineGenerator implements String commandLinePattern) { ManagedBuildCommandLineInfo info = new ManagedBuildCommandLineInfo(); // Concatenate the tool name and the passed in command name - info.commandName = new String(tool.getName() + commandName); + info.commandName = tool.getName() + commandName; // Put out the flags backwards String myflags = ""; // $NON-NLS-1$ for (int i = flags.length - 1; i >= 0; i--) { @@ -62,9 +62,9 @@ public class ManagedBuildCommandLineGenerator implements } info.commandInputs = myinputs; // Don't change the command line pattern - info.commandLinePattern = new String(commandLinePattern); + info.commandLinePattern = commandLinePattern; // Config artifact name - info.commandOutput = new String(((IToolChain)tool.getParent()).getParent().getArtifactName()); + info.commandOutput = ((IToolChain)tool.getParent()).getParent().getArtifactName(); // -Oh info.commandOutputFlag = "-0h"; // "" diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/Test30_2_CommandLineGenerator.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/Test30_2_CommandLineGenerator.java index b6e7d7b99b0..c766e59f54a 100644 --- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/Test30_2_CommandLineGenerator.java +++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/Test30_2_CommandLineGenerator.java @@ -58,11 +58,11 @@ public class Test30_2_CommandLineGenerator implements String commandLinePattern) { ManagedBuildCommandLineInfo info = new ManagedBuildCommandLineInfo(); // We are only going to change the "flags" to remove the "test30_2.tar-list.filename" option - info.commandName = new String(commandName); - info.commandOutputFlag = new String(outputFlag); - info.commandOutputPrefix = new String(outputPrefix); - info.commandOutput = new String(outputName); - info.commandLinePattern = new String(commandLinePattern); + info.commandName = commandName; + info.commandOutputFlag = outputFlag; + info.commandOutputPrefix = outputPrefix; + info.commandOutput = outputName; + info.commandLinePattern = commandLinePattern; info.commandInputs = ""; // $NON-NLS-1$ for (int i = 0; i < inputResources.length; i++) { if (i > 0) info.commandInputs += " "; 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 8f18eb5870b..4808ca98402 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 @@ -43,8 +43,6 @@ import org.osgi.framework.Version; public class ResourceConfiguration extends ResourceInfo implements IFileInfo { - private static final String EMPTY_STRING = ""; // $NON-NLS-1$ - //property name for holding the rebuild state private static final String REBUILD_STATE = "rebuildState"; //$NON-NLS-1$ @@ -139,7 +137,7 @@ public class ResourceConfiguration extends ResourceInfo implements IFileInfo { setManagedBuildRevision(folderInfo.getParent().getManagedBuildRevision()); setDirty(false); - toolsToInvoke = EMPTY_STRING; + toolsToInvoke = ""; // $NON-NLS-1$ rcbsApplicability = KIND_DISABLE_RCBS_TOOL; @@ -187,7 +185,7 @@ public class ResourceConfiguration extends ResourceInfo implements IFileInfo { // Copy the remaining attributes if (cloneConfig.toolsToInvoke != null) { - toolsToInvoke = new String(cloneConfig.toolsToInvoke); + toolsToInvoke = cloneConfig.toolsToInvoke; } if (cloneConfig.rcbsApplicability != null) { rcbsApplicability = cloneConfig.rcbsApplicability; @@ -554,10 +552,10 @@ public class ResourceConfiguration extends ResourceInfo implements IFileInfo { * An empty string implies treat as if no resource configuration, i.e., use project level tool. * This getter routine returns an ITool[] to consumers (i.e., the makefile generator). */ - String t_ToolsToInvoke = EMPTY_STRING; + String t_ToolsToInvoke = ""; // $NON-NLS-1$ ITool[] resConfigTools; ITool[] tools; - String rcbsToolId = EMPTY_STRING; + String rcbsToolId = ""; // $NON-NLS-1$ int len; int j; int rcbsToolIdx=-1; @@ -573,7 +571,7 @@ public class ResourceConfiguration extends ResourceInfo implements IFileInfo { * If no tools are currently defined, return a zero lengh array of ITool. */ if (resConfigTools.length == 0) { - toolsToInvoke = EMPTY_STRING; + toolsToInvoke = ""; // $NON-NLS-1$ tools = new ITool[0]; return tools; } @@ -588,7 +586,7 @@ public class ResourceConfiguration extends ResourceInfo implements IFileInfo { break; } } - if (!rcbsToolId.equals(EMPTY_STRING)){ + if (!rcbsToolId.equals("")){ // $NON-NLS-1$ /* * Here if an rcbs tool is defined. * Apply the tools according to the current rcbsApplicability setting. @@ -634,7 +632,7 @@ public class ResourceConfiguration extends ResourceInfo implements IFileInfo { */ if(resConfigTools.length == 1){ tools = new ITool[0]; - toolsToInvoke = EMPTY_STRING; + toolsToInvoke = ""; // $NON-NLS-1$ break; } j = 0; diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/TargetPlatform.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/TargetPlatform.java index 59286e58709..717e4ea8f5d 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/TargetPlatform.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/TargetPlatform.java @@ -138,7 +138,7 @@ public class TargetPlatform extends BuildObject implements ITargetPlatform { superClass = targetPlatform.isExtensionTargetPlatform ? targetPlatform : targetPlatform.superClass; if (superClass != null) { // if (targetPlatform.superClassId != null) { - superClassId = superClass.getId();// new String(targetPlatform.superClassId); + superClassId = superClass.getId();// targetPlatform.superClassId; // } } setId(Id); @@ -150,10 +150,10 @@ public class TargetPlatform extends BuildObject implements ITargetPlatform { // Copy the remaining attributes if (targetPlatform.unusedChildren != null) { - unusedChildren = new String(targetPlatform.unusedChildren); + unusedChildren = targetPlatform.unusedChildren; } if (targetPlatform.errorParserIds != null) { - errorParserIds = new String(targetPlatform.errorParserIds); + errorParserIds = targetPlatform.errorParserIds; } if (targetPlatform.isAbstract != null) { isAbstract = targetPlatform.isAbstract; 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 88ce709d0c8..ce332fcef1c 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 @@ -793,7 +793,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { */ @Override public String getMakefileName() { - return new String(MAKEFILE_NAME); + return MAKEFILE_NAME; } /* (non-Javadoc) diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildStepsTab.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildStepsTab.java index 9854ca62137..82148bdfa3f 100644 --- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildStepsTab.java +++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildStepsTab.java @@ -75,10 +75,10 @@ public class BuildStepsTab extends AbstractCBuildPropertyTab { private Set set4 = new TreeSet(); private static final String[] rcbsApplicabilityRules = { - new String(Messages.ResourceCustomBuildStepBlock_label_applicability_rule_override), -// new String(ManagedBuilderMessages_getResourceString("ResourceCustomBuildStepBlock_label_applicability_rule_before")), -// new String(ManagedBuilderMessages_getResourceString("ResourceCustomBuildStepBlock_label_applicability_rule_after")), - new String(Messages.ResourceCustomBuildStepBlock_label_applicability_rule_disable), + Messages.ResourceCustomBuildStepBlock_label_applicability_rule_override, +// ManagedBuilderMessages_getResourceString("ResourceCustomBuildStepBlock_label_applicability_rule_before"), +// ManagedBuilderMessages_getResourceString("ResourceCustomBuildStepBlock_label_applicability_rule_after"), + Messages.ResourceCustomBuildStepBlock_label_applicability_rule_disable, }; diff --git a/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/ExpectedStrings.java b/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/ExpectedStrings.java index 802b93a3ae9..893f679de58 100644 --- a/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/ExpectedStrings.java +++ b/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/ExpectedStrings.java @@ -40,7 +40,7 @@ public class ExpectedStrings { int x; expStrings=new String[values.length]; for (x=0;x