You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by ma...@apache.org on 2019/11/12 21:37:35 UTC
[james-project] 13/15: [Refactoring] suppress redundant condition
This is an automated email from the ASF dual-hosted git repository.
matthieu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git
commit 3c5467fccfd66943df579fa1f478c22ade1c83db
Author: Matthieu Baechler <ma...@apache.org>
AuthorDate: Fri Nov 8 18:10:53 2019 +0100
[Refactoring] suppress redundant condition
---
.../src/main/java/org/apache/james/lifecycle/api/LifecycleUtil.java | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/server/container/lifecycle-api/src/main/java/org/apache/james/lifecycle/api/LifecycleUtil.java b/server/container/lifecycle-api/src/main/java/org/apache/james/lifecycle/api/LifecycleUtil.java
index c9fe860..1cb7241 100644
--- a/server/container/lifecycle-api/src/main/java/org/apache/james/lifecycle/api/LifecycleUtil.java
+++ b/server/container/lifecycle-api/src/main/java/org/apache/james/lifecycle/api/LifecycleUtil.java
@@ -22,12 +22,10 @@ package org.apache.james.lifecycle.api;
public class LifecycleUtil {
/**
- * Dispose the given object if its an instanceof {@link Disposable}
- *
- * @param obj
+ * Dispose the given object if it's an instanceof {@link Disposable}
*/
public static void dispose(Object obj) {
- if (obj instanceof Disposable && obj != null) {
+ if (obj instanceof Disposable) {
((Disposable) obj).dispose();
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org