summaryrefslogtreecommitdiff
path: root/scripting/java/com
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-13 10:19:51 +0200
committerNoel Grandin <noel@peralex.com>2014-08-20 10:35:53 +0200
commit60f152caeee38579433a31dd3a98e91dc3d23ff6 (patch)
tree15ba69f938e09bb173ca7de2e1b21b62e740ea40 /scripting/java/com
parent2922a967a1da5f9c0a07b5390906307d0ae6fe48 (diff)
java: avoid unnecessary comparisons in boolean expressions
i.e. stuff like "x == true" Change-Id: Ib82a4a30e736df392405332fa197b588482cffcf
Diffstat (limited to 'scripting/java/com')
-rw-r--r--scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java4
-rw-r--r--scripting/java/com/sun/star/script/framework/browse/ProviderBrowseNode.java2
-rw-r--r--scripting/java/com/sun/star/script/framework/browse/ScriptBrowseNode.java2
-rw-r--r--scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java2
-rw-r--r--scripting/java/com/sun/star/script/framework/provider/beanshell/PlainSourceView.java2
-rw-r--r--scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java2
-rw-r--r--scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java2
7 files changed, 8 insertions, 8 deletions
diff --git a/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java b/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java
index c2f966cbd23f..3500ab0b1d16 100644
--- a/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java
+++ b/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java
@@ -184,7 +184,7 @@ public class ParcelBrowseNode extends PropertySet
String newName;
if (aParams == null || aParams.length < 1 ||
- AnyConverter.isString(aParams[0]) == false)
+ !AnyConverter.isString(aParams[0]))
{
String prompt = "Enter name for new Script";
String title = "Create Script";
@@ -269,7 +269,7 @@ public class ParcelBrowseNode extends PropertySet
{
if (aParams == null || aParams.length < 1 ||
- AnyConverter.isString(aParams[0]) == false)
+ !AnyConverter.isString(aParams[0]))
{
String prompt = "Enter new name for Library";
String title = "Rename Library";
diff --git a/scripting/java/com/sun/star/script/framework/browse/ProviderBrowseNode.java b/scripting/java/com/sun/star/script/framework/browse/ProviderBrowseNode.java
index 5bb65b861f29..7722ce45faad 100644
--- a/scripting/java/com/sun/star/script/framework/browse/ProviderBrowseNode.java
+++ b/scripting/java/com/sun/star/script/framework/browse/ProviderBrowseNode.java
@@ -183,7 +183,7 @@ public class ProviderBrowseNode extends PropertySet
String name;
if (aParams == null || aParams.length < 1 ||
- AnyConverter.isString(aParams[0]) == false)
+ !AnyConverter.isString(aParams[0]))
{
String prompt = "Enter name for new Parcel";
String title = "Create Parcel";
diff --git a/scripting/java/com/sun/star/script/framework/browse/ScriptBrowseNode.java b/scripting/java/com/sun/star/script/framework/browse/ScriptBrowseNode.java
index 1e5df7130dec..5c744b1bdcd6 100644
--- a/scripting/java/com/sun/star/script/framework/browse/ScriptBrowseNode.java
+++ b/scripting/java/com/sun/star/script/framework/browse/ScriptBrowseNode.java
@@ -83,7 +83,7 @@ public class ScriptBrowseNode extends PropertySet
LogUtils.DEBUG("** caught exception getting script data for " + name + " ->" + e.toString() );
}
- if (provider.hasScriptEditor() == true)
+ if (provider.hasScriptEditor())
{
this.editable = true;
diff --git a/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java b/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java
index 5b0209a32c4d..09535b48880f 100644
--- a/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java
+++ b/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java
@@ -193,7 +193,7 @@ public abstract class ScriptProvider
contextUrl = getDocUrlFromModel( m_xModel );
m_container = new ParcelContainer( m_xContext, contextUrl, language );
}
- else if (AnyConverter.isString(aArguments[0]) == true)
+ else if (AnyConverter.isString(aArguments[0]))
{
String originalContextURL = AnyConverter.toString(aArguments[0]);
LogUtils.DEBUG("creating Application, path: " + originalContextURL );
diff --git a/scripting/java/com/sun/star/script/framework/provider/beanshell/PlainSourceView.java b/scripting/java/com/sun/star/script/framework/provider/beanshell/PlainSourceView.java
index 7c216e494fbb..bd8f01c9193a 100644
--- a/scripting/java/com/sun/star/script/framework/provider/beanshell/PlainSourceView.java
+++ b/scripting/java/com/sun/star/script/framework/provider/beanshell/PlainSourceView.java
@@ -55,7 +55,7 @@ public class PlainSourceView extends JScrollPane
so we don't get a storm of DocumentEvents during loading */
ta.getDocument().removeDocumentListener(this);
- if (isModified == false)
+ if (!isModified)
{
int pos = ta.getCaretPosition();
ta.setText(model.getText());
diff --git a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java
index 34061c473847..b66171fd9a26 100644
--- a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java
+++ b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java
@@ -314,7 +314,7 @@ public class ScriptEditorForBeanShell
else if (result == JOptionPane.YES_OPTION)
{
boolean saveSuccess = saveTextArea();
- if (saveSuccess == false)
+ if (!saveSuccess)
{
return;
}
diff --git a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java
index 208ee4766d67..00d2ab679290 100644
--- a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java
+++ b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java
@@ -224,7 +224,7 @@ class ScriptImpl implements XScript
}
- if (editor != null && editor.isModified() == true)
+ if (editor != null && editor.isModified())
{
LogUtils.DEBUG("GOT A MODIFIED SOURCE");
source = editor.getText();