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




                                                                       
             "Tom Huybrechts"                                          
             <[EMAIL PROTECTED]                                         
             mail.com>                                                  To
             Sent by:                  "Equinox development mailing list"
             equinox-dev-bounc         <equinox-dev@eclipse.org>       
             [EMAIL PROTECTED]                                             cc
                                                                       
                                                                   Subject
             09/22/2007 05:08          [equinox-dev] import of super class
             PM                        required ?                      
                                                                       
                                                                       
             Please respond to                                         
                  Equinox                                              
                development                                            
               mailing list                                            
             <[EMAIL PROTECTED]                                         
                 pse.org>                                              
                                                                       
                                                                       




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@eclipse.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev

<<inline: graycol.gif>>

<<inline: pic16389.gif>>

<<inline: ecblank.gif>>

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

Reply via email to