Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2019-02-14 05:36:40 -0500
committerLars Vogel2019-02-14 05:36:40 -0500
commit4bc184194956ba7fae4255997954321fba048452 (patch)
tree6ee78c482f3d61664128f9b2e46306cd4969ccc3
parent33427ea6b21ee16c1de64ea96640192903167c67 (diff)
downloadeclipse.platform.text-4bc184194956ba7fae4255997954321fba048452.tar.gz
eclipse.platform.text-4bc184194956ba7fae4255997954321fba048452.tar.xz
eclipse.platform.text-4bc184194956ba7fae4255997954321fba048452.zip
Bug 479273 - Prefer usage of Boolean.parseBoolean instead of
Boolean.ValueOf Change-Id: If9a679f44f99a373b38f8f16623eaa45b4704f5a Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r--org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPageDescriptor.java6
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/templates/ContributionTemplateStore.java2
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/rulers/ExtensionPointHelper.java2
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/HyperlinkDetectorDescriptor.java2
4 files changed, 6 insertions, 6 deletions
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPageDescriptor.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPageDescriptor.java
index d3e9d7630..372c4dede 100644
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPageDescriptor.java
+++ b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPageDescriptor.java
@@ -157,7 +157,7 @@ class SearchPageDescriptor implements IPluginContribution, Comparable<SearchPage
* to be shown in the dialog.
*/
public boolean showScopeSection() {
- return Boolean.valueOf(fElement.getAttribute(SHOW_SCOPE_SECTION_ATTRIBUTE)).booleanValue();
+ return Boolean.parseBoolean(fElement.getAttribute(SHOW_SCOPE_SECTION_ATTRIBUTE));
}
/**
@@ -169,7 +169,7 @@ class SearchPageDescriptor implements IPluginContribution, Comparable<SearchPage
*/
public boolean isInitiallyEnabled() {
String strVal= fElement.getAttribute(ENABLED_ATTRIBUTE);
- return strVal == null || Boolean.valueOf(strVal).booleanValue();
+ return strVal == null || Boolean.parseBoolean(strVal);
}
/**
@@ -181,7 +181,7 @@ class SearchPageDescriptor implements IPluginContribution, Comparable<SearchPage
* @return Returns if the page can handle searches in enclosing projects
*/
public boolean canSearchInProjects() {
- return Boolean.valueOf(fElement.getAttribute(CAN_SEARCH_ENCLOSING_PROJECTS)).booleanValue();
+ return Boolean.parseBoolean(fElement.getAttribute(CAN_SEARCH_ENCLOSING_PROJECTS));
}
/**
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/templates/ContributionTemplateStore.java b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/templates/ContributionTemplateStore.java
index 6a88053c3..ba64a531f 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/templates/ContributionTemplateStore.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/templates/ContributionTemplateStore.java
@@ -230,7 +230,7 @@ public class ContributionTemplateStore extends TemplateStore {
if (autoInsert == null)
bAutoInsert= true;
else
- bAutoInsert= Boolean.valueOf(autoInsert).booleanValue();
+ bAutoInsert= Boolean.parseBoolean(autoInsert);
Template template= new Template(name, desc, contextTypeId, pattern, bAutoInsert);
TemplatePersistenceData data= new TemplatePersistenceData(template, true, id);
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/rulers/ExtensionPointHelper.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/rulers/ExtensionPointHelper.java
index 5a3e2c5d1..026cb0a57 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/rulers/ExtensionPointHelper.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/rulers/ExtensionPointHelper.java
@@ -75,7 +75,7 @@ public final class ExtensionPointHelper {
return dflt;
try {
- return Boolean.valueOf(value).booleanValue();
+ return Boolean.parseBoolean(value);
} catch (NumberFormatException x) {
fail(MessageFormat.format(RulerColumnMessages.ExtensionPointHelper_invalid_number_attribute_msg, new Object[] {fName, attribute}));
return dflt;
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/HyperlinkDetectorDescriptor.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/HyperlinkDetectorDescriptor.java
index 32c25ccf1..718c64c0d 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/HyperlinkDetectorDescriptor.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/HyperlinkDetectorDescriptor.java
@@ -207,7 +207,7 @@ public final class HyperlinkDetectorDescriptor {
String value= fElement.getAttribute(ACTIVATE_PLUG_IN_ATTRIBUTE);
if (value == null)
return true;
- return Boolean.valueOf(value).booleanValue();
+ return Boolean.parseBoolean(value);
}
@Override

Back to the top