[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug in FastHierarchy ?
On Mon, Jul 07, 2003 at 04:39:43PM -0400, CHEN FU wrote:
> I've tried to run simple code:
>
> final FastHierarchy fh = Scene.v().getOrMakeFastHierarchy();
> Type stype = Scene.v().getRefType("java.net.SocketInputStream");
> Type ftype = Scene.v().getRefType("java.io.FileInputStream");
>
> if (fh.canStoreType(stype, ftype))
> System.out.println(stype.toString()+" can be stored into"
> +ftype.toString());
>
>
> And I got the line printed.
> Should "canStoreType" return true here?
Yes, I think this is the correct behaviour. An object of actual type
java.net.SocketInputStream can be stored into a variable of declared
type java.io.FileInputStream:
/usr/local/jdk1.3.1_01/jre/lib $ javap -classpath rt.jar java.net.SocketInputStream
Compiled from "SocketInputStream.java"
class java.net.SocketInputStream extends java.io.FileInputStream{
Ondrej
>
> BTW I'm using soot-2.0.1, jdk1.3
>
> Thanks!
>