Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 47796 Details for
Bug 149863
BundleContextImpl has unsync'ed access to EventListeners.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
new patch
149863_org.eclipse.osgi.patch (text/plain), 3.13 KB, created by
Thomas Watson
on 2006-08-11 15:47:02 EDT
(
hide
)
Description:
new patch
Filename:
MIME Type:
Creator:
Thomas Watson
Created:
2006-08-11 15:47:02 EDT
Size:
3.13 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.osgi >Index: core/framework/org/eclipse/osgi/framework/internal/core/BundleContextImpl.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/BundleContextImpl.java,v >retrieving revision 1.23 >diff -u -r1.23 BundleContextImpl.java >--- core/framework/org/eclipse/osgi/framework/internal/core/BundleContextImpl.java 21 Jun 2006 03:41:01 -0000 1.23 >+++ core/framework/org/eclipse/osgi/framework/internal/core/BundleContextImpl.java 11 Aug 2006 19:35:51 -0000 >@@ -348,9 +348,13 @@ > Debug.println("removeServiceListener[" + bundle + "](" + listenerName + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ > } > >- if (serviceEvent != null) { >- synchronized (framework.serviceEvent) { >+ synchronized (framework.serviceEvent) { >+ if (serviceEvent != null) { > serviceEvent.removeListener(listener); >+ if(serviceEvent.getSize()==0){ >+ serviceEvent = null; >+ framework.serviceEvent.removeListener(this); >+ } > } > } > } >@@ -423,15 +427,23 @@ > if (listener instanceof SynchronousBundleListener) { > framework.checkAdminPermission(getBundle(), AdminPermission.LISTENER); > >- if (bundleEventSync != null) { >- synchronized (framework.bundleEventSync) { >+ synchronized (framework.bundleEventSync) { >+ if (bundleEventSync != null) { > bundleEventSync.removeListener(listener); >+ if(bundleEventSync.getSize() == 0) { >+ bundleEventSync = null; >+ framework.bundleEventSync.removeListener(this); >+ } > } > } > } else { >- if (bundleEvent != null) { >- synchronized (framework.bundleEvent) { >+ synchronized (framework.bundleEvent) { >+ if (bundleEvent != null) { > bundleEvent.removeListener(listener); >+ if (bundleEvent.getSize() == 0) { >+ bundleEvent = null; >+ framework.bundleEvent.removeListener(this); >+ } > } > } > } >@@ -489,9 +501,13 @@ > Debug.println("removeFrameworkListener[" + bundle + "](" + listenerName + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ > } > >- if (frameworkEvent != null) { >- synchronized (framework.frameworkEvent) { >+ synchronized (framework.frameworkEvent) { >+ if (frameworkEvent != null) { > frameworkEvent.removeListener(listener); >+ if(frameworkEvent.getSize()==0){ >+ frameworkEvent = null; >+ framework.frameworkEvent.removeListener(this); >+ } > } > } > } >Index: core/framework/org/eclipse/osgi/framework/eventmgr/EventListeners.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/eventmgr/EventListeners.java,v >retrieving revision 1.9 >diff -u -r1.9 EventListeners.java >--- core/framework/org/eclipse/osgi/framework/eventmgr/EventListeners.java 10 May 2006 16:17:28 -0000 1.9 >+++ core/framework/org/eclipse/osgi/framework/eventmgr/EventListeners.java 11 Aug 2006 19:35:51 -0000 >@@ -231,4 +231,8 @@ > this.companion = companion; > } > } >+ >+ public synchronized int getSize() { >+ return size; >+ } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 149863
:
45857
| 47796 |
48040
|
48041