[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: opp bug?
I'm sorry, I've misread the source. But something is causing a ClassCastException in the proxy...
andy
On Saturday, December 9, 2000, at 07:25 PM, Andreas Monitzer wrote:
> Hi!
>
> I'm trying to create a rather big project (a newsreader) using ozone. But I've
> encountered something I think classifies as a (serious) bug.
> I'm using the following code in a database object implementation
> (m_ngGroups.getGroups() returns a org.ozoneDB.DxLib.DxHashMap):
>
> public Collection getGroups() throws Exception {
> return m_ngGroups.getGroups().internalHashtable().values();
> }
>
> The proxy that is generated looks like this:
>
> public java.util.Collection getGroups () throws java.lang.Exception {
> try {
> Object target = link.fetch (this, Lock.LEVEL_WRITE);
> if (target != null) {
> return (java.util.Collection)ResultConverter.substituteOzoneCompatibles
> (((bbnet.communication.NewsServerImpl)target).getGroups());
> }
> else {
> Object[] args = {};
> Object result = link.invoke (this, 7, args, Lock.LEVEL_WRITE);
> return (java.util.Collection)result;
> }
> }
> catch (java.lang.Exception e) {
> e.fillInStackTrace();
> throw e;
> }
> }
>
> But the first "return"-line is wrong. '.internalHashtable().values()' is missing,
> so the return type isn't java.util.Collection and a ClassCastException is raised.
> It's easy to work around this problem by by using a local variable, but I've encountered
> the same problem at another piece of code and can't find the part that opp doesn't like.
>
> Either way, I'm very impressed about this database, keep up the good work!
>
> andy
>
>
> --
> Description forthcoming.
>
>
--
Description forthcoming.