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 179854 Details for
Bug 326458
NPE when removing an EAR reference with no archiveName attribute defined
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]
Updated Patch
NPE when removing reference with no ArchiveName - Sept 29 2010 10am.patch (text/plain), 2.93 KB, created by
Aidyl Kareh
on 2010-09-29 10:44:09 EDT
(
hide
)
Description:
Updated Patch
Filename:
MIME Type:
Creator:
Aidyl Kareh
Created:
2010-09-29 10:44:09 EDT
Size:
2.93 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jst.j2ee >Index: earproject/org/eclipse/jst/j2ee/application/internal/operations/RemoveComponentFromEnterpriseApplicationOperation.java >=================================================================== >RCS file: /cvsroot/webtools/jeetools/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/RemoveComponentFromEnterpriseApplicationOperation.java,v >retrieving revision 1.23 >diff -u -r1.23 RemoveComponentFromEnterpriseApplicationOperation.java >--- earproject/org/eclipse/jst/j2ee/application/internal/operations/RemoveComponentFromEnterpriseApplicationOperation.java 10 Aug 2010 21:23:58 -0000 1.23 >+++ earproject/org/eclipse/jst/j2ee/application/internal/operations/RemoveComponentFromEnterpriseApplicationOperation.java 29 Sep 2010 14:13:34 -0000 >@@ -16,7 +16,6 @@ > import org.eclipse.core.resources.IFile; > import org.eclipse.core.runtime.CoreException; > import org.eclipse.core.runtime.IAdaptable; >-import org.eclipse.core.runtime.IPath; > import org.eclipse.core.runtime.IProgressMonitor; > import org.eclipse.core.runtime.IStatus; > import org.eclipse.core.runtime.Path; >@@ -99,15 +98,7 @@ > } > > if(moduleURI != null) { >- IPath path1 = new Path(ref.getArchiveName()); >- IPath path2 = new Path(moduleURI); >- boolean removed = false; >- if(path1.lastSegment().equals(path2.lastSegment())) { >- if(removeModule(application, module)){ >- removed = true; >- } >- } >- if(!removed) { >+ if(!removeModule(application, module)){ > module = null; > moduleURI = null; > } >@@ -116,7 +107,7 @@ > } > > if(module == null) { >- if(ref != null) >+ if(ref != null && ref.getArchiveName() != null) > module = getModuleFromURI(earModel, ref.getArchiveName()); > else { > String uri = getModuleURI(earModel, wc); >@@ -200,6 +191,17 @@ > protected Object getModule(final IEARModelProvider earModel, final ReferencedComponent refComp) { > Object app = earModel.getModelObject(); > Object moduleObj = refComp.getDependentObject(); >+ if(moduleObj != null){ >+ String id = null; >+ if(moduleObj instanceof org.eclipse.jst.j2ee.application.internal.impl.ModuleImpl) { >+ id = ((org.eclipse.jst.j2ee.application.internal.impl.ModuleImpl)moduleObj).getId(); >+ } else if (moduleObj instanceof ModuleImpl) { >+ id = ((Module)moduleObj).getId(); >+ } >+ if(id == null || id.length() == 0) { >+ return null; >+ } >+ } > if(app instanceof Application){ > List<Module> modules = ((Application)app).getModules(); > if(moduleObj != null){ >@@ -228,7 +230,7 @@ > } > } > } >- return moduleObj; >+ return null; > } > > protected Object getModuleFromURI(final IEARModelProvider earModel, String uri) {
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 326458
:
179789
| 179854