[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Collection-problem [Re: opp bug?]



On Sun, 10 Dec 2000, Andreas Monitzer wrote:
> On Sunday, December 10, 2000, at 12:48 AM, Don Berendsen wrote:
> 
> > Falko, 
> >  
> > Is this a case where HashTable.values() returns an inner class as happens  
> > with java.util.HashMap?
> 
> Yes, it's a java.util.Collection$SynchronizedCollection
> 
> > In my application I wasn't able to return the  
> > results of values() or keys() when using a HashMap. I got around this by  
> > putting the map in a variable and using 
> >  
> > public Collection values(){ 
> >    return new ArrayList(map.values()); 
> > } 
> 
> Thanks. Seems like ozone doesn't like Collections (had the same problem with
> a vector). Maybe a hint in the documentation would be nice (next to the note
> that you can't use iterators/enumerations). 

Guys, serializing just an inner class (without the outer one) never works in
Java. We have to provide a solution for mentioned collection problem but in
general the problems of serializing inner classes are not caused by ozone.
The semantics of inner classes is different from C++ where this might work.

Also, I cannot state in the docs that iterators not work in ozone. This
wouldn't be true. It _is_ true that there is an architectural difference
between ordinary Java object and database objects, which causes problems when
returning ordinary iterators from database objects. But I _did_ try to explain
this in the docu already. But the developer itself is never a good docu writer.
I asked for help with this very often...


Falko
-- 
______________________________________________________________________
Falko Braeutigam                              mailto:falko@smb-tec.com
SMB GmbH                                        http://www.smb-tec.com