This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 123590 - FacesDesignProperty objects retain redundant Boolean instances
Summary: FacesDesignProperty objects retain redundant Boolean instances
Status: NEW
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: _ sandipchitale
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-06 19:45 UTC by Quy Nguyen
Modified: 2007-12-07 18:32 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Quy Nguyen 2007-12-06 19:45:19 UTC
From the HeapWalker analysis of a heap dump, FacesDesignProperty objects seem to hold onto redundant objects of type
Boolean in the 'initialValue' field.  There should only be two instances of Boolean (Boolean.TRUE and Boolean.FALSE). 
This is a minor waste of memory.
Comment 1 _ sandipchitale 2007-12-06 23:21:27 UTC
I think this is because that value is used as a key in the hashtable...not sure though. 
Comment 2 Quy Nguyen 2007-12-06 23:48:31 UTC
That shouldn't make a difference, since Boolean.hashCode() only has two possible return values, based on whether the
object represents true or false (see hashCode() javadoc for the Boolean class).
Comment 3 _ sandipchitale 2007-12-07 18:32:42 UTC
You are right. I meant to say that the == is used somewhere to detect distinct values. I need to check on it.