MobiVM / robovm

Ahead of time compiler for JVM bytecode targetting iOS, Mac OSX and Linux
https://mobivm.github.io
967 stars 133 forks source link

Limited support for JEP181 Nestbased access control #653

Closed dkimitsa closed 1 year ago

dkimitsa commented 2 years ago

Description

this implements nest based access control as specified in JEP181. This is reproducible with Java11 class files. Sample to reproduce:

public class Test {
    private int a;
    public void foo() {
        DispatchQueue.getMainQueue().async(new Runnable() {
            @Override
            public void run() {
                System.out.println(a);
            }
        });
    }
}

Gradle settings:

sourceCompatibility = 11
targetCompatibility = 11

also fixes https://github.com/MobiVM/robovm/issues/652

limitations

it covers only compilation time access control. Runtime (reflection one) is not covered.

soot to be updated

https://github.com/MobiVM/soot/pull/3/files

Tom-Ski commented 2 years ago

Soot was released on 2.5.0-9 version