You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by bu...@apache.org on 2007/04/25 04:15:55 UTC

DO NOT REPLY [Bug 42228] New: - removeListener does not decrement counter n

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42228>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42228

           Summary: removeListener does not decrement counter n
           Product: Batik
           Version: 1.7
          Platform: All
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: SVG DOM
        AssignedTo: batik-dev@xmlgraphics.apache.org
        ReportedBy: hajime-n@reso.co.jp


org.apache.batik.dom.events.EventListenerList#removeListener

if not head. and found listner, we can't return at

-----
 // Listener not present.
 return;
-----

we must decrement counter "n" after remove listener
for keep EventListenerList proper condition.

(if n is not correct, EventSupport#fireEventListeners outputs Exception. )

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 42228] - removeListener does not decrement counter n

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42228>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42228


info@dvholten.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 42228] - removeListener does not decrement counter n

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42228>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42228





------- Additional Comments From hajime-n@reso.co.jp  2007-04-24 19:41 -------
Index: C:/MyJob/work/ext/xml-
batik/sources/org/apache/batik/dom/events/EventListenerList.java
===================================================================
--- C:/MyJob/work/ext/xml-
batik/sources/org/apache/batik/dom/events/EventListenerList.java
	(revision 532165)
+++ C:/MyJob/work/ext/xml-
batik/sources/org/apache/batik/dom/events/EventListenerList.java
	(working copy)
@@ -91,18 +91,21 @@
                 && listener == head.listener) {
             head = head.next;
         } else {
+        	boolean bFound = false;
             Entry prev = head;
             for (Entry e = head.next; e != null; e = e.next) {
                 if ((namespaceURI != null && namespaceURI.equals
(e.namespaceURI)
                             || namespaceURI == null && e.namespaceURI == null)
                         && e.listener == listener) {
                     prev.next = e.next;
+                    bFound = true;
                     break;
                 }
                 prev = e;
             }
             // Listener not present.
-            return;
+            if(!bFound)
+            	return;
         }
         counts.dec(namespaceURI);
         n--;


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 42228] - removeListener does not decrement counter n

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42228>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42228


cam@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From cam@apache.org  2007-09-26 16:52 -------
Fixed in SVN now, thanks!

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org