tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlmonte...@apache.org
Subject [05/20] tomee git commit: use isEmpty and added @Override
Date Thu, 27 Dec 2018 10:01:21 GMT
use isEmpty and added @Override


Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/c4790232
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/c4790232
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/c4790232

Branch: refs/heads/master
Commit: c4790232e257aba68e953ba923d8bda228d7db2c
Parents: 7ffcb01
Author: Hayri Cicek <hayri@kodnito.com>
Authored: Fri Dec 7 22:16:38 2018 +0100
Committer: Hayri Cicek <hayri@kodnito.com>
Committed: Fri Dec 7 22:16:38 2018 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/openejb/observer/ObserverManager.java   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/c4790232/container/openejb-loader/src/main/java/org/apache/openejb/observer/ObserverManager.java
----------------------------------------------------------------------
diff --git a/container/openejb-loader/src/main/java/org/apache/openejb/observer/ObserverManager.java
b/container/openejb-loader/src/main/java/org/apache/openejb/observer/ObserverManager.java
index 462a46c..8abab63 100644
--- a/container/openejb-loader/src/main/java/org/apache/openejb/observer/ObserverManager.java
+++ b/container/openejb-loader/src/main/java/org/apache/openejb/observer/ObserverManager.java
@@ -249,7 +249,7 @@ public class ObserverManager {
                 }
             }
 
-            if (methods.size() == 0 && after.size() == 0 && before.size()
== 0) {
+            if (methods.isEmpty() && after.isEmpty() && before.isEmpty())
{
                 throw new NotAnObserverException("Object has no @Observes methods. For example:
public void observe(@Observes RetryConditionAdded event){...}");
             }
         }
@@ -486,6 +486,7 @@ public class ObserverManager {
                     return event;
                 }
 
+                @Override
                 public String toString() {
                     return "AfterEvent{} " + event;
                 }
@@ -507,6 +508,7 @@ public class ObserverManager {
                     return event;
                 }
 
+                @Override
                 public String toString() {
                     return "BeforeEvent{} " + event;
                 }


Mime
View raw message