thanks for the test case. i've added roughly this test to an existing AOSP 
fix from Sooin Im, and merged the change: 
https://android-review.googlesource.com/#/c/32480/

in future, though, report dalvik bugs at http://b.android.com/ instead of 
relying on Romain Guy forwarding them to me :-)

On Saturday, July 7, 2012 2:56:56 PM UTC-7, G. Blake Meike wrote:
>
> I'd say you've got yourself a bug.  Very nice work.  This code, run first 
> under java 6, then under Android, confirms it for me:
>
>
> package net.callmeike.sandbox.p1;
>
> public class BaseClass {
>     public void run() { callFoo(); }
>
>     void foo() { System.out.println("P1 foo: " + this); }
>
>     private void callFoo() { foo(); }
> }
>
>
> package net.callmeike.sandbox.p2;
> import net.callmeike.sandbox.p1.BaseClass;
>
> public class SubClass extends BaseClass {
>     void foo() { System.out.println("P2 foo: " + this); }
> }
>
>
> /* Run on Android */
> package net.callmeike.android.sandbox;
>
> import android.os.Bundle;
> import android.app.Activity;
> import net.callmeike.sandbox.p2.SubClass;
>
> public class SandboxActivity extends Activity {
>
>     @Override
>     public void onCreate(Bundle savedInstanceState) {
>         super.onCreate(savedInstanceState);
>
>         SubClass obj = new SubClass();
>         System.out.println("onCreate with: " + obj);
>         obj.run();
>     }
> }
>
> LOGCAT OUTPUT
> 07-07 14:46:57.141: I/System.out(1029): onCreate with: 
> net.callmeike.sandbox.p2.SubClass@411ed330
> 07-07 14:46:57.141: I/System.out(1029): P2 foo: 
> net.callmeike.sandbox.p2.SubClass@411ed330
> 07-07 14:46:57.500: D/gralloc_goldfish(1029): Emulator without GPU 
> emulation detected.
>
>
> /* Run under Java 6 */
> package net.callmeike.sandbox;
> import net.callmeike.sandbox.p2.SubClass;
>
> public class Bug {
>     public static void main(String[] args) {
>         SubClass obj = new SubClass();
>         System.out.println("main with: " + obj);
>         obj.run();
>     }
> }
>
> CONSOLE OUTPUT
> main with: net.callmeike.sandbox.p2.SubClass@17dfafd1
> P1 foo: net.callmeike.sandbox.p2.SubClass@17dfafd1
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to