summaryrefslogtreecommitdiff
path: root/scripting/java/org
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-13 10:52:12 +0200
committerNoel Grandin <noel@peralex.com>2014-08-20 10:35:53 +0200
commita753a458e582dc0aa5e94ea350f4db06488f26f2 (patch)
tree668725470ddf51b52f3edc290e996dc2576c7dcf /scripting/java/org
parent60f152caeee38579433a31dd3a98e91dc3d23ff6 (diff)
java: avoid if..else when returning boolean values
Change-Id: Iab52762a9abfe8735223372b09638ce9d8d44318
Diffstat (limited to 'scripting/java/org')
-rw-r--r--scripting/java/org/openoffice/idesupport/ui/ScriptPanel.java5
-rw-r--r--scripting/java/org/openoffice/netbeans/modules/office/actions/ParcelSupport.java5
-rw-r--r--scripting/java/org/openoffice/netbeans/modules/office/utils/NagDialog.java5
3 files changed, 3 insertions, 12 deletions
diff --git a/scripting/java/org/openoffice/idesupport/ui/ScriptPanel.java b/scripting/java/org/openoffice/idesupport/ui/ScriptPanel.java
index 15f472188b80..a6969cdd89ef 100644
--- a/scripting/java/org/openoffice/idesupport/ui/ScriptPanel.java
+++ b/scripting/java/org/openoffice/idesupport/ui/ScriptPanel.java
@@ -182,10 +182,7 @@ public class ScriptPanel extends JPanel {
@Override
public boolean isCellEditable(int row, int col) {
- if (col == 0)
- return false;
- else
- return true;
+ return (col != 0);
}
@Override
diff --git a/scripting/java/org/openoffice/netbeans/modules/office/actions/ParcelSupport.java b/scripting/java/org/openoffice/netbeans/modules/office/actions/ParcelSupport.java
index 2cfd316cddde..ab05d89d687d 100644
--- a/scripting/java/org/openoffice/netbeans/modules/office/actions/ParcelSupport.java
+++ b/scripting/java/org/openoffice/netbeans/modules/office/actions/ParcelSupport.java
@@ -174,9 +174,6 @@ public class ParcelSupport implements ParcelCookie
message, NotifyDescriptor.OK_CANCEL_OPTION);
TopManager.getDefault().notify(d);
- if (d.getValue() == NotifyDescriptor.CANCEL_OPTION)
- return false;
- else
- return true;
+ return (d.getValue() != NotifyDescriptor.CANCEL_OPTION);
}
}
diff --git a/scripting/java/org/openoffice/netbeans/modules/office/utils/NagDialog.java b/scripting/java/org/openoffice/netbeans/modules/office/utils/NagDialog.java
index 55b855ea77c0..c54833ba02bb 100644
--- a/scripting/java/org/openoffice/netbeans/modules/office/utils/NagDialog.java
+++ b/scripting/java/org/openoffice/netbeans/modules/office/utils/NagDialog.java
@@ -66,10 +66,7 @@ public class NagDialog {
public boolean show() {
TopManager.getDefault().notify(descriptor);
- if (descriptor.getValue() == NotifyDescriptor.OK_OPTION)
- return true;
- else
- return false;
+ return (descriptor.getValue() == NotifyDescriptor.OK_OPTION);
}
public boolean getState() {