(no subject)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

(no subject)

Anand Chitipothu

hi,

I found a bug!

public methods of a package private class are not accessible through  
its public subclass. This happens both in 2.1 and 2.2a1 versions.

// package private class
class A {
     public void f() {
     System.out.println("f");
     }
}

// public class extending from a package private class
public class B extends A {
     public void g() {
     System.out.println("g");
     }
}

This is the output i got when i tried to access in jython.

     >>> import B
     >>> dir(B)
     ['g']
     >>> b = B()
     >>> b.g()
     g
     >>> b.f()
     Traceback (innermost last):
       File "<console>", line 1, in ?
     AttributeError: 'javainstance' object has no attribute 'f'

     # but there are available in java.
     >>> for m in B.getMethods(): print m.getName()
     g
     f
     hashCode
     getClass
     wait
     wait
     wait
     equals
     notify
     notifyAll
     toString


Shall i submit this a bug in the project page.
can try to debug this??

- anand


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Jython-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-dev
Reply | Threaded
Open this post in threaded view
|

Re: (no subject)

fwierzbicki@gmail.com

Shall i submit this a bug in the project page.

Please do.

can try to debug this??

Even better!

- anand

Thanks,
Frank