1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-21 21:52:10 +02:00

Bug 491945 - Remove new String()

Occurrences of `new String()` have been replaced with the equivalent `""` and
additional NON-NLS tags have been inserted in where appropriate.

Change-Id: I54cf71dcd0d5a92a675a71166d66949533de502b
Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
This commit is contained in:
Alex Blewitt 2016-04-18 09:07:43 +01:00
parent 135bdd4294
commit 809598db9d
55 changed files with 168 additions and 170 deletions

View file

@ -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 * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -92,8 +92,8 @@ public class MakeScannerInfo implements IScannerInfo {
if (symbol.length() == 0) { if (symbol.length() == 0) {
continue; continue;
} }
String key = new String(); String key = ""; // $NON-NLS-1$
String value = new String(); String value = ""; // $NON-NLS-1$
int index = symbol.indexOf("="); //$NON-NLS-1$ int index = symbol.indexOf("="); //$NON-NLS-1$
if (index != -1) { if (index != -1) {
key = symbol.substring(0, index).trim(); key = symbol.substring(0, index).trim();

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2000, 2013 QNX Software Systems and others. * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -62,7 +62,7 @@ public class NullMakefile extends AbstractMakefile {
@Override @Override
public String toString() { public String toString() {
return new String(); return ""; // $NON-NLS-1$
} }
@Override @Override

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2000, 2013 QNX Software Systems and others. * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -625,7 +625,7 @@ public class GNUMakefile extends AbstractMakefile implements IGNUMakefile {
} }
directories = dirs.toArray(new String[0]); directories = dirs.toArray(new String[0]);
if (pattern == null) { if (pattern == null) {
pattern = new String(); pattern = ""; // $NON-NLS-1$
} }
return new VPath(this, pattern, directories); return new VPath(this, pattern, directories);
} }

View file

@ -108,7 +108,7 @@ public class CCommandDSC {
@Override @Override
public String toString() { public String toString() {
String commandAsString = new String(); String commandAsString = ""; // $NON-NLS-1$
for (Iterator<KVStringPair> i = compilerCommand.iterator(); i.hasNext(); ) { for (Iterator<KVStringPair> i = compilerCommand.iterator(); i.hasNext(); ) {
KVStringPair optionPair = i.next(); KVStringPair optionPair = i.next();
String value = optionPair.getValue(); String value = optionPair.getValue();
@ -128,7 +128,7 @@ public class CCommandDSC {
* @return the command line to run the scanner discovery. * @return the command line to run the scanner discovery.
*/ */
public String getSCDRunnableCommand(boolean quoteIncludePaths, boolean quoteDefines) { public String getSCDRunnableCommand(boolean quoteIncludePaths, boolean quoteDefines) {
String commandAsString = new String(); String commandAsString = ""; // $NON-NLS-1$
for (Iterator<KVStringPair> i = compilerCommand.iterator(); i.hasNext(); ) { for (Iterator<KVStringPair> i = compilerCommand.iterator(); i.hasNext(); ) {
KVStringPair optionPair = i.next(); KVStringPair optionPair = i.next();
if (optionPair.getKey().equals(SCDOptionsEnum.COMMAND.toString())) { if (optionPair.getKey().equals(SCDOptionsEnum.COMMAND.toString())) {
@ -167,7 +167,7 @@ public class CCommandDSC {
* @return the compiler command * @return the compiler command
*/ */
public String getCompilerName() { public String getCompilerName() {
String compiler = new String(); String compiler = ""; // $NON-NLS-1$
for (Iterator<KVStringPair> i = compilerCommand.iterator(); i.hasNext(); ) { for (Iterator<KVStringPair> i = compilerCommand.iterator(); i.hasNext(); ) {
KVStringPair optionPair = i.next(); KVStringPair optionPair = i.next();
if (optionPair.getKey().equals(SCDOptionsEnum.COMMAND.toString())) { if (optionPair.getKey().equals(SCDOptionsEnum.COMMAND.toString())) {

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2004, 2013 Intel Corporation and others. * Copyright (c) 2004, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -1071,7 +1071,7 @@ public class ManagedBuildTestHelper {
rcbsTool = rcConfig.createTool(null,rcbsToolId + "." + ManagedBuildManager.getRandomNumber(),rcbsToolName,false); //$NON-NLS-1$ rcbsTool = rcConfig.createTool(null,rcbsToolId + "." + ManagedBuildManager.getRandomNumber(),rcbsToolName,false); //$NON-NLS-1$
rcbsTool.setCustomBuildStep(true); rcbsTool.setCustomBuildStep(true);
IInputType rcbsToolInputType = rcbsTool.createInputType(null,rcbsToolInputTypeId + "." + ManagedBuildManager.getRandomNumber(),rcbsToolInputTypeName,false); //$NON-NLS-1$ IInputType rcbsToolInputType = rcbsTool.createInputType(null,rcbsToolInputTypeId + "." + ManagedBuildManager.getRandomNumber(),rcbsToolInputTypeName,false); //$NON-NLS-1$
IAdditionalInput rcbsToolInputTypeAdditionalInput = rcbsToolInputType.createAdditionalInput(new String()); IAdditionalInput rcbsToolInputTypeAdditionalInput = rcbsToolInputType.createAdditionalInput(""); // $NON-NLS-1$
rcbsToolInputTypeAdditionalInput.setKind(IAdditionalInput.KIND_ADDITIONAL_INPUT_DEPENDENCY); rcbsToolInputTypeAdditionalInput.setKind(IAdditionalInput.KIND_ADDITIONAL_INPUT_DEPENDENCY);
rcbsTool.createOutputType(null,rcbsToolOutputTypeId + "." + ManagedBuildManager.getRandomNumber(),rcbsToolOutputTypeName,false); //$NON-NLS-1$ rcbsTool.createOutputType(null,rcbsToolOutputTypeId + "." + ManagedBuildManager.getRandomNumber(),rcbsToolOutputTypeName,false); //$NON-NLS-1$
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2004, 2011 Intel Corporation and others. * Copyright (c) 2004, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -33,7 +33,7 @@ public class ManagedBuildCommandLineGenerator implements
// Concatenate the tool name and the passed in command name // Concatenate the tool name and the passed in command name
info.commandName = new String(tool.getName() + commandName); info.commandName = new String(tool.getName() + commandName);
// Put out the flags backwards // Put out the flags backwards
String myflags = new String(); String myflags = ""; // $NON-NLS-1$
for (int i = flags.length - 1; i >= 0; i--) { for (int i = flags.length - 1; i >= 0; i--) {
if (i < flags.length - 1) myflags += " "; if (i < flags.length - 1) myflags += " ";
myflags += flags[i]; myflags += flags[i];
@ -41,7 +41,7 @@ public class ManagedBuildCommandLineGenerator implements
info.commandFlags = myflags; info.commandFlags = myflags;
// Alphabetize the inputs and add foo.cpp // Alphabetize the inputs and add foo.cpp
String[] inputs = new String[inputResources.length + 1]; String[] inputs = new String[inputResources.length + 1];
String myinputs = new String(); String myinputs = ""; // $NON-NLS-1$
for (int i=0; i<inputResources.length; i++) { for (int i=0; i<inputResources.length; i++) {
inputs[i] = inputResources[i]; inputs[i] = inputResources[i];
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2004, 2011 Intel Corporation and others. * Copyright (c) 2004, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -165,7 +165,7 @@ public class ManagedProjectUpdateTests extends TestCase {
IStatus.OK, IStatus.OK,
"org.eclipse.cdt.managedbuilder.core.tests", "org.eclipse.cdt.managedbuilder.core.tests",
IStatus.OK, IStatus.OK,
new String(), "", // $NON-NLS-1$
null); null);
} }
}; };

View file

@ -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 * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -167,7 +167,7 @@ public class ResourceBuildCoreTests extends TestCase {
// Get the project build properties. // Get the project build properties.
ITool tools[] = defaultConfig.getFilteredTools(); ITool tools[] = defaultConfig.getFilteredTools();
Tool projTool = null; Tool projTool = null;
String projBuildProps = new String(); String projBuildProps = ""; // $NON-NLS-1$
for (int i = 0; i < tools.length; i++) { for (int i = 0; i < tools.length; i++) {
if( tools[i].buildsFileType(extString) ) { if( tools[i].buildsFileType(extString) ) {
// Get the build properties of a project in default configuration // Get the build properties of a project in default configuration

View file

@ -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 * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -63,12 +63,12 @@ public class Test30_2_CommandLineGenerator implements
info.commandOutputPrefix = new String(outputPrefix); info.commandOutputPrefix = new String(outputPrefix);
info.commandOutput = new String(outputName); info.commandOutput = new String(outputName);
info.commandLinePattern = new String(commandLinePattern); info.commandLinePattern = new String(commandLinePattern);
info.commandInputs = new String(); info.commandInputs = ""; // $NON-NLS-1$
for (int i = 0; i < inputResources.length; i++) { for (int i = 0; i < inputResources.length; i++) {
if (i > 0) info.commandInputs += " "; if (i > 0) info.commandInputs += " ";
info.commandInputs += inputResources[i]; info.commandInputs += inputResources[i];
} }
info.commandFlags = new String(); info.commandFlags = ""; // $NON-NLS-1$
IOption opt = tool.getOptionBySuperClassId("test30_2.tar-list.filename"); IOption opt = tool.getOptionBySuperClassId("test30_2.tar-list.filename");
String optVal = ""; String optVal = "";
try { try {

View file

@ -1914,7 +1914,7 @@ public class ManagedBuildManager extends AbstractCExtension {
// throw new CoreException(new Status(IStatus.ERROR, // throw new CoreException(new Status(IStatus.ERROR,
// ManagedBuilderCorePlugin.PLUGIN_ID, // ManagedBuilderCorePlugin.PLUGIN_ID,
// IStatus.ERROR, // IStatus.ERROR,
// new String(), // "", // $NON-NLS-1$
// null)); // null));
// } // }
// //

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2003, 2012 IBM Corporation and others. * Copyright (c) 2003, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -131,7 +131,7 @@ public class ManagedBuilderCorePlugin extends Plugin {
// IStatus.OK, // IStatus.OK,
// ManagedBuilderCorePlugin.getUniqueIdentifier(), // ManagedBuilderCorePlugin.getUniqueIdentifier(),
// IStatus.OK, // IStatus.OK,
// new String(), // "", // $NON-NLS-1$
// null); // null);
// } // }
// }; // };

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2006, 2015 Intel Corporation and others. * Copyright (c) 2006, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -2242,7 +2242,7 @@ public class BuildDescription implements IBuildDescription {
if(!type.isInput()){ if(!type.isInput()){
String var = type.getLinkId(); String var = type.getLinkId();
if(var == null) if(var == null)
var = new String(); var = ""; // $NON-NLS-1$
Set<BuildIOType> set = fVarToAddlInSetMap.get(var); Set<BuildIOType> set = fVarToAddlInSetMap.get(var);
if(set != null){ if(set != null){

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2006, 2012 Intel Corporation and others. * Copyright (c) 2006, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -521,7 +521,7 @@ public class BuildStep implements IBuildStep {
private String listToString(String[] list, String delimiter){ private String listToString(String[] list, String delimiter){
if(list == null || list.length == 0) if(list == null || list.length == 0)
return new String(); return ""; // $NON-NLS-1$
StringBuffer buf = new StringBuffer(list[0]); StringBuffer buf = new StringBuffer(list[0]);

View file

@ -51,8 +51,6 @@ import org.eclipse.core.runtime.Path;
public class AdditionalInput implements IAdditionalInput { public class AdditionalInput implements IAdditionalInput {
private static final String EMPTY_STRING = new String();
private static final String BUILD_VARIABLE_STATIC_LIB = "ARCHIVES"; //$NON-NLS-1$ private static final String BUILD_VARIABLE_STATIC_LIB = "ARCHIVES"; //$NON-NLS-1$
private static final String BUILD_VARIABLE_SHARED_LIB = "LIBRARIES"; //$NON-NLS-1$ private static final String BUILD_VARIABLE_SHARED_LIB = "LIBRARIES"; //$NON-NLS-1$
@ -220,7 +218,7 @@ public class AdditionalInput implements IAdditionalInput {
str = ADDITIONAL_INPUT_DEPENDENCY; str = ADDITIONAL_INPUT_DEPENDENCY;
break; break;
default: default:
str = EMPTY_STRING; str = ""; // $NON-NLS-1$
break; break;
} }
element.setAttribute(IAdditionalInput.KIND, str); element.setAttribute(IAdditionalInput.KIND, str);

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007, 2012 Intel Corporation and others. * Copyright (c) 2007, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -621,7 +621,7 @@ public class CommonBuilder extends ACBuilder {
status = new MultiStatus( status = new MultiStatus(
ManagedBuilderCorePlugin.getUniqueIdentifier(), ManagedBuilderCorePlugin.getUniqueIdentifier(),
IStatus.ERROR, IStatus.ERROR,
new String(), "", // $NON-NLS-1$
null); null);
} }
@ -638,7 +638,7 @@ public class CommonBuilder extends ACBuilder {
status = new MultiStatus( status = new MultiStatus(
ManagedBuilderCorePlugin.getUniqueIdentifier(), ManagedBuilderCorePlugin.getUniqueIdentifier(),
IStatus.ERROR, IStatus.ERROR,
new String(), "", // $NON-NLS-1$
null); null);
} }
@ -657,7 +657,7 @@ public class CommonBuilder extends ACBuilder {
status = new MultiStatus( status = new MultiStatus(
ManagedBuilderCorePlugin.getUniqueIdentifier(), ManagedBuilderCorePlugin.getUniqueIdentifier(),
IStatus.OK, IStatus.OK,
new String(), "", // $NON-NLS-1$
null); null);
} }
@ -814,7 +814,7 @@ public class CommonBuilder extends ACBuilder {
if (buildType == FULL_BUILD || buildType == INCREMENTAL_BUILD) { if (buildType == FULL_BUILD || buildType == INCREMENTAL_BUILD) {
consoleHeader[0] = ManagedMakeMessages.getResourceString("ManagedMakeBuider.type.incremental"); //$NON-NLS-1$ consoleHeader[0] = ManagedMakeMessages.getResourceString("ManagedMakeBuider.type.incremental"); //$NON-NLS-1$
} else { } else {
consoleHeader[0] = new String(); consoleHeader[0] = ""; // $NON-NLS-1$
outputError(projName, "The given build type is not supported in this context"); //$NON-NLS-1$ outputError(projName, "The given build type is not supported in this context"); //$NON-NLS-1$
} }
consoleHeader[1] = configName; consoleHeader[1] = configName;
@ -1015,7 +1015,7 @@ public class CommonBuilder extends ACBuilder {
// return new MultiStatus( // return new MultiStatus(
// ManagedBuilderCorePlugin.getUniqueIdentifier(), // ManagedBuilderCorePlugin.getUniqueIdentifier(),
// severity, // severity,
// new String(), // "", // $NON-NLS-1$
// null); // null);
// } // }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007, 2014 Intel Corporation and others. * Copyright (c) 2007, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -86,7 +86,7 @@ public class FolderInfo extends ResourceInfo implements IFolderInfo {
toolChain.setUnusedChildren(parTc.getUnusedChildren()); toolChain.setUnusedChildren(parTc.getUnusedChildren());
ITool tools[] = parTc.getTools(); ITool tools[] = parTc.getTools();
String subId = new String(); String subId = ""; // $NON-NLS-1$
for (ITool tool : tools) { for (ITool tool : tools) {
ITool extTool = ManagedBuildManager.getExtensionTool(tool); ITool extTool = ManagedBuildManager.getExtensionTool(tool);
if(extTool == null) if(extTool == null)

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2002, 2015 IBM Corporation and others. * Copyright (c) 2002, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -369,7 +369,7 @@ public class GeneratedMakefileBuilder extends ACBuilder {
if (buildType == FULL_BUILD || buildType == INCREMENTAL_BUILD) { if (buildType == FULL_BUILD || buildType == INCREMENTAL_BUILD) {
consoleHeader[0] = ManagedMakeMessages.getResourceString(TYPE_INC); consoleHeader[0] = ManagedMakeMessages.getResourceString(TYPE_INC);
} else { } else {
consoleHeader[0] = new String(); consoleHeader[0] = ""; // $NON-NLS-1$
outputError(getProject().getName(), "The given build type is not supported in this context"); //$NON-NLS-1$ outputError(getProject().getName(), "The given build type is not supported in this context"); //$NON-NLS-1$
} }
consoleHeader[1] = configName; consoleHeader[1] = configName;

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2002, 2011 IBM Software Corporation and others. * Copyright (c) 2002, 2016 IBM Software Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -157,7 +157,7 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
*/ */
@Override @Override
public String getBuildArtifactExtension() { public String getBuildArtifactExtension() {
String ext = new String(); String ext = ""; // $NON-NLS-1$
IConfiguration config = getDefaultConfiguration(); IConfiguration config = getDefaultConfiguration();
if (config != null) { if (config != null) {
ext = config.getArtifactExtension(); ext = config.getArtifactExtension();
@ -171,7 +171,7 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
@Override @Override
public String getBuildArtifactName() { public String getBuildArtifactName() {
// Get the default configuration and use its value // Get the default configuration and use its value
String name = new String(); String name = ""; // $NON-NLS-1$
IConfiguration config = getDefaultConfiguration(); IConfiguration config = getDefaultConfiguration();
if (config != null) { if (config != null) {
name = config.getArtifactName(); name = config.getArtifactName();
@ -185,7 +185,7 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
@Override @Override
public String getCleanCommand() { public String getCleanCommand() {
// Get from the model // Get from the model
String command = new String(); String command = ""; // $NON-NLS-1$
IConfiguration config = getDefaultConfiguration(); IConfiguration config = getDefaultConfiguration();
if (config != null) { if (config != null) {
command = config.getCleanCommand(); command = config.getCleanCommand();
@ -200,7 +200,7 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
public String getConfigurationName() { public String getConfigurationName() {
// Return the human-readable name of the default configuration // Return the human-readable name of the default configuration
IConfiguration config = getDefaultConfiguration(); IConfiguration config = getDefaultConfiguration();
return config == null ? new String() : config.getName(); return config == null ? "" : config.getName(); // $NON-NLS-1$
} }
/* (non-Javadoc) /* (non-Javadoc)
@ -361,7 +361,7 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
@Override @Override
public String getToolFlagsForConfiguration(String extension, IPath inputLocation, IPath outputLocation){ public String getToolFlagsForConfiguration(String extension, IPath inputLocation, IPath outputLocation){
// Treat null extensions as an empty string // Treat null extensions as an empty string
String ext = extension == null ? new String() : extension; String ext = extension == null ? "" : extension; // $NON-NLS-1$
// Get all the tools for the current config // Get all the tools for the current config
ITool[] tools = getFilteredTools(); ITool[] tools = getFilteredTools();
@ -480,7 +480,7 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
@Override @Override
public String getPrebuildStep() { public String getPrebuildStep() {
// Get the default configuration and use its value // Get the default configuration and use its value
String name = new String(); String name = ""; // $NON-NLS-1$
IConfiguration config = getDefaultConfiguration(); IConfiguration config = getDefaultConfiguration();
if (config != null) { if (config != null) {
name = config.getPrebuildStep(); name = config.getPrebuildStep();
@ -496,7 +496,7 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
@Override @Override
public String getPostbuildStep() { public String getPostbuildStep() {
// Get the default configuration and use its value // Get the default configuration and use its value
String name = new String(); String name = ""; // $NON-NLS-1$
IConfiguration config = getDefaultConfiguration(); IConfiguration config = getDefaultConfiguration();
if (config != null) { if (config != null) {
name = config.getPostbuildStep(); name = config.getPostbuildStep();
@ -512,7 +512,7 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
@Override @Override
public String getPreannouncebuildStep() { public String getPreannouncebuildStep() {
// Get the default configuration and use its value // Get the default configuration and use its value
String name = new String(); String name = ""; // $NON-NLS-1$
IConfiguration config = getDefaultConfiguration(); IConfiguration config = getDefaultConfiguration();
if (config != null) { if (config != null) {
name = config.getPreannouncebuildStep(); name = config.getPreannouncebuildStep();
@ -528,7 +528,7 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
@Override @Override
public String getPostannouncebuildStep() { public String getPostannouncebuildStep() {
// Get the default configuration and use its value // Get the default configuration and use its value
String name = new String(); String name = ""; // $NON-NLS-1$
IConfiguration config = getDefaultConfiguration(); IConfiguration config = getDefaultConfiguration();
if (config != null) { if (config != null) {
name = config.getPostannouncebuildStep(); name = config.getPostannouncebuildStep();
@ -593,7 +593,7 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
@Override @Override
public String getToolForConfiguration(String extension) { public String getToolForConfiguration(String extension) {
// Treat a null argument as an empty string // Treat a null argument as an empty string
String ext = extension == null ? new String() : extension; String ext = extension == null ? "" : extension; // $NON-NLS-1$
// Get all the tools for the current config // Get all the tools for the current config
ITool[] tools = getFilteredTools(); ITool[] tools = getFilteredTools();
for (int index = 0; index < tools.length; index++) { for (int index = 0; index < tools.length; index++) {
@ -1291,7 +1291,7 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
String[] tokens = val.split("="); //$NON-NLS-1$ String[] tokens = val.split("="); //$NON-NLS-1$
String key = tokens[0].trim(); String key = tokens[0].trim();
String value = (tokens.length > 1) ? tokens[1].trim() : new String(); String value = (tokens.length > 1) ? tokens[1].trim() : ""; // $NON-NLS-1$
// Make sure the current entries do not contain a duplicate // Make sure the current entries do not contain a duplicate
boolean add = true; boolean add = true;
Iterator<IPathEntry> entryIter = entries.listIterator(); Iterator<IPathEntry> entryIter = entries.listIterator();

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2004, 2011 Intel Corporation and others. * Copyright (c) 2004, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -114,7 +114,7 @@ public class ManagedCommandLineGenerator implements
} }
private String stringArrayToString( String[] array ) { private String stringArrayToString( String[] array ) {
if( array == null || array.length <= 0 ) return new String(); if( array == null || array.length <= 0 ) return ""; // $NON-NLS-1$
StringBuffer sb = new StringBuffer(); StringBuffer sb = new StringBuffer();
for( int i = 0; i < array.length; i++ ) for( int i = 0; i < array.length; i++ )
sb.append( array[i] + WHITESPACE ); sb.append( array[i] + WHITESPACE );

View file

@ -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 * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -42,7 +42,7 @@ import org.osgi.framework.Version;
*/ */
public class OptionCategory extends BuildObject implements IOptionCategory { public class OptionCategory extends BuildObject implements IOptionCategory {
private static final String EMPTY_STRING = new String(); private static final String EMPTY_STRING = ""; // $NON-NLS-1$
private static final IOptionCategory[] emtpyCategories = new IOptionCategory[0]; private static final IOptionCategory[] emtpyCategories = new IOptionCategory[0];
// Parent and children // Parent and children

View file

@ -382,7 +382,7 @@ public class OptionReference implements IOption {
return name; return name;
} catch (BuildException e) {} } catch (BuildException e) {}
} }
return new String(); return ""; // $NON-NLS-1$
} }
@Override @Override
@ -396,7 +396,7 @@ public class OptionReference implements IOption {
return name; return name;
} catch (BuildException e) {} } catch (BuildException e) {}
} }
return new String(); return ""; // $NON-NLS-1$
} }
@Override @Override
@ -410,7 +410,7 @@ public class OptionReference implements IOption {
return id; return id;
} catch (BuildException e) {} } catch (BuildException e) {}
} }
return new String(); return ""; // $NON-NLS-1$
} }
@Override @Override
@ -424,7 +424,7 @@ public class OptionReference implements IOption {
return id; return id;
} catch (BuildException e) {} } catch (BuildException e) {}
} }
return new String(); return ""; // $NON-NLS-1$
} }
@Override @Override

View file

@ -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 * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -387,7 +387,7 @@ public class ResourceChangeHandler implements IResourceChangeListener, ISavePart
IStatus.OK, IStatus.OK,
ManagedBuilderCorePlugin.getUniqueIdentifier(), ManagedBuilderCorePlugin.getUniqueIdentifier(),
IStatus.OK, IStatus.OK,
new String(), "", // $NON-NLS-1$
null); null);
} }
}; };

View file

@ -43,7 +43,7 @@ import org.osgi.framework.Version;
public class ResourceConfiguration extends ResourceInfo implements IFileInfo { public class ResourceConfiguration extends ResourceInfo implements IFileInfo {
private static final String EMPTY_STRING = new String(); private static final String EMPTY_STRING = ""; // $NON-NLS-1$
//property name for holding the rebuild state //property name for holding the rebuild state
private static final String REBUILD_STATE = "rebuildState"; //$NON-NLS-1$ private static final String REBUILD_STATE = "rebuildState"; //$NON-NLS-1$
@ -151,7 +151,7 @@ public class ResourceConfiguration extends ResourceInfo implements IFileInfo {
} }
// Add the resource specific tools to this resource. // Add the resource specific tools to this resource.
ITool tools[] = folderInfo.getFilteredTools(); ITool tools[] = folderInfo.getFilteredTools();
String subId = new String(); String subId = ""; // $NON-NLS-1$
for (int i = 0; i < tools.length; i++) { for (int i = 0; i < tools.length; i++) {
if( tools[i].buildsFileType(extString) ) { if( tools[i].buildsFileType(extString) ) {
baseTool = tools[i]; baseTool = tools[i];

View file

@ -40,7 +40,7 @@ import org.w3c.dom.Element;
import org.w3c.dom.Node; import org.w3c.dom.Node;
public class Target extends BuildObject implements ITarget { public class Target extends BuildObject implements ITarget {
private static final String EMPTY_STRING = new String(); private static final String EMPTY_STRING = ""; // $NON-NLS-1$
private String artifactName; private String artifactName;
private String binaryParserId; private String binaryParserId;
private String cleanCommand; private String cleanCommand;

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2003, 2012 IBM Corporation and others. * Copyright (c) 2003, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -179,7 +179,7 @@ public class ToolReference implements IToolReference {
outputFlag = tool.getOutputFlag(); outputFlag = tool.getOutputFlag();
outputPrefix = tool.getOutputPrefix(); outputPrefix = tool.getOutputPrefix();
String[] extensions = tool.getOutputsAttribute(); String[] extensions = tool.getOutputsAttribute();
outputExtensions = new String(); outputExtensions = ""; // $NON-NLS-1$
if (extensions != null) { if (extensions != null) {
for (int index = 0; index < extensions.length; ++index) { for (int index = 0; index < extensions.length; ++index) {
if (extensions[index] == null) continue; if (extensions[index] == null) continue;
@ -346,7 +346,7 @@ public class ToolReference implements IToolReference {
public String getId() { public String getId() {
if (parent == null) { if (parent == null) {
// bad reference // bad reference
return new String(); return ""; // $NON-NLS-1$
} }
return parent.getId(); return parent.getId();
} }
@ -358,7 +358,7 @@ public class ToolReference implements IToolReference {
public String getBaseId() { public String getBaseId() {
if (parent == null) { if (parent == null) {
// bad reference // bad reference
return new String(); return ""; // $NON-NLS-1$
} }
return parent.getBaseId(); return parent.getBaseId();
} }
@ -383,7 +383,7 @@ public class ToolReference implements IToolReference {
public String getName() { public String getName() {
if (parent == null) { if (parent == null) {
// bad reference // bad reference
return new String(); return ""; // $NON-NLS-1$
} }
return parent.getName(); return parent.getName();
} }
@ -467,7 +467,7 @@ public class ToolReference implements IToolReference {
if (parent != null) { if (parent != null) {
return parent.getToolCommand(); return parent.getToolCommand();
} }
return new String(); // bad reference return ""; // bad reference // $NON-NLS-1$
} }
return command; return command;
} }
@ -672,7 +672,7 @@ public class ToolReference implements IToolReference {
public String getOutputExtension(String inputExtension) { public String getOutputExtension(String inputExtension) {
if (parent == null) { if (parent == null) {
// bad reference // bad reference
return new String(); return ""; // $NON-NLS-1$
} }
return parent.getOutputExtension(inputExtension); return parent.getOutputExtension(inputExtension);
} }
@ -687,7 +687,7 @@ public class ToolReference implements IToolReference {
return parent.getOutputFlag(); return parent.getOutputFlag();
} else { } else {
// We never should be here // We never should be here
return new String(); return ""; // $NON-NLS-1$
} }
} }
return outputFlag; return outputFlag;
@ -702,7 +702,7 @@ public class ToolReference implements IToolReference {
if (parent != null) { if (parent != null) {
return parent.getOutputPrefix(); return parent.getOutputPrefix();
} }
return new String(); // bad reference return ""; // bad reference // $NON-NLS-1$
} }
return outputPrefix; return outputPrefix;
} }
@ -864,7 +864,7 @@ public class ToolReference implements IToolReference {
*/ */
@Override @Override
public String getCommandLinePattern() { public String getCommandLinePattern() {
if( parent == null ) return new String(); if( parent == null ) return ""; // $NON-NLS-1$
return parent.getCommandLinePattern(); return parent.getCommandLinePattern();
} }
@ -917,7 +917,7 @@ public class ToolReference implements IToolReference {
*/ */
@Override @Override
public String toString() { public String toString() {
String answer = new String(); String answer = ""; // $NON-NLS-1$
if (parent != null) { if (parent != null) {
answer += "Reference to " + parent.getName(); //$NON-NLS-1$ answer += "Reference to " + parent.getName(); //$NON-NLS-1$
} }
@ -1281,7 +1281,7 @@ public class ToolReference implements IToolReference {
if (parent != null) { if (parent != null) {
return parent.getConvertToId(); return parent.getConvertToId();
} else { } else {
return new String(); return ""; // $NON-NLS-1$
} }
} }
return convertToId; return convertToId;
@ -1310,7 +1310,7 @@ public class ToolReference implements IToolReference {
if (parent != null) { if (parent != null) {
return parent.getVersionsSupported(); return parent.getVersionsSupported();
} else { } else {
return new String(); return ""; // $NON-NLS-1$
} }
} }
return versionsSupported; return versionsSupported;

View file

@ -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 * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -39,11 +39,11 @@ public class CheckStringExpression implements IBooleanExpression {
public CheckStringExpression(IManagedConfigElement element){ public CheckStringExpression(IManagedConfigElement element){
fString = element.getAttribute(STRING); fString = element.getAttribute(STRING);
if(fString == null) if(fString == null)
fString = new String(); fString = ""; // $NON-NLS-1$
fValue = element.getAttribute(VALUE); fValue = element.getAttribute(VALUE);
if(fValue == null) if(fValue == null)
fValue = new String(); fValue = ""; // $NON-NLS-1$
fIsRegex = OptionEnablementExpression.getBooleanValue(element.getAttribute(IS_REGEX)); fIsRegex = OptionEnablementExpression.getBooleanValue(element.getAttribute(IS_REGEX));
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2004, 2011 IBM Corporation and others. * Copyright (c) 2004, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -60,7 +60,7 @@ public class DefaultGnuWinScannerInfoCollector extends DefaultGCCScannerInfoColl
// // See if it has an equals // // See if it has an equals
// String[] macroTokens = ((String)symbolIter.next()).split(EQUALS); // String[] macroTokens = ((String)symbolIter.next()).split(EQUALS);
// String macro = macroTokens[0].trim(); // String macro = macroTokens[0].trim();
// String value = (macroTokens.length > 1) ? macroTokens[1].trim() : new String(); // String value = (macroTokens.length > 1) ? macroTokens[1].trim() : ""; // $NON-NLS-1$
// getDefinedSymbols().put(macro, value); // getDefinedSymbols().put(macro, value);
// } // }
super.contributeToScannerConfig(resource, scannerInfo); super.contributeToScannerConfig(resource, scannerInfo);

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2004, 2011 IBM Corporation and others. * Copyright (c) 2004, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -35,7 +35,7 @@ import org.eclipse.core.resources.IResource;
*/ */
public class DefaultGCCDependencyCalculator implements IManagedDependencyGenerator { public class DefaultGCCDependencyCalculator implements IManagedDependencyGenerator {
private static final String EMPTY_STRING = new String(); private static final String EMPTY_STRING = ""; // $NON-NLS-1$
private static final String[] EMPTY_STRING_ARRAY = new String[0]; private static final String[] EMPTY_STRING_ARRAY = new String[0];
public final String WHITESPACE = " "; //$NON-NLS-1$ public final String WHITESPACE = " "; //$NON-NLS-1$
@ -80,7 +80,7 @@ public class DefaultGCCDependencyCalculator implements IManagedDependencyGenerat
// Work out the build-relative path for the output files // Work out the build-relative path for the output files
IContainer resourceLocation = resource.getParent(); IContainer resourceLocation = resource.getParent();
String relativePath = new String(); String relativePath = ""; // $NON-NLS-1$
if (resourceLocation != null) { if (resourceLocation != null) {
relativePath += resourceLocation.getProjectRelativePath().toString(); relativePath += resourceLocation.getProjectRelativePath().toString();
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2006, 2011 Intel Corporation and others. * Copyright (c) 2006, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -50,7 +50,7 @@ import org.eclipse.core.runtime.IPath;
public class DefaultGCCDependencyCalculator3Commands implements public class DefaultGCCDependencyCalculator3Commands implements
IManagedDependencyCommands { IManagedDependencyCommands {
private static final String EMPTY_STRING = new String(); private static final String EMPTY_STRING = ""; // $NON-NLS-1$
// Member variables set by the constructor // Member variables set by the constructor
IPath source; IPath source;

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2003, 2013 IBM Corporation and others. * Copyright (c) 2003, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -439,7 +439,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
if (buildTargetExt == null) { if (buildTargetExt == null) {
buildTargetExt = new String(); buildTargetExt = ""; // $NON-NLS-1$
} }
// Cache the build tools // Cache the build tools
config = info.getDefaultConfiguration(); config = info.getDefaultConfiguration();
@ -651,7 +651,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
status = new MultiStatus( status = new MultiStatus(
ManagedBuilderCorePlugin.getUniqueIdentifier(), ManagedBuilderCorePlugin.getUniqueIdentifier(),
IStatus.INFO, IStatus.INFO,
new String(), "", // $NON-NLS-1$
null); null);
status.add(new Status ( status.add(new Status (
IStatus.INFO, IStatus.INFO,
@ -753,7 +753,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
status = new MultiStatus ( status = new MultiStatus (
ManagedBuilderCorePlugin.getUniqueIdentifier(), ManagedBuilderCorePlugin.getUniqueIdentifier(),
IStatus.WARNING, IStatus.WARNING,
new String(), "", // $NON-NLS-1$
null); null);
// Add a new status for each of the bad folders // Add a new status for each of the bad folders
// TODO: fix error message // TODO: fix error message
@ -770,7 +770,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
status = new MultiStatus( status = new MultiStatus(
ManagedBuilderCorePlugin.getUniqueIdentifier(), ManagedBuilderCorePlugin.getUniqueIdentifier(),
IStatus.OK, IStatus.OK,
new String(), "", // $NON-NLS-1$
null); null);
} }
@ -906,7 +906,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
status = new MultiStatus( status = new MultiStatus(
ManagedBuilderCorePlugin.getUniqueIdentifier(), ManagedBuilderCorePlugin.getUniqueIdentifier(),
IStatus.INFO, IStatus.INFO,
new String(), "", // $NON-NLS-1$
null); null);
status.add(new Status ( status.add(new Status (
IStatus.INFO, IStatus.INFO,
@ -965,7 +965,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
status = new MultiStatus ( status = new MultiStatus (
ManagedBuilderCorePlugin.getUniqueIdentifier(), ManagedBuilderCorePlugin.getUniqueIdentifier(),
IStatus.WARNING, IStatus.WARNING,
new String(), "", // $NON-NLS-1$
null); null);
// Add a new status for each of the bad folders // Add a new status for each of the bad folders
// TODO: fix error message // TODO: fix error message
@ -981,7 +981,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
status = new MultiStatus( status = new MultiStatus(
ManagedBuilderCorePlugin.getUniqueIdentifier(), ManagedBuilderCorePlugin.getUniqueIdentifier(),
IStatus.OK, IStatus.OK,
new String(), "", // $NON-NLS-1$
null); null);
} }
return status; return status;
@ -2822,7 +2822,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
} }
if (addlDeps != null && addlDeps.length > 0) { if (addlDeps != null && addlDeps.length > 0) {
calculatedDependencies = new String(); calculatedDependencies = ""; // $NON-NLS-1$
for (IPath addlDep : addlDeps) { for (IPath addlDep : addlDeps) {
calculatedDependencies += WHITESPACE + escapeWhitespaces(addlDep.toString()); calculatedDependencies += WHITESPACE + escapeWhitespaces(addlDep.toString());
} }
@ -3651,7 +3651,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
try { try {
secondToken = deps.get(1); secondToken = deps.get(1);
} catch (ArrayIndexOutOfBoundsException e) { } catch (ArrayIndexOutOfBoundsException e) {
secondToken = new String(); secondToken = ""; // $NON-NLS-1$
} }
if (secondToken.startsWith("'")) { //$NON-NLS-1$ if (secondToken.startsWith("'")) { //$NON-NLS-1$
// This is the Win32 implementation of echo (MinGW without MSYS) // This is the Win32 implementation of echo (MinGW without MSYS)
@ -3665,7 +3665,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
try { try {
thirdToken = deps.get(2); thirdToken = deps.get(2);
} catch (ArrayIndexOutOfBoundsException e) { } catch (ArrayIndexOutOfBoundsException e) {
thirdToken = new String(); thirdToken = ""; // $NON-NLS-1$
} }
int lastIndex = thirdToken.lastIndexOf("'"); //$NON-NLS-1$ int lastIndex = thirdToken.lastIndexOf("'"); //$NON-NLS-1$
if (lastIndex != -1) { if (lastIndex != -1) {
@ -3689,7 +3689,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
} while (fourthToken.length() == 0); } while (fourthToken.length() == 0);
} catch (ArrayIndexOutOfBoundsException e) { } catch (ArrayIndexOutOfBoundsException e) {
fourthToken = new String(); fourthToken = ""; // $NON-NLS-1$
} }
outBuffer.append(fourthToken + WHITESPACE); outBuffer.append(fourthToken + WHITESPACE);
@ -4514,7 +4514,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
* the name component in a <code>String</code> * the name component in a <code>String</code>
*/ */
private String getFileName(IResource file) { private String getFileName(IResource file) {
String answer = new String(); String answer = ""; // $NON-NLS-1$
String lastSegment = file.getName(); String lastSegment = file.getName();
int extensionSeparator = lastSegment.lastIndexOf(DOT); int extensionSeparator = lastSegment.lastIndexOf(DOT);
if (extensionSeparator != -1) { if (extensionSeparator != -1) {
@ -4676,7 +4676,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
if (buildTargetExt == null) { if (buildTargetExt == null) {
buildTargetExt = new String(); buildTargetExt = ""; // $NON-NLS-1$
} }
// Cache the build tools // Cache the build tools
config = cfg; config = cfg;

View file

@ -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 * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -92,8 +92,8 @@ public class MakeScannerInfo implements IScannerInfo {
if (symbol.length() == 0) { if (symbol.length() == 0) {
continue; continue;
} }
String key = new String(); String key = ""; // $NON-NLS-1$
String value = new String(); String value = ""; // $NON-NLS-1$
int index = symbol.indexOf("="); //$NON-NLS-1$ int index = symbol.indexOf("="); //$NON-NLS-1$
if (index != -1) { if (index != -1) {
key = symbol.substring(0, index).trim(); key = symbol.substring(0, index).trim();

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2002, 2010 IBM Corporation and others. * Copyright (c) 2002, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -132,7 +132,7 @@ public class BuildOptionComboFieldEditor extends FieldEditor {
public void widgetSelected(SelectionEvent evt) { public void widgetSelected(SelectionEvent evt) {
String oldValue = selected; String oldValue = selected;
int index = optionSelector.getSelectionIndex(); int index = optionSelector.getSelectionIndex();
selected = index == -1 ? new String() : optionSelector.getItem(index); selected = index == -1 ? "" : optionSelector.getItem(index); // $NON-NLS-1$
setPresentsDefaultValue(false); setPresentsDefaultValue(false);
fireValueChanged(VALUE, oldValue, selected); fireValueChanged(VALUE, oldValue, selected);
} }
@ -171,7 +171,7 @@ public class BuildOptionComboFieldEditor extends FieldEditor {
protected void doStore() { protected void doStore() {
// Save the selected item in the store // Save the selected item in the store
int index = optionSelector.getSelectionIndex(); int index = optionSelector.getSelectionIndex();
selected = index == -1 ? new String() : optionSelector.getItem(index); selected = index == -1 ? "" : optionSelector.getItem(index); // $NON-NLS-1$
getPreferenceStore().setValue(getPreferenceName(), selected); getPreferenceStore().setValue(getPreferenceName(), selected);
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007, 2011 Intel Corporation and others. * Copyright (c) 2007, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -273,7 +273,7 @@ public class BuildStepsTab extends AbstractCBuildPropertyTab {
rcbsTool = rcConfig.createTool(null,rcbsToolId + "." + ManagedBuildManager.getRandomNumber(),rcbsToolName,false); //$NON-NLS-1$ rcbsTool = rcConfig.createTool(null,rcbsToolId + "." + ManagedBuildManager.getRandomNumber(),rcbsToolName,false); //$NON-NLS-1$
rcbsTool.setCustomBuildStep(true); rcbsTool.setCustomBuildStep(true);
IInputType rcbsToolInputType = rcbsTool.createInputType(null,rcbsToolInputTypeId + "." + ManagedBuildManager.getRandomNumber(),rcbsToolInputTypeName,false); //$NON-NLS-1$ IInputType rcbsToolInputType = rcbsTool.createInputType(null,rcbsToolInputTypeId + "." + ManagedBuildManager.getRandomNumber(),rcbsToolInputTypeName,false); //$NON-NLS-1$
IAdditionalInput rcbsToolInputTypeAdditionalInput = rcbsToolInputType.createAdditionalInput(new String()); IAdditionalInput rcbsToolInputTypeAdditionalInput = rcbsToolInputType.createAdditionalInput(""); // $NON-NLS-1$
rcbsToolInputTypeAdditionalInput.setKind(IAdditionalInput.KIND_ADDITIONAL_INPUT_DEPENDENCY); rcbsToolInputTypeAdditionalInput.setKind(IAdditionalInput.KIND_ADDITIONAL_INPUT_DEPENDENCY);
rcbsTool.createOutputType(null,rcbsToolOutputTypeId + "." + ManagedBuildManager.getRandomNumber(),rcbsToolOutputTypeName,false); //$NON-NLS-1$ rcbsTool.createOutputType(null,rcbsToolOutputTypeId + "." + ManagedBuildManager.getRandomNumber(),rcbsToolOutputTypeName,false); //$NON-NLS-1$
} }
@ -298,7 +298,7 @@ public class BuildStepsTab extends AbstractCBuildPropertyTab {
private String createList(String[] items) { private String createList(String[] items) {
if(items == null) if(items == null)
return new String(); return ""; // $NON-NLS-1$
StringBuffer path = new StringBuffer(EMPTY_STR); StringBuffer path = new StringBuffer(EMPTY_STR);

View file

@ -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 * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -88,8 +88,8 @@ public class NewBuildConfigurationDialog extends Dialog {
des = prjd; des = prjd;
setShellStyle(getShellStyle()|SWT.RESIZE); setShellStyle(getShellStyle()|SWT.RESIZE);
newName = new String(); newName = ""; // $NON-NLS-1$
newDescription = new String(); newDescription = ""; // $NON-NLS-1$
parentConfig = null; parentConfig = null;
// The default behaviour is to clone the settings // The default behaviour is to clone the settings
@ -110,9 +110,9 @@ public class NewBuildConfigurationDialog extends Dialog {
@Override @Override
protected void buttonPressed(int buttonId) { protected void buttonPressed(int buttonId) {
if (buttonId == IDialogConstants.OK_ID) { if (buttonId == IDialogConstants.OK_ID) {
String description = new String(); String description = ""; // $NON-NLS-1$
String nameAndDescription = new String(); String nameAndDescription = ""; // $NON-NLS-1$
String baseConfigNameAndDescription = new String(); String baseConfigNameAndDescription = ""; // $NON-NLS-1$
newName = configName.getText().trim(); newName = configName.getText().trim();
newDescription = configDescription.getText().trim(); newDescription = configDescription.getText().trim();

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007, 2013 Intel Corporation and others. * Copyright (c) 2007, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -413,8 +413,8 @@ public class NewCfgDialog implements INewCfgDialog {
/** /**
*/ */
public NewCfgDialog() { public NewCfgDialog() {
newName = new String(); newName = ""; // $NON-NLS-1$
newDescription = new String(); newDescription = ""; // $NON-NLS-1$
} }
@Override @Override

View file

@ -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 * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -55,7 +55,7 @@ import com.ibm.icu.text.Collator;
* @noinstantiate This class is not intended to be instantiated by clients. * @noinstantiate This class is not intended to be instantiated by clients.
*/ */
public class NewVarDialog extends Dialog { public class NewVarDialog extends Dialog {
private static final String EMPTY_STRING = new String(); private static final String EMPTY_STRING = ""; // $NON-NLS-1$
// The title of the dialog. // The title of the dialog.
private String fTitle; private String fTitle;

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007, 2009 Intel Corporation and others. * Copyright (c) 2007, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -20,7 +20,7 @@ import org.eclipse.cdt.core.settings.model.util.SettingsSet.SettingLevel;
public abstract class AbstractEntryStorage { public abstract class AbstractEntryStorage {
private int fKind; private int fKind;
private static final String EMPTY_STRING = new String(); private static final String EMPTY_STRING = ""; // $NON-NLS-1$
public AbstractEntryStorage(int kind){ public AbstractEntryStorage(int kind){
fKind = kind; fKind = kind;

View file

@ -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 * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -46,7 +46,7 @@ public class BinaryFunction extends BinaryElement implements IBinaryFunction {
@Override @Override
public String getParameterInitializer(int pos) { public String getParameterInitializer(int pos) {
// TODO Auto-generated method stub // TODO Auto-generated method stub
return new String(); return ""; // $NON-NLS-1$
} }
/* (non-Javadoc) /* (non-Javadoc)
@ -64,7 +64,7 @@ public class BinaryFunction extends BinaryElement implements IBinaryFunction {
@Override @Override
public String getReturnType() { public String getReturnType() {
// TODO Auto-generated method stub // TODO Auto-generated method stub
return new String(); return ""; // $NON-NLS-1$
} }
/* (non-Javadoc) /* (non-Javadoc)

View file

@ -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 * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -885,7 +885,7 @@ public class PE {
} }
} }
return new String(); return ""; // $NON-NLS-1$
} }
/** /**

View file

@ -695,9 +695,9 @@ public class Dwarf {
ByteBuffer data = dwarfSections.get(DWARF_DEBUG_STR); ByteBuffer data = dwarfSections.get(DWARF_DEBUG_STR);
if (data == null) { if (data == null) {
obj = new String(); obj = ""; // $NON-NLS-1$
} else if (offset < 0 || offset > data.capacity()) { } else if (offset < 0 || offset > data.capacity()) {
obj = new String(); obj = ""; // $NON-NLS-1$
} else { } else {
StringBuffer sb = new StringBuffer(); StringBuffer sb = new StringBuffer();
data.position((int) offset); data.position((int) offset);
@ -723,9 +723,9 @@ public class Dwarf {
ByteBuffer data = dwarfAltSections.get(DWARF_DEBUG_STR); ByteBuffer data = dwarfAltSections.get(DWARF_DEBUG_STR);
if (data == null) { if (data == null) {
obj = new String(); obj = ""; // $NON-NLS-1$
} else if (offset < 0 || offset > data.capacity()) { } else if (offset < 0 || offset > data.capacity()) {
obj = new String(); obj = ""; // $NON-NLS-1$
} else { } else {
StringBuffer sb = new StringBuffer(); StringBuffer sb = new StringBuffer();
data.position((int) offset); data.position((int) offset);

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2000, 2008 QNX Software Systems and others. * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -188,7 +188,7 @@ public class Stabs {
if (stroff > 0) { if (stroff > 0) {
field = makeString(stroff); field = makeString(stroff);
} else { } else {
field = new String(); field = ""; // $NON-NLS-1$
} }
// Check for continuation and if any go to the next stab // Check for continuation and if any go to the next stab
// until we find a string that is not terminated with a // until we find a string that is not terminated with a

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2006, 2012 Nokia and others. * Copyright (c) 2006, 2016 Nokia and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -177,7 +177,7 @@ public class StabsReader implements ISymbolReader {
if (stroff > 0) { if (stroff > 0) {
field = makeString(stroff); field = makeString(stroff);
} else { } else {
field = new String(); field = ""; // $NON-NLS-1$
} }
// Check for continuation and if any go to the next stab // Check for continuation and if any go to the next stab
// until we find a string that is not terminated with a // until we find a string that is not terminated with a

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2000, 2006 QNX Software Systems and others. * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -98,7 +98,7 @@ public class StringField {
if (index < array.length) { if (index < array.length) {
typeInformation = new String(array, index, array.length - index); typeInformation = new String(array, index, array.length - index);
} else { } else {
typeInformation = new String(); typeInformation = ""; // $NON-NLS-1$
} }
} }
} }

View file

@ -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 * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -217,7 +217,7 @@ public class CHelpProviderTester{
private String getValueByKey(String key){ private String getValueByKey(String key){
String val = fProperties.getProperty(key); String val = fProperties.getProperty(key);
if(val == null) if(val == null)
val = new String(); val = ""; // $NON-NLS-1$
return val; return val;
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2005, 2010 IBM Corporation and others. * Copyright (c) 2005, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -523,7 +523,7 @@ public final class IndentUtil {
if (computed != null) if (computed != null)
indent= computed.toString(); indent= computed.toString();
else else
indent= new String(); indent= ""; // $NON-NLS-1$
} }
return indent; return indent;
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2004, 2013 TimeSys Corporation and others. * Copyright (c) 2004, 2016 TimeSys Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -141,7 +141,7 @@ public class CFileTypesPreferenceBlock {
} else if (assoc.isPredefined()) { } else if (assoc.isPredefined()) {
return PreferencesMessages.CFileTypesPreferencePage_preDefined; return PreferencesMessages.CFileTypesPreferencePage_preDefined;
} }
return new String(); return ""; // $NON-NLS-1$
} }
} }
return element.toString(); return element.toString();

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2003, 2015 IBM Corporation and others. * Copyright (c) 2003, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -44,7 +44,7 @@ public class CSearchUtil {
public static String toString(IWorkingSet[] workingSets) { public static String toString(IWorkingSet[] workingSets) {
if (workingSets != null && workingSets.length > 0) { if (workingSets != null && workingSets.length > 0) {
String string = new String(); String string = ""; // $NON-NLS-1$
for (int i = 0; i < workingSets.length; i++) { for (int i = 0; i < workingSets.length; i++) {
if (i > 0) if (i > 0)
string += ", "; //$NON-NLS-1$ string += ", "; //$NON-NLS-1$

View file

@ -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 * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -62,8 +62,8 @@ public class NewConfigurationDialog extends Dialog implements INewCfgDialog {
protected NewConfigurationDialog(Shell parentShell) { protected NewConfigurationDialog(Shell parentShell) {
super(parentShell); super(parentShell);
setShellStyle(getShellStyle()|SWT.RESIZE); setShellStyle(getShellStyle()|SWT.RESIZE);
newName = new String(); newName = ""; // $NON-NLS-1$
newDescription = new String(); newDescription = ""; // $NON-NLS-1$
} }
@Override @Override
@ -85,9 +85,9 @@ public class NewConfigurationDialog extends Dialog implements INewCfgDialog {
@Override @Override
protected void buttonPressed(int buttonId) { protected void buttonPressed(int buttonId) {
if (buttonId == IDialogConstants.OK_ID) { if (buttonId == IDialogConstants.OK_ID) {
String description = new String(); String description = ""; // $NON-NLS-1$
String nameAndDescription = new String(); String nameAndDescription = ""; // $NON-NLS-1$
String baseConfigNameAndDescription = new String(); String baseConfigNameAndDescription = ""; // $NON-NLS-1$
newName = configName.getText().trim(); newName = configName.getText().trim();
newDescription = configDescription.getText().trim(); newDescription = configDescription.getText().trim();

View file

@ -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 * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -64,7 +64,7 @@ public class RenameConfigurationDialog extends Dialog {
setShellStyle(getShellStyle()|SWT.RESIZE); setShellStyle(getShellStyle()|SWT.RESIZE);
newName = renameConfig.getName(); newName = renameConfig.getName();
newDescription = renameConfig.getDescription(); newDescription = renameConfig.getDescription();
if(newDescription == null) newDescription = new String(); if(newDescription == null) newDescription = ""; // $NON-NLS-1$
originalName = renameConfig.getName(); originalName = renameConfig.getName();
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2005, 2012 Symbian Software Limited and others. * Copyright (c) 2005, 2016 Symbian Software Limited and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -69,7 +69,7 @@ public class UIStringListWidget extends InputUIElement {
@Override @Override
public Map<String, String> getValues() { public Map<String, String> getValues() {
Map<String, String> retMap = new HashMap<String, String>(); Map<String, String> retMap = new HashMap<String, String>();
String itemString = new String(); String itemString = ""; // $NON-NLS-1$
for (int i = 0; i < itemsList.size(); i++) { for (int i = 0; i < itemsList.size(); i++) {
itemString = itemString + itemsList.get(i) + "|"; //$NON-NLS-1$ itemString = itemString + itemsList.get(i) + "|"; //$NON-NLS-1$
} }

View file

@ -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 * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -72,7 +72,7 @@ public class UITextWidget extends InputUIElement implements ModifyListener {
*/ */
public UITextWidget(UIAttributes uiAttribute) { public UITextWidget(UIAttributes uiAttribute) {
super(uiAttribute); super(uiAttribute);
this.textValue = new String(); this.textValue = ""; // $NON-NLS-1$
} }
/** /**

View file

@ -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 * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -33,7 +33,7 @@ public class MICommand<V extends MIInfo> implements ICommand<V> {
List<Adjustable> fOptions = new ArrayList<>(); List<Adjustable> fOptions = new ArrayList<>();
List<Adjustable> fParameters = new ArrayList<>(); List<Adjustable> fParameters = new ArrayList<>();
String fOperation = new String(); String fOperation = ""; // $NON-NLS-1$
IDMContext fCtx; IDMContext fCtx;
/* /*

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2000, 2014 QNX Software Systems and others. * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -115,7 +115,7 @@ public class MIDataDisassemble extends MICommand<MIDataDisassembleInfo> {
if (parameters != null && parameters.length > 0) { if (parameters != null && parameters.length > 0) {
return "-- " + parameters[0]; //$NON-NLS-1$ return "-- " + parameters[0]; //$NON-NLS-1$
} }
return new String(); return ""; // $NON-NLS-1$
} }
@Override @Override

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2005, 2011 IBM Corporation and others. * Copyright (c) 2005, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -280,7 +280,7 @@ public class VMDelta extends ModelDelta {
} }
private void appendDetail(StringBuilder buf, VMDelta delta, int depth) { private void appendDetail(StringBuilder buf, VMDelta delta, int depth) {
String indent = new String(); String indent = ""; // $NON-NLS-1$
for (int i = 0; i < depth; i++) { for (int i = 0; i < depth; i++) {
indent += '\t'; indent += '\t';
} }

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2005, 2012 QNX Software Systems and others. * Copyright (c) 2005, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -255,7 +255,7 @@ public class CEnvironmentTab extends CLaunchConfigurationTab {
} }
public String get() { public String get() {
String result = new String(); String result = ""; // $NON-NLS-1$
Object[] entries = fElements.entrySet().toArray(); Object[] entries = fElements.entrySet().toArray();
for (int i = 0; i < entries.length; ++i) for (int i = 0; i < entries.length; ++i)
result += entries[i].toString() + '\n'; result += entries[i].toString() + '\n';
@ -366,7 +366,7 @@ public class CEnvironmentTab extends CLaunchConfigurationTab {
} }
protected void newEntry() { protected void newEntry() {
EntryDialog dialog = new EntryDialog(new String(), new String(), false); EntryDialog dialog = new EntryDialog("", "", false); // $NON-NLS-1$ // $NON-NLS-2$
if (dialog.open() == Window.OK) { if (dialog.open() == Window.OK) {
fElements.setProperty(dialog.getName(), dialog.getValue()); fElements.setProperty(dialog.getName(), dialog.getValue());
fVariableList.refresh(); fVariableList.refresh();