Bug 343558

Summary: JEM needs to handle a flush better
Product: [WebTools] WTP Java EE Tools Reporter: Carl Anderson <ccc>
Component: jst.jemAssignee: Carl Anderson <ccc>
Status: RESOLVED FIXED QA Contact: Chuck Bridgham <cbridgha>
Severity: major    
Priority: P2 Flags: cbridgha: review+
Version: 1.5.5   
Target Milestone: 1.5.5 P   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 343559, 343562    
Attachments:
Description Flags
Keep the current Methods "valid"
none
Keep the current Methods "valid", and add a null check
none
Keep the current Methods "valid", and add a null check none

Description Carl Anderson CLA 2011-04-21 10:38:15 EDT
Currently, if JEM is gathering (or has gathered) the Methods from a (JEM) JavaClass, and a flush() occurs, the Methods are removed from their parents and are invalid, resulting in NPEs and other errors without any warning.

There are things we can do, such as replacing the parent JavaClass with a JavaClassRef, that will at least keep the current Methods useful, while still allowing the flush to proceed.
Comment 1 Carl Anderson CLA 2011-04-21 10:41:21 EDT
Created attachment 193836 [details]
Keep the current Methods "valid"
Comment 2 Carl Anderson CLA 2011-04-21 10:43:21 EDT
This is causing (intermittent) major problems, including unnecessary termination, of various "headless" utilities based on WTP.
Comment 3 Chuck Bridgham CLA 2011-04-22 09:48:48 EDT
approved
Comment 4 Carl Anderson CLA 2011-06-03 10:15:34 EDT
Created attachment 197303 [details]
Keep the current Methods "valid", and add a null check
Comment 5 Carl Anderson CLA 2011-06-03 10:21:56 EDT
Created attachment 197305 [details]
Keep the current Methods "valid", and add a null check

Removed extraneous (and accidentally included) System.out.println() calls.
Comment 6 Carl Anderson CLA 2011-08-05 16:13:35 EDT
Committed to R1_5_5_patches