[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] import of super class required ?

This is related to JDT bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=122915

Summary: there are cases where the compiler is more strict than the OSGi runtime and there are other cases where the OSGi runtime is more strict than the compiler (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=122915#c14 for details).

Tom



Inactive hide details for "Tom Huybrechts" ---09/22/2007 05:08:48 PM---Hi all,"Tom Huybrechts" ---09/22/2007 05:08:48 PM---Hi all,

          "Tom Huybrechts" <tom.huybrechts@xxxxxxxxx>
          Sent by: equinox-dev-bounces@xxxxxxxxxxx

          09/22/2007 05:08 PM

          Please respond to
          Equinox development mailing list <equinox-dev@xxxxxxxxxxx>

To

"Equinox development mailing list" <equinox-dev@xxxxxxxxxxx>

cc


Subject

[equinox-dev] import of super class required ?

Hi all,

I have a class visibility problem I don't understand.

Suppose I have bundle A with classes A and B, and bundle C with class C.

bundle A (exports packages A and B)

package a;
public class A extends b.B { }

package b;
public class B {
public void method() { }
}


bundle C: (imports only package a)

package c:
public class C {
  public C() {
     new A().method();
}



C calls a method from a super class of A with it cannot see. My guess
was that this should not be possible. And indeed, it doesn't even
compile with PDE. But if I make it compile (e.g. add bundle A to the
'automated management of dependencies') then it also works at runtime!

Am I missing something here ?

Tom
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev

GIF image

GIF image

GIF image