Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Blewitt2016-04-18 08:07:43 +0000
committerAlex Blewitt2016-04-18 22:15:05 +0000
commit809598db9dcc078cc4d7cffd4da3d0fc0b0716a3 (patch)
treee9d58143907e0396806f1f2170f4942db8c0c013 /build/org.eclipse.cdt.make.core
parent135bdd42941dafc9afd3e00dbdad8c334d065dc2 (diff)
downloadorg.eclipse.cdt-809598db9dcc078cc4d7cffd4da3d0fc0b0716a3.tar.gz
org.eclipse.cdt-809598db9dcc078cc4d7cffd4da3d0fc0b0716a3.tar.xz
org.eclipse.cdt-809598db9dcc078cc4d7cffd4da3d0fc0b0716a3.zip
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>
Diffstat (limited to 'build/org.eclipse.cdt.make.core')
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeScannerInfo.java6
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/NullMakefile.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefile.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/CCommandDSC.java6
4 files changed, 10 insertions, 10 deletions
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeScannerInfo.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeScannerInfo.java
index 048c3902eda..a1c63bccd0e 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeScannerInfo.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeScannerInfo.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 QNX Software Systems and others.
+ * Copyright (c) 2000, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -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();
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/NullMakefile.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/NullMakefile.java
index 0091d312715..caa586b4f0b 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/NullMakefile.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/NullMakefile.java
@@ -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
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefile.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefile.java
index 2920eada634..fba86ce8861 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefile.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefile.java
@@ -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);
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/CCommandDSC.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/CCommandDSC.java
index c45d508b7d1..0e8d9cbbf41 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/CCommandDSC.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/CCommandDSC.java
@@ -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())) {

Back to the top