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 201683 Details for
Bug 352887
[JAXRS] JAXRSFacetInstallDataModelProvider dispose method does not remove all listeners it adds
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]
Apply to org.eclipse.jst.ws.jaxrs.core
bug352887-patch.txt (text/plain), 3.95 KB, created by
Keith Chong
on 2011-08-17 22:35:32 EDT
(
hide
)
Description:
Apply to org.eclipse.jst.ws.jaxrs.core
Filename:
MIME Type:
Creator:
Keith Chong
Created:
2011-08-17 22:35:32 EDT
Size:
3.95 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jst.ws.jaxrs.core >Index: src/org/eclipse/jst/ws/jaxrs/core/internal/project/facet/JAXRSFacetInstallDataModelProvider.java >=================================================================== >RCS file: /cvsroot/webtools/webservices/plugins/org.eclipse.jst.ws.jaxrs.core/src/org/eclipse/jst/ws/jaxrs/core/internal/project/facet/JAXRSFacetInstallDataModelProvider.java,v >retrieving revision 1.8 >diff -u -r1.8 JAXRSFacetInstallDataModelProvider.java >--- src/org/eclipse/jst/ws/jaxrs/core/internal/project/facet/JAXRSFacetInstallDataModelProvider.java 19 May 2010 19:54:38 -0000 1.8 >+++ src/org/eclipse/jst/ws/jaxrs/core/internal/project/facet/JAXRSFacetInstallDataModelProvider.java 18 Aug 2011 02:33:58 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2009, 2010 IBM Corporation and others. >+ * Copyright (c) 2009, 2011 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -15,6 +15,7 @@ > * 20100407 308401 ericdp@ca.ibm.com - Eric D. Peters, JAX-RS facet wizard page - Shared-library option should be disabled > * 20100413 307552 ericdp@ca.ibm.com - Eric D. Peters, JAX-RS and Java EE 6 setup is incorrect > * 20100519 313576 ericdp@ca.ibm.com - Eric D. Peters, JAX-RS tools- validation problems >+ * 20110817 352887 kchong@ca.ibm.com - Keith Chong, [JAXRS] JAXRSFacetInstallDataModelProvider dispose method does not remove all listeners it adds > *******************************************************************************/ > package org.eclipse.jst.ws.jaxrs.core.internal.project.facet; > >@@ -51,6 +52,7 @@ > > private String errorMessage; > private LibraryInstallDelegate libraryInstallDelegate = null; >+ private IPropertyChangeListener propertyChangeListener = null; > > @SuppressWarnings("unchecked") > public Set<String> getPropertyNames() { >@@ -152,26 +154,33 @@ > if( this.libraryInstallDelegate == null && fpjwc != null && fv != null ) > { > this.libraryInstallDelegate = new LibraryInstallDelegate( fpjwc, fv ); >- >- this.libraryInstallDelegate.addListener >- ( >- new IPropertyChangeListener() >+ this.propertyChangeListener = new IPropertyChangeListener() >+ { >+ public void propertyChanged( final String property, >+ final Object oldValue, >+ final Object newValue ) > { >- public void propertyChanged( final String property, >- final Object oldValue, >- final Object newValue ) >+ final IDataModel dm = getDataModel(); >+ >+ if( dm != null ) > { >- final IDataModel dm = getDataModel(); >- >- if( dm != null ) >- { >- dm.notifyPropertyChange( LIBRARY_PROVIDER_DELEGATE, IDataModel.VALUE_CHG ); >- } >+ dm.notifyPropertyChange( LIBRARY_PROVIDER_DELEGATE, IDataModel.VALUE_CHG ); > } > } >- ); >+ }; >+ this.libraryInstallDelegate.addListener(propertyChangeListener); > } > } >+ >+ @SuppressWarnings("restriction") >+ public void dispose() >+ { >+ if (this.libraryInstallDelegate != null) >+ { >+ this.libraryInstallDelegate.removeListener(propertyChangeListener); >+ } >+ super.dispose(); // empty >+ } > > private IStatus createErrorStatus(String msg) { > return new Status(IStatus.ERROR, JAXRSCorePlugin.PLUGIN_ID, msg);
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 352887
: 201683