openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1648309 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/conversation/ConversationManager.java
Date Mon, 29 Dec 2014 11:48:32 GMT
Author: rmannibucau
Date: Mon Dec 29 11:48:32 2014
New Revision: 1648309

URL: http://svn.apache.org/r1648309
Log:
avoiding NPE in isConversationExistWithGivenId as well

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/conversation/ConversationManager.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/conversation/ConversationManager.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/conversation/ConversationManager.java?rev=1648309&r1=1648308&r2=1648309&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/conversation/ConversationManager.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/conversation/ConversationManager.java
Mon Dec 29 11:48:32 2014
@@ -77,6 +77,11 @@ public class ConversationManager
      */
     public boolean isConversationExistWithGivenId(String conversationId)
     {
+        if (conversationId == null)
+        {
+            return false;
+        }
+
         ConversationImpl conv = null;
         Set<Conversation> set = conversations.keySet();
         Iterator<Conversation> it = set.iterator();
@@ -84,7 +89,7 @@ public class ConversationManager
         while (it.hasNext())
         {
             conv = (ConversationImpl) it.next();
-            if (conv.getId().equals(conversationId))
+            if (conversationId.equals(conv.getId()))
             {
                 return true;
             }



Mime
View raw message