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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -92,8 +92,8 @@ public class MakeScannerInfo implements IScannerInfo {
if (symbol.length() == 0) {
continue;
}
String key = new String();
String value = new String();
String key = ""; // $NON-NLS-1$
String value = ""; // $NON-NLS-1$
int index = symbol.indexOf("="); //$NON-NLS-1$
if (index != -1) {
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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -62,7 +62,7 @@ public class NullMakefile extends AbstractMakefile {
@Override
public String toString() {
return new String();
return ""; // $NON-NLS-1$
}
@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
* are made available under the terms of the Eclipse Public License v1.0
* 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]);
if (pattern == null) {
pattern = new String();
pattern = ""; // $NON-NLS-1$
}
return new VPath(this, pattern, directories);
}

View file

@ -108,7 +108,7 @@ public class CCommandDSC {
@Override
public String toString() {
String commandAsString = new String();
String commandAsString = ""; // $NON-NLS-1$
for (Iterator<KVStringPair> i = compilerCommand.iterator(); i.hasNext(); ) {
KVStringPair optionPair = i.next();
String value = optionPair.getValue();
@ -128,7 +128,7 @@ public class CCommandDSC {
* @return the command line to run the scanner discovery.
*/
public String getSCDRunnableCommand(boolean quoteIncludePaths, boolean quoteDefines) {
String commandAsString = new String();
String commandAsString = ""; // $NON-NLS-1$
for (Iterator<KVStringPair> i = compilerCommand.iterator(); i.hasNext(); ) {
KVStringPair optionPair = i.next();
if (optionPair.getKey().equals(SCDOptionsEnum.COMMAND.toString())) {
@ -167,7 +167,7 @@ public class CCommandDSC {
* @return the compiler command
*/
public String getCompilerName() {
String compiler = new String();
String compiler = ""; // $NON-NLS-1$
for (Iterator<KVStringPair> i = compilerCommand.iterator(); i.hasNext(); ) {
KVStringPair optionPair = i.next();
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
* are made available under the terms of the Eclipse Public License v1.0
* 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.setCustomBuildStep(true);
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);
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
* are made available under the terms of the Eclipse Public License v1.0
* 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
info.commandName = new String(tool.getName() + commandName);
// Put out the flags backwards
String myflags = new String();
String myflags = ""; // $NON-NLS-1$
for (int i = flags.length - 1; i >= 0; i--) {
if (i < flags.length - 1) myflags += " ";
myflags += flags[i];
@ -41,7 +41,7 @@ public class ManagedBuildCommandLineGenerator implements
info.commandFlags = myflags;
// Alphabetize the inputs and add foo.cpp
String[] inputs = new String[inputResources.length + 1];
String myinputs = new String();
String myinputs = ""; // $NON-NLS-1$
for (int i=0; i<inputResources.length; 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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -165,7 +165,7 @@ public class ManagedProjectUpdateTests extends TestCase {
IStatus.OK,
"org.eclipse.cdt.managedbuilder.core.tests",
IStatus.OK,
new String(),
"", // $NON-NLS-1$
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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -167,7 +167,7 @@ public class ResourceBuildCoreTests extends TestCase {
// Get the project build properties.
ITool tools[] = defaultConfig.getFilteredTools();
Tool projTool = null;
String projBuildProps = new String();
String projBuildProps = ""; // $NON-NLS-1$
for (int i = 0; i < tools.length; i++) {
if( tools[i].buildsFileType(extString) ) {
// 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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -63,12 +63,12 @@ public class Test30_2_CommandLineGenerator implements
info.commandOutputPrefix = new String(outputPrefix);
info.commandOutput = new String(outputName);
info.commandLinePattern = new String(commandLinePattern);
info.commandInputs = new String();
info.commandInputs = ""; // $NON-NLS-1$
for (int i = 0; i < inputResources.length; i++) {
if (i > 0) info.commandInputs += " ";
info.commandInputs += inputResources[i];
}
info.commandFlags = new String();
info.commandFlags = ""; // $NON-NLS-1$
IOption opt = tool.getOptionBySuperClassId("test30_2.tar-list.filename");
String optVal = "";
try {

View file

@ -1914,7 +1914,7 @@ public class ManagedBuildManager extends AbstractCExtension {
// throw new CoreException(new Status(IStatus.ERROR,
// ManagedBuilderCorePlugin.PLUGIN_ID,
// IStatus.ERROR,
// new String(),
// "", // $NON-NLS-1$
// 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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -131,7 +131,7 @@ public class ManagedBuilderCorePlugin extends Plugin {
// IStatus.OK,
// ManagedBuilderCorePlugin.getUniqueIdentifier(),
// IStatus.OK,
// new String(),
// "", // $NON-NLS-1$
// 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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -2242,7 +2242,7 @@ public class BuildDescription implements IBuildDescription {
if(!type.isInput()){
String var = type.getLinkId();
if(var == null)
var = new String();
var = ""; // $NON-NLS-1$
Set<BuildIOType> set = fVarToAddlInSetMap.get(var);
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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -521,7 +521,7 @@ public class BuildStep implements IBuildStep {
private String listToString(String[] list, String delimiter){
if(list == null || list.length == 0)
return new String();
return ""; // $NON-NLS-1$
StringBuffer buf = new StringBuffer(list[0]);

View file

@ -51,8 +51,6 @@ import org.eclipse.core.runtime.Path;
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_SHARED_LIB = "LIBRARIES"; //$NON-NLS-1$
@ -220,7 +218,7 @@ public class AdditionalInput implements IAdditionalInput {
str = ADDITIONAL_INPUT_DEPENDENCY;
break;
default:
str = EMPTY_STRING;
str = ""; // $NON-NLS-1$
break;
}
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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -621,7 +621,7 @@ public class CommonBuilder extends ACBuilder {
status = new MultiStatus(
ManagedBuilderCorePlugin.getUniqueIdentifier(),
IStatus.ERROR,
new String(),
"", // $NON-NLS-1$
null);
}
@ -638,7 +638,7 @@ public class CommonBuilder extends ACBuilder {
status = new MultiStatus(
ManagedBuilderCorePlugin.getUniqueIdentifier(),
IStatus.ERROR,
new String(),
"", // $NON-NLS-1$
null);
}
@ -657,7 +657,7 @@ public class CommonBuilder extends ACBuilder {
status = new MultiStatus(
ManagedBuilderCorePlugin.getUniqueIdentifier(),
IStatus.OK,
new String(),
"", // $NON-NLS-1$
null);
}
@ -814,7 +814,7 @@ public class CommonBuilder extends ACBuilder {
if (buildType == FULL_BUILD || buildType == INCREMENTAL_BUILD) {
consoleHeader[0] = ManagedMakeMessages.getResourceString("ManagedMakeBuider.type.incremental"); //$NON-NLS-1$
} 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$
}
consoleHeader[1] = configName;
@ -1015,7 +1015,7 @@ public class CommonBuilder extends ACBuilder {
// return new MultiStatus(
// ManagedBuilderCorePlugin.getUniqueIdentifier(),
// severity,
// new String(),
// "", // $NON-NLS-1$
// 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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -86,7 +86,7 @@ public class FolderInfo extends ResourceInfo implements IFolderInfo {
toolChain.setUnusedChildren(parTc.getUnusedChildren());
ITool tools[] = parTc.getTools();
String subId = new String();
String subId = ""; // $NON-NLS-1$
for (ITool tool : tools) {
ITool extTool = ManagedBuildManager.getExtensionTool(tool);
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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -369,7 +369,7 @@ public class GeneratedMakefileBuilder extends ACBuilder {
if (buildType == FULL_BUILD || buildType == INCREMENTAL_BUILD) {
consoleHeader[0] = ManagedMakeMessages.getResourceString(TYPE_INC);
} 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$
}
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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -157,7 +157,7 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
*/
@Override
public String getBuildArtifactExtension() {
String ext = new String();
String ext = ""; // $NON-NLS-1$
IConfiguration config = getDefaultConfiguration();
if (config != null) {
ext = config.getArtifactExtension();
@ -171,7 +171,7 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
@Override
public String getBuildArtifactName() {
// Get the default configuration and use its value
String name = new String();
String name = ""; // $NON-NLS-1$
IConfiguration config = getDefaultConfiguration();
if (config != null) {
name = config.getArtifactName();
@ -185,7 +185,7 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
@Override
public String getCleanCommand() {
// Get from the model
String command = new String();
String command = ""; // $NON-NLS-1$
IConfiguration config = getDefaultConfiguration();
if (config != null) {
command = config.getCleanCommand();
@ -200,7 +200,7 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
public String getConfigurationName() {
// Return the human-readable name of the default configuration
IConfiguration config = getDefaultConfiguration();
return config == null ? new String() : config.getName();
return config == null ? "" : config.getName(); // $NON-NLS-1$
}
/* (non-Javadoc)
@ -361,7 +361,7 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
@Override
public String getToolFlagsForConfiguration(String extension, IPath inputLocation, IPath outputLocation){
// 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
ITool[] tools = getFilteredTools();
@ -480,7 +480,7 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
@Override
public String getPrebuildStep() {
// Get the default configuration and use its value
String name = new String();
String name = ""; // $NON-NLS-1$
IConfiguration config = getDefaultConfiguration();
if (config != null) {
name = config.getPrebuildStep();
@ -496,7 +496,7 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
@Override
public String getPostbuildStep() {
// Get the default configuration and use its value
String name = new String();
String name = ""; // $NON-NLS-1$
IConfiguration config = getDefaultConfiguration();
if (config != null) {
name = config.getPostbuildStep();
@ -512,7 +512,7 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
@Override
public String getPreannouncebuildStep() {
// Get the default configuration and use its value
String name = new String();
String name = ""; // $NON-NLS-1$
IConfiguration config = getDefaultConfiguration();
if (config != null) {
name = config.getPreannouncebuildStep();
@ -528,7 +528,7 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
@Override
public String getPostannouncebuildStep() {
// Get the default configuration and use its value
String name = new String();
String name = ""; // $NON-NLS-1$
IConfiguration config = getDefaultConfiguration();
if (config != null) {
name = config.getPostannouncebuildStep();
@ -593,7 +593,7 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
@Override
public String getToolForConfiguration(String extension) {
// 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
ITool[] tools = getFilteredTools();
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 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
boolean add = true;
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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -114,7 +114,7 @@ public class ManagedCommandLineGenerator implements
}
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();
for( int i = 0; i < array.length; i++ )
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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -42,7 +42,7 @@ import org.osgi.framework.Version;
*/
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];
// Parent and children

View file

@ -382,7 +382,7 @@ public class OptionReference implements IOption {
return name;
} catch (BuildException e) {}
}
return new String();
return ""; // $NON-NLS-1$
}
@Override
@ -396,7 +396,7 @@ public class OptionReference implements IOption {
return name;
} catch (BuildException e) {}
}
return new String();
return ""; // $NON-NLS-1$
}
@Override
@ -410,7 +410,7 @@ public class OptionReference implements IOption {
return id;
} catch (BuildException e) {}
}
return new String();
return ""; // $NON-NLS-1$
}
@Override
@ -424,7 +424,7 @@ public class OptionReference implements IOption {
return id;
} catch (BuildException e) {}
}
return new String();
return ""; // $NON-NLS-1$
}
@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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -387,7 +387,7 @@ public class ResourceChangeHandler implements IResourceChangeListener, ISavePart
IStatus.OK,
ManagedBuilderCorePlugin.getUniqueIdentifier(),
IStatus.OK,
new String(),
"", // $NON-NLS-1$
null);
}
};

View file

@ -43,7 +43,7 @@ import org.osgi.framework.Version;
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
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.
ITool tools[] = folderInfo.getFilteredTools();
String subId = new String();
String subId = ""; // $NON-NLS-1$
for (int i = 0; i < tools.length; i++) {
if( tools[i].buildsFileType(extString) ) {
baseTool = tools[i];

View file

@ -40,7 +40,7 @@ import org.w3c.dom.Element;
import org.w3c.dom.Node;
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 binaryParserId;
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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -179,7 +179,7 @@ public class ToolReference implements IToolReference {
outputFlag = tool.getOutputFlag();
outputPrefix = tool.getOutputPrefix();
String[] extensions = tool.getOutputsAttribute();
outputExtensions = new String();
outputExtensions = ""; // $NON-NLS-1$
if (extensions != null) {
for (int index = 0; index < extensions.length; ++index) {
if (extensions[index] == null) continue;
@ -346,7 +346,7 @@ public class ToolReference implements IToolReference {
public String getId() {
if (parent == null) {
// bad reference
return new String();
return ""; // $NON-NLS-1$
}
return parent.getId();
}
@ -358,7 +358,7 @@ public class ToolReference implements IToolReference {
public String getBaseId() {
if (parent == null) {
// bad reference
return new String();
return ""; // $NON-NLS-1$
}
return parent.getBaseId();
}
@ -383,7 +383,7 @@ public class ToolReference implements IToolReference {
public String getName() {
if (parent == null) {
// bad reference
return new String();
return ""; // $NON-NLS-1$
}
return parent.getName();
}
@ -467,7 +467,7 @@ public class ToolReference implements IToolReference {
if (parent != null) {
return parent.getToolCommand();
}
return new String(); // bad reference
return ""; // bad reference // $NON-NLS-1$
}
return command;
}
@ -672,7 +672,7 @@ public class ToolReference implements IToolReference {
public String getOutputExtension(String inputExtension) {
if (parent == null) {
// bad reference
return new String();
return ""; // $NON-NLS-1$
}
return parent.getOutputExtension(inputExtension);
}
@ -687,7 +687,7 @@ public class ToolReference implements IToolReference {
return parent.getOutputFlag();
} else {
// We never should be here
return new String();
return ""; // $NON-NLS-1$
}
}
return outputFlag;
@ -702,7 +702,7 @@ public class ToolReference implements IToolReference {
if (parent != null) {
return parent.getOutputPrefix();
}
return new String(); // bad reference
return ""; // bad reference // $NON-NLS-1$
}
return outputPrefix;
}
@ -864,7 +864,7 @@ public class ToolReference implements IToolReference {
*/
@Override
public String getCommandLinePattern() {
if( parent == null ) return new String();
if( parent == null ) return ""; // $NON-NLS-1$
return parent.getCommandLinePattern();
}
@ -917,7 +917,7 @@ public class ToolReference implements IToolReference {
*/
@Override
public String toString() {
String answer = new String();
String answer = ""; // $NON-NLS-1$
if (parent != null) {
answer += "Reference to " + parent.getName(); //$NON-NLS-1$
}
@ -1281,7 +1281,7 @@ public class ToolReference implements IToolReference {
if (parent != null) {
return parent.getConvertToId();
} else {
return new String();
return ""; // $NON-NLS-1$
}
}
return convertToId;
@ -1310,7 +1310,7 @@ public class ToolReference implements IToolReference {
if (parent != null) {
return parent.getVersionsSupported();
} else {
return new String();
return ""; // $NON-NLS-1$
}
}
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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -39,11 +39,11 @@ public class CheckStringExpression implements IBooleanExpression {
public CheckStringExpression(IManagedConfigElement element){
fString = element.getAttribute(STRING);
if(fString == null)
fString = new String();
fString = ""; // $NON-NLS-1$
fValue = element.getAttribute(VALUE);
if(fValue == null)
fValue = new String();
fValue = ""; // $NON-NLS-1$
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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -60,7 +60,7 @@ public class DefaultGnuWinScannerInfoCollector extends DefaultGCCScannerInfoColl
// // See if it has an equals
// String[] macroTokens = ((String)symbolIter.next()).split(EQUALS);
// 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);
// }
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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -35,7 +35,7 @@ import org.eclipse.core.resources.IResource;
*/
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];
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
IContainer resourceLocation = resource.getParent();
String relativePath = new String();
String relativePath = ""; // $NON-NLS-1$
if (resourceLocation != null) {
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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -50,7 +50,7 @@ import org.eclipse.core.runtime.IPath;
public class DefaultGCCDependencyCalculator3Commands implements
IManagedDependencyCommands {
private static final String EMPTY_STRING = new String();
private static final String EMPTY_STRING = ""; // $NON-NLS-1$
// Member variables set by the constructor
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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -439,7 +439,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
if (buildTargetExt == null) {
buildTargetExt = new String();
buildTargetExt = ""; // $NON-NLS-1$
}
// Cache the build tools
config = info.getDefaultConfiguration();
@ -651,7 +651,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
status = new MultiStatus(
ManagedBuilderCorePlugin.getUniqueIdentifier(),
IStatus.INFO,
new String(),
"", // $NON-NLS-1$
null);
status.add(new Status (
IStatus.INFO,
@ -753,7 +753,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
status = new MultiStatus (
ManagedBuilderCorePlugin.getUniqueIdentifier(),
IStatus.WARNING,
new String(),
"", // $NON-NLS-1$
null);
// Add a new status for each of the bad folders
// TODO: fix error message
@ -770,7 +770,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
status = new MultiStatus(
ManagedBuilderCorePlugin.getUniqueIdentifier(),
IStatus.OK,
new String(),
"", // $NON-NLS-1$
null);
}
@ -906,7 +906,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
status = new MultiStatus(
ManagedBuilderCorePlugin.getUniqueIdentifier(),
IStatus.INFO,
new String(),
"", // $NON-NLS-1$
null);
status.add(new Status (
IStatus.INFO,
@ -965,7 +965,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
status = new MultiStatus (
ManagedBuilderCorePlugin.getUniqueIdentifier(),
IStatus.WARNING,
new String(),
"", // $NON-NLS-1$
null);
// Add a new status for each of the bad folders
// TODO: fix error message
@ -981,7 +981,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
status = new MultiStatus(
ManagedBuilderCorePlugin.getUniqueIdentifier(),
IStatus.OK,
new String(),
"", // $NON-NLS-1$
null);
}
return status;
@ -2822,7 +2822,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
}
if (addlDeps != null && addlDeps.length > 0) {
calculatedDependencies = new String();
calculatedDependencies = ""; // $NON-NLS-1$
for (IPath addlDep : addlDeps) {
calculatedDependencies += WHITESPACE + escapeWhitespaces(addlDep.toString());
}
@ -3651,7 +3651,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
try {
secondToken = deps.get(1);
} catch (ArrayIndexOutOfBoundsException e) {
secondToken = new String();
secondToken = ""; // $NON-NLS-1$
}
if (secondToken.startsWith("'")) { //$NON-NLS-1$
// This is the Win32 implementation of echo (MinGW without MSYS)
@ -3665,7 +3665,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
try {
thirdToken = deps.get(2);
} catch (ArrayIndexOutOfBoundsException e) {
thirdToken = new String();
thirdToken = ""; // $NON-NLS-1$
}
int lastIndex = thirdToken.lastIndexOf("'"); //$NON-NLS-1$
if (lastIndex != -1) {
@ -3689,7 +3689,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
} while (fourthToken.length() == 0);
} catch (ArrayIndexOutOfBoundsException e) {
fourthToken = new String();
fourthToken = ""; // $NON-NLS-1$
}
outBuffer.append(fourthToken + WHITESPACE);
@ -4514,7 +4514,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
* the name component in a <code>String</code>
*/
private String getFileName(IResource file) {
String answer = new String();
String answer = ""; // $NON-NLS-1$
String lastSegment = file.getName();
int extensionSeparator = lastSegment.lastIndexOf(DOT);
if (extensionSeparator != -1) {
@ -4676,7 +4676,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
if (buildTargetExt == null) {
buildTargetExt = new String();
buildTargetExt = ""; // $NON-NLS-1$
}
// Cache the build tools
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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -92,8 +92,8 @@ public class MakeScannerInfo implements IScannerInfo {
if (symbol.length() == 0) {
continue;
}
String key = new String();
String value = new String();
String key = ""; // $NON-NLS-1$
String value = ""; // $NON-NLS-1$
int index = symbol.indexOf("="); //$NON-NLS-1$
if (index != -1) {
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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -132,7 +132,7 @@ public class BuildOptionComboFieldEditor extends FieldEditor {
public void widgetSelected(SelectionEvent evt) {
String oldValue = selected;
int index = optionSelector.getSelectionIndex();
selected = index == -1 ? new String() : optionSelector.getItem(index);
selected = index == -1 ? "" : optionSelector.getItem(index); // $NON-NLS-1$
setPresentsDefaultValue(false);
fireValueChanged(VALUE, oldValue, selected);
}
@ -171,7 +171,7 @@ public class BuildOptionComboFieldEditor extends FieldEditor {
protected void doStore() {
// Save the selected item in the store
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);
}

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
* are made available under the terms of the Eclipse Public License v1.0
* 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.setCustomBuildStep(true);
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);
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) {
if(items == null)
return new String();
return ""; // $NON-NLS-1$
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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -88,8 +88,8 @@ public class NewBuildConfigurationDialog extends Dialog {
des = prjd;
setShellStyle(getShellStyle()|SWT.RESIZE);
newName = new String();
newDescription = new String();
newName = ""; // $NON-NLS-1$
newDescription = ""; // $NON-NLS-1$
parentConfig = null;
// The default behaviour is to clone the settings
@ -110,9 +110,9 @@ public class NewBuildConfigurationDialog extends Dialog {
@Override
protected void buttonPressed(int buttonId) {
if (buttonId == IDialogConstants.OK_ID) {
String description = new String();
String nameAndDescription = new String();
String baseConfigNameAndDescription = new String();
String description = ""; // $NON-NLS-1$
String nameAndDescription = ""; // $NON-NLS-1$
String baseConfigNameAndDescription = ""; // $NON-NLS-1$
newName = configName.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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -413,8 +413,8 @@ public class NewCfgDialog implements INewCfgDialog {
/**
*/
public NewCfgDialog() {
newName = new String();
newDescription = new String();
newName = ""; // $NON-NLS-1$
newDescription = ""; // $NON-NLS-1$
}
@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
* are made available under the terms of the Eclipse Public License v1.0
* 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.
*/
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.
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
* are made available under the terms of the Eclipse Public License v1.0
* 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 {
private int fKind;
private static final String EMPTY_STRING = new String();
private static final String EMPTY_STRING = ""; // $NON-NLS-1$
public AbstractEntryStorage(int 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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -46,7 +46,7 @@ public class BinaryFunction extends BinaryElement implements IBinaryFunction {
@Override
public String getParameterInitializer(int pos) {
// TODO Auto-generated method stub
return new String();
return ""; // $NON-NLS-1$
}
/* (non-Javadoc)
@ -64,7 +64,7 @@ public class BinaryFunction extends BinaryElement implements IBinaryFunction {
@Override
public String getReturnType() {
// TODO Auto-generated method stub
return new String();
return ""; // $NON-NLS-1$
}
/* (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
* are made available under the terms of the Eclipse Public License v1.0
* 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);
if (data == null) {
obj = new String();
obj = ""; // $NON-NLS-1$
} else if (offset < 0 || offset > data.capacity()) {
obj = new String();
obj = ""; // $NON-NLS-1$
} else {
StringBuffer sb = new StringBuffer();
data.position((int) offset);
@ -723,9 +723,9 @@ public class Dwarf {
ByteBuffer data = dwarfAltSections.get(DWARF_DEBUG_STR);
if (data == null) {
obj = new String();
obj = ""; // $NON-NLS-1$
} else if (offset < 0 || offset > data.capacity()) {
obj = new String();
obj = ""; // $NON-NLS-1$
} else {
StringBuffer sb = new StringBuffer();
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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -188,7 +188,7 @@ public class Stabs {
if (stroff > 0) {
field = makeString(stroff);
} else {
field = new String();
field = ""; // $NON-NLS-1$
}
// Check for continuation and if any go to the next stab
// 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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -177,7 +177,7 @@ public class StabsReader implements ISymbolReader {
if (stroff > 0) {
field = makeString(stroff);
} else {
field = new String();
field = ""; // $NON-NLS-1$
}
// Check for continuation and if any go to the next stab
// 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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -98,7 +98,7 @@ public class StringField {
if (index < array.length) {
typeInformation = new String(array, index, array.length - index);
} 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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -217,7 +217,7 @@ public class CHelpProviderTester{
private String getValueByKey(String key){
String val = fProperties.getProperty(key);
if(val == null)
val = new String();
val = ""; // $NON-NLS-1$
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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -523,7 +523,7 @@ public final class IndentUtil {
if (computed != null)
indent= computed.toString();
else
indent= new String();
indent= ""; // $NON-NLS-1$
}
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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -141,7 +141,7 @@ public class CFileTypesPreferenceBlock {
} else if (assoc.isPredefined()) {
return PreferencesMessages.CFileTypesPreferencePage_preDefined;
}
return new String();
return ""; // $NON-NLS-1$
}
}
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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -44,7 +44,7 @@ public class CSearchUtil {
public static String toString(IWorkingSet[] workingSets) {
if (workingSets != null && workingSets.length > 0) {
String string = new String();
String string = ""; // $NON-NLS-1$
for (int i = 0; i < workingSets.length; i++) {
if (i > 0)
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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -62,8 +62,8 @@ public class NewConfigurationDialog extends Dialog implements INewCfgDialog {
protected NewConfigurationDialog(Shell parentShell) {
super(parentShell);
setShellStyle(getShellStyle()|SWT.RESIZE);
newName = new String();
newDescription = new String();
newName = ""; // $NON-NLS-1$
newDescription = ""; // $NON-NLS-1$
}
@Override
@ -85,9 +85,9 @@ public class NewConfigurationDialog extends Dialog implements INewCfgDialog {
@Override
protected void buttonPressed(int buttonId) {
if (buttonId == IDialogConstants.OK_ID) {
String description = new String();
String nameAndDescription = new String();
String baseConfigNameAndDescription = new String();
String description = ""; // $NON-NLS-1$
String nameAndDescription = ""; // $NON-NLS-1$
String baseConfigNameAndDescription = ""; // $NON-NLS-1$
newName = configName.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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -64,7 +64,7 @@ public class RenameConfigurationDialog extends Dialog {
setShellStyle(getShellStyle()|SWT.RESIZE);
newName = renameConfig.getName();
newDescription = renameConfig.getDescription();
if(newDescription == null) newDescription = new String();
if(newDescription == null) newDescription = ""; // $NON-NLS-1$
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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -69,7 +69,7 @@ public class UIStringListWidget extends InputUIElement {
@Override
public Map<String, String> getValues() {
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++) {
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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -72,7 +72,7 @@ public class UITextWidget extends InputUIElement implements ModifyListener {
*/
public UITextWidget(UIAttributes 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
* are made available under the terms of the Eclipse Public License v1.0
* 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> fParameters = new ArrayList<>();
String fOperation = new String();
String fOperation = ""; // $NON-NLS-1$
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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -115,7 +115,7 @@ public class MIDataDisassemble extends MICommand<MIDataDisassembleInfo> {
if (parameters != null && parameters.length > 0) {
return "-- " + parameters[0]; //$NON-NLS-1$
}
return new String();
return ""; // $NON-NLS-1$
}
@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
* are made available under the terms of the Eclipse Public License v1.0
* 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) {
String indent = new String();
String indent = ""; // $NON-NLS-1$
for (int i = 0; i < depth; i++) {
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
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -255,7 +255,7 @@ public class CEnvironmentTab extends CLaunchConfigurationTab {
}
public String get() {
String result = new String();
String result = ""; // $NON-NLS-1$
Object[] entries = fElements.entrySet().toArray();
for (int i = 0; i < entries.length; ++i)
result += entries[i].toString() + '\n';
@ -366,7 +366,7 @@ public class CEnvironmentTab extends CLaunchConfigurationTab {
}
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) {
fElements.setProperty(dialog.getName(), dialog.getValue());
fVariableList.refresh();