flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cd...@apache.org
Subject flex-blazeds git commit: - Updated two for-loops to be compilable on Java 1.8 but still be binary compatible with Java 1.6
Date Sat, 17 Dec 2016 16:08:34 GMT
Repository: flex-blazeds
Updated Branches:
  refs/heads/develop 10fd3c03a -> 2b91915fa


- Updated two for-loops to be compilable on Java 1.8 but still be binary compatible with Java
1.6


Project: http://git-wip-us.apache.org/repos/asf/flex-blazeds/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-blazeds/commit/2b91915f
Tree: http://git-wip-us.apache.org/repos/asf/flex-blazeds/tree/2b91915f
Diff: http://git-wip-us.apache.org/repos/asf/flex-blazeds/diff/2b91915f

Branch: refs/heads/develop
Commit: 2b91915fa70f5caae1e92820053dfa2f2b27f30f
Parents: 10fd3c0
Author: Christofer Dutz <christofer.dutz@codecentric.de>
Authored: Sat Dec 17 17:08:32 2016 +0100
Committer: Christofer Dutz <christofer.dutz@codecentric.de>
Committed: Sat Dec 17 17:08:32 2016 +0100

----------------------------------------------------------------------
 core/src/flex/messaging/FlexSessionManager.java              | 8 ++++++--
 .../flex/messaging/endpoints/BasePollingHTTPEndpoint.java    | 5 ++++-
 2 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/2b91915f/core/src/flex/messaging/FlexSessionManager.java
----------------------------------------------------------------------
diff --git a/core/src/flex/messaging/FlexSessionManager.java b/core/src/flex/messaging/FlexSessionManager.java
index bec0352..9ce1407 100644
--- a/core/src/flex/messaging/FlexSessionManager.java
+++ b/core/src/flex/messaging/FlexSessionManager.java
@@ -18,6 +18,8 @@ package flex.messaging;
 
 import flex.management.ManageableComponent;
 import flex.messaging.log.LogCategories;
+
+import java.util.Enumeration;
 import java.util.concurrent.ConcurrentHashMap;
 
 /**
@@ -289,9 +291,11 @@ public class FlexSessionManager extends ManageableComponent
             return;
         
         super.stop();
-        
-        for (Class<? extends FlexSession> sessionClass : providers.keySet())
+
+        Enumeration<Class<? extends FlexSession>> sessionClasses = providers.keys();
+        while (sessionClasses.hasMoreElements())
         {
+            Class<? extends FlexSession> sessionClass = sessionClasses.nextElement();
             unregisterFlexSessionProvider(sessionClass);
         }
         providers.clear();

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/2b91915f/core/src/flex/messaging/endpoints/BasePollingHTTPEndpoint.java
----------------------------------------------------------------------
diff --git a/core/src/flex/messaging/endpoints/BasePollingHTTPEndpoint.java b/core/src/flex/messaging/endpoints/BasePollingHTTPEndpoint.java
index 3c29fae..0353354 100644
--- a/core/src/flex/messaging/endpoints/BasePollingHTTPEndpoint.java
+++ b/core/src/flex/messaging/endpoints/BasePollingHTTPEndpoint.java
@@ -29,6 +29,7 @@ import flex.messaging.log.Log;
 import flex.messaging.messages.CommandMessage;
 import flex.messaging.util.UserAgentManager;
 
+import java.util.Enumeration;
 import java.util.concurrent.ConcurrentHashMap;
 
 /**
@@ -410,8 +411,10 @@ public abstract class BasePollingHTTPEndpoint extends BaseHTTPEndpoint
implement
             return;
 
         // Notify any currently waiting polls.
-        for (Object notifier : currentWaitedRequests.keySet())
+        Enumeration keys = currentWaitedRequests.keys();
+        while (keys.hasMoreElements())
         {
+            Object notifier = keys.nextElement();
             synchronized (notifier)
             {
                 notifier.notifyAll(); // Break any current waits.


Mime
View raw message