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 15935 - Strange problem with serialization of HashMap
Summary: Strange problem with serialization of HashMap
Status: CLOSED INVALID
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P2 blocker (vote)
Assignee: anovak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-09-26 15:31 UTC by Petr Suchomel
Modified: 2008-12-22 17:51 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
a test case that demonstrate this (1.48 KB, text/plain)
2001-10-01 09:28 UTC, anovak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Suchomel 2001-09-26 15:31:51 UTC
Copied from mail

I think I had a similar problem with List in systemoptions. What seemed 
to fix the problem for me, was to firePropertyChanged afte the 
putProperty method...

Milos

Petr Suchomel wrote:

>I have r/w property in SystemOption, which type is HashMap.
>This type seem not to be serialized any more, although if map == null I do
>reinit, after restart of NB, when I ask for value, this value is again null.
>(This is only test example)
>
>    public java.util.HashMap getFileSystemSettings(){
>        java.util.HashMap map  =
>java.util.HashMap)getProperty( PROP_FS_SETTING );
>        if( map != null ){
>            System.err.println("Getting map size " + map.size());
>        }
>        else{
>            System.err.println("Getting map size null");
>            map = new java.util.HashMap();
>            map.put("test", "test");
>            setFileSystemSettings( map );
>        }
>        return map;
>    }
>
>    public void setFileSystemSettings(java.util.HashMap map){
>        putProperty( PROP_FS_SETTING, map, true );
>    }
>
>Petr
>
Comment 1 Jan Zajicek 2001-09-27 12:44:39 UTC
Passing to Ales, if he will take it.
Comment 2 anovak 2001-10-01 09:28:14 UTC
Created attachment 2768 [details]
a test case that demonstrate this
Comment 3 anovak 2001-10-01 09:31:08 UTC
Since the submitter have not entered more information, I suspect
(after exploring SystemOption.writeExternal()) that PROP_FS_SETTING is
not present in PropertyDescriptors of related BeanInfo.
Comment 4 Quality Engineering 2003-07-01 15:46:11 UTC
Resolved for 3.4.x or earlier, no new info since then -> verified.

Comment 5 Quality Engineering 2003-07-01 16:12:06 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.