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 158765 Details for
Bug 302487
WST server discovery service lookup problem
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]
Potential fix
patch.txt (text/plain), 1.64 KB, created by
John Arthorne
on 2010-02-10 14:42:24 EST
(
hide
)
Description:
Potential fix
Filename:
MIME Type:
Creator:
John Arthorne
Created:
2010-02-10 14:42:24 EST
Size:
1.64 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.wst.server.discovery >Index: src/org/eclipse/wst/server/discovery/internal/ExtensionUtility.java >=================================================================== >RCS file: /cvsroot/webtools/servertools/plugins/org.eclipse.wst.server.discovery/src/org/eclipse/wst/server/discovery/internal/ExtensionUtility.java,v >retrieving revision 1.7 >diff -u -r1.7 ExtensionUtility.java >--- src/org/eclipse/wst/server/discovery/internal/ExtensionUtility.java 20 Jan 2010 15:27:33 -0000 1.7 >+++ src/org/eclipse/wst/server/discovery/internal/ExtensionUtility.java 10 Feb 2010 19:42:05 -0000 >@@ -14,6 +14,7 @@ > import java.net.URL; > import java.util.*; > import org.eclipse.core.runtime.*; >+import org.eclipse.equinox.p2.core.IProvisioningAgent; > import org.eclipse.equinox.p2.engine.IProfile; > import org.eclipse.equinox.p2.engine.IProfileRegistry; > import org.eclipse.equinox.p2.metadata.IInstallableUnit; >@@ -240,11 +241,16 @@ > public static Object getService(BundleContext context, String name) { > if (context == null) > return null; >- ServiceReference reference = context.getServiceReference(name); >+ ServiceReference reference = context.getServiceReference(IProvisioningAgent.SERVICE_NAME); > if (reference == null) > return null; >- Object result = context.getService(reference); >- context.ungetService(reference); >- return result; >+ IProvisioningAgent result = (IProvisioningAgent) context.getService(reference); >+ if (result == null) >+ return null; >+ try { >+ return result.getService(name); >+ } finally { >+ context.ungetService(reference); >+ } > } > } >\ No newline at end of file
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 302487
: 158765 |
160182