Author: nextgens
Date: 2008-01-18 17:11:00 +0000 (Fri, 18 Jan 2008)
New Revision: 17153

Modified:
   trunk/apps/Thaw/src/thaw/plugins/index/Comment.java
Log:
Thaw: get rid of redundant checks

Modified: trunk/apps/Thaw/src/thaw/plugins/index/Comment.java
===================================================================
--- trunk/apps/Thaw/src/thaw/plugins/index/Comment.java 2008-01-18 16:05:47 UTC 
(rev 17152)
+++ trunk/apps/Thaw/src/thaw/plugins/index/Comment.java 2008-01-18 17:11:00 UTC 
(rev 17153)
@@ -796,10 +796,12 @@

        public void update(Observable o, Object param) {
                if (o instanceof FCPTransferQuery) {
-                       if (((FCPTransferQuery)o).isFinished()) {
-                               o.deleteObserver(this);
-                               ((FCPTransferQuery)o).stop(queueManager);
-                               queueManager.remove((FCPTransferQuery)o);
+                       FCPTransferQuery query = (FCPTransferQuery)o;
+                       
+                       if (query.isFinished()) {
+                               query.deleteObserver(this);
+                               query.stop(queueManager);
+                               queueManager.remove(query);
                        }

                        if (o instanceof FCPClientPut) {
@@ -852,13 +854,6 @@
                        }

                }
-
-               if (o instanceof FCPTransferQuery) {
-                       FCPTransferQuery q = (FCPTransferQuery)o;
-
-                       if (q.isFinished() && q.isSuccessful() && q instanceof 
Observable)
-                               ((Observable)q).deleteObserver(this);
-               }
        }




Reply via email to