Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 325894

Summary: Protect EARUtilities.getJ2EEModuleReferences from NPE
Product: [WebTools] WTP Java EE Tools Reporter: Jason Sholl <jsholl>
Component: jst.j2eeAssignee: Jason Sholl <jsholl>
Status: RESOLVED FIXED QA Contact: Chuck Bridgham <cbridgha>
Severity: normal    
Priority: P3 CC: ccc
Version: 3.2Flags: cbridgha: review+
Target Milestone: 3.2.2 P   
Hardware: PC   
OS: Windows Server 2003   
Whiteboard:
Attachments:
Description Flags
patch none

Description Jason Sholl CLA 2010-09-21 14:53:29 EDT
Slight change in behavior from previous versions is now causing the following NPE:

java.lang.NullPointerException
      at org.eclipse.jst.j2ee.project.EarUtilities.getEARLibDir(EarUtilities.java:413)
      at org.eclipse.jst.j2ee.project.EarUtilities.getJ2EEModuleReferences(EarUtilities.java:86)
Comment 1 Jason Sholl CLA 2010-09-21 14:57:43 EDT
Created attachment 179335 [details]
patch

Protects against above NPE, and all others, and also updates javadoc.  No change in behavior.
Comment 2 Chuck Bridgham CLA 2010-09-29 10:13:28 EDT
approved
Comment 3 Jason Sholl CLA 2010-09-29 12:16:39 EDT
code checked into 32M and HEAD for WTP 3.2.3 and 3.3 respectively.
Comment 4 Carl Anderson CLA 2010-10-04 14:35:14 EDT
Committed to R3_2_2_patches