Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2016-04-15 12:33:51 -0400
committerGerrit Code Review @ Eclipse.org2016-04-15 15:20:15 -0400
commitb91b69775f21c19c83685a3b51d541938337bfca (patch)
tree91586bfc3e382e8aab621d3c774fb428decd6925 /build/org.eclipse.cdt.make.core
parent3dc5c0a138562820c8cefa26b7f864ac4f1a2682 (diff)
downloadorg.eclipse.cdt-b91b69775f21c19c83685a3b51d541938337bfca.tar.gz
org.eclipse.cdt-b91b69775f21c19c83685a3b51d541938337bfca.tar.xz
org.eclipse.cdt-b91b69775f21c19c83685a3b51d541938337bfca.zip
Bug 491825 - Remove uses of new Boolean and friends
Diffstat (limited to 'build/org.eclipse.cdt.make.core')
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/BuildInfoFactory.java22
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/ProjectTargets.java6
2 files changed, 14 insertions, 14 deletions
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/BuildInfoFactory.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/BuildInfoFactory.java
index 52e7f70416..c44712474c 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/BuildInfoFactory.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/BuildInfoFactory.java
@@ -68,7 +68,7 @@ public class BuildInfoFactory {
@Override
public void setUseDefaultBuildCmd(boolean on) throws CoreException {
- putString(USE_DEFAULT_BUILD_CMD, new Boolean(on).toString());
+ putString(USE_DEFAULT_BUILD_CMD, String.valueOf(on));
}
@Override
@@ -212,7 +212,7 @@ public class BuildInfoFactory {
@Override
public void setStopOnError(boolean enabled) throws CoreException {
- putString(STOP_ON_ERROR, new Boolean(enabled).toString());
+ putString(STOP_ON_ERROR, String.valueOf(enabled));
}
@Override
@@ -286,7 +286,7 @@ public class BuildInfoFactory {
@Override
public void setAutoBuildEnable(boolean enabled) throws CoreException {
- putString(BUILD_AUTO_ENABLED, new Boolean(enabled).toString());
+ putString(BUILD_AUTO_ENABLED, String.valueOf(enabled));
}
@Override
@@ -296,7 +296,7 @@ public class BuildInfoFactory {
@Override
public void setIncrementalBuildEnable(boolean enabled) throws CoreException {
- putString(BUILD_INCREMENTAL_ENABLED, new Boolean(enabled).toString());
+ putString(BUILD_INCREMENTAL_ENABLED, String.valueOf(enabled));
}
@Override
@@ -306,7 +306,7 @@ public class BuildInfoFactory {
@Override
public void setFullBuildEnable(boolean enabled) throws CoreException {
- putString(BUILD_FULL_ENABLED, new Boolean(enabled).toString());
+ putString(BUILD_FULL_ENABLED, String.valueOf(enabled));
}
@Override
@@ -316,7 +316,7 @@ public class BuildInfoFactory {
@Override
public void setCleanBuildEnable(boolean enabled) throws CoreException {
- putString(BUILD_CLEAN_ENABLED, new Boolean(enabled).toString());
+ putString(BUILD_CLEAN_ENABLED, String.valueOf(enabled));
}
@Override
@@ -327,9 +327,9 @@ public class BuildInfoFactory {
@Override
public String[] getErrorParsers() {
String parsers = getString(ErrorParserManager.PREF_ERROR_PARSER);
- if (parsers != null && parsers.length() > 0) {
+ if (parsers != null && !parsers.isEmpty()) {
StringTokenizer tok = new StringTokenizer(parsers, ";"); //$NON-NLS-1$
- List<String> list = new ArrayList<String>(tok.countTokens());
+ List<String> list = new ArrayList<>(tok.countTokens());
while (tok.hasMoreElements()) {
list.add(tok.nextToken());
}
@@ -367,15 +367,15 @@ public class BuildInfoFactory {
@Override
public void setAppendEnvironment(boolean append) throws CoreException {
- putString(BUILD_APPEND_ENVIRONMENT, new Boolean(append).toString());
+ putString(BUILD_APPEND_ENVIRONMENT, String.valueOf(append));
}
public boolean getBoolean(String property) {
- return Boolean.valueOf(getString(property)).booleanValue();
+ return Boolean.parseBoolean(getString(property));
}
protected Map<String, String> decodeMap(String value) {
- Map<String, String> map = new HashMap<String, String>();
+ Map<String, String> map = new HashMap<>();
if (value != null) {
StringBuffer envStr = new StringBuffer(value);
String escapeChars = "|\\"; //$NON-NLS-1$
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/ProjectTargets.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/ProjectTargets.java
index 14bc9512ab..41a10be49f 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/ProjectTargets.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/ProjectTargets.java
@@ -195,13 +195,13 @@ public class ProjectTargets {
}
elem = targetElem.createChild(TARGET_STOP_ON_ERROR);
- elem.setValue(new Boolean(target.isStopOnError()).toString());
+ elem.setValue(String.valueOf(target.isStopOnError()));
elem = targetElem.createChild(TARGET_USE_DEFAULT_CMD);
- elem.setValue(new Boolean(target.isDefaultBuildCmd()).toString());
+ elem.setValue(String.valueOf(target.isDefaultBuildCmd()));
elem = targetElem.createChild(TARGET_RUN_ALL_BUILDERS);
- elem.setValue(new Boolean(target.runAllBuilders()).toString());
+ elem.setValue(String.valueOf(target.runAllBuilders()));
return targetElem;
}

Back to the top