You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by gi...@apache.org on 2018/03/28 19:36:27 UTC

[3/5] ant-ivyde git commit: Extraneous null checks

Extraneous null checks

Project: http://git-wip-us.apache.org/repos/asf/ant-ivyde/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivyde/commit/165f693f
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivyde/tree/165f693f
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivyde/diff/165f693f

Branch: refs/heads/master
Commit: 165f693f66a8c2b5f841f7410430d9c6d02688d8
Parents: ea2400e
Author: Gintas Grigelionis <gi...@apache.org>
Authored: Wed Mar 28 21:30:29 2018 +0200
Committer: Gintas Grigelionis <gi...@apache.org>
Committed: Wed Mar 28 21:30:29 2018 +0200

----------------------------------------------------------------------
 .../src/java/org/apache/ivyde/common/model/IvyTag.java             | 2 +-
 .../ivyde/internal/eclipse/ui/menu/IvyMenuContributionItem.java    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/165f693f/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/common/model/IvyTag.java
----------------------------------------------------------------------
diff --git a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/common/model/IvyTag.java b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/common/model/IvyTag.java
index 1f34749..2589da5 100644
--- a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/common/model/IvyTag.java
+++ b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/common/model/IvyTag.java
@@ -180,7 +180,7 @@ public class IvyTag {
             return null;
         }
         IValueProvider provider = ivyTagAttribute.getValueProvider();
-        if (provider != null && (provider instanceof IDocumentedValueProvider)) {
+        if (provider instanceof IDocumentedValueProvider) {
             return ((IDocumentedValueProvider) provider).getDocForValue(value, ivyfile);
         }
         return null;

http://git-wip-us.apache.org/repos/asf/ant-ivyde/blob/165f693f/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/ui/menu/IvyMenuContributionItem.java
----------------------------------------------------------------------
diff --git a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/ui/menu/IvyMenuContributionItem.java b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/ui/menu/IvyMenuContributionItem.java
index 043db40..e89027f 100644
--- a/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/ui/menu/IvyMenuContributionItem.java
+++ b/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/internal/eclipse/ui/menu/IvyMenuContributionItem.java
@@ -80,7 +80,7 @@ public class IvyMenuContributionItem extends CompoundContributionItem implements
             return new IContributionItem[0];
         }
         ISelection selection = selectionService.getSelection();
-        if (selection == null || !(selection instanceof IStructuredSelection)) {
+        if (!(selection instanceof IStructuredSelection)) {
             return new IContributionItem[0];
         }