|
From: Anand C. <str...@gm...> - 2005-10-18 12:53:05
|
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
|