-
Notifications
You must be signed in to change notification settings - Fork 446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Method reference to protected method in base class in other package fails with IllegalAccessError #227
Comments
For me version |
See #219 |
Should be fixed by |
I still experience this in Android // the lamnda declaration
measureCallback = this::setMeasuredDimension; This is the (cleaned up) error I get at runtime:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
classpath 'me.tatarka:gradle-retrolambda:3.6.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
apply plugin: 'com.android.library'
apply plugin: 'me.tatarka.retrolambda'
android {
// redacted
} |
I'm experiencing this exact issue using 3.5.0. IllegalAccessError when referencing a protected method from the base class which is located in another package. |
I'm experiencing this in 3.6.0 too. |
I am also seeing this. :( |
I have this issue with 3.6.1 too. |
I have this in 3.7.0 |
I think, i located problem (if author did not do this earlier). public class BaseClass {
protected void someAction() { }
}
public class Subclass extends BaseClass {
public void runSomeAction() {
final Runnable runnable = this::someAction;
runnable.run();
}
} After clean run i have this generated class: final class Subclass$$Lambda$1 implements Runnable {
private final Subclass arg$1;
private Subclass$$Lambda$1(Subclass var1) {
this.arg$1 = var1;
}
public void run() {
Subclass.access$lambda$0(this.arg$1);
}
public static Runnable lambdaFactory$(Subclass var0) {
return new Subclass$$Lambda$1(var0);
}
} All works good. But after making any changes in final class Subclass$$Lambda$1 implements Runnable {
private final Subclass arg$1;
private Subclass$$Lambda$1(Subclass var1) {
this.arg$1 = var1;
}
public void run() {
this.arg$1.someAction();
}
public static Runnable lambdaFactory$(Subclass var0) {
return new Subclass$$Lambda$1(var0);
}
} And |
Hi.
Same issue as it was here: luontola/retrolambda#89
I'm using RxJava and subscribe method.
.subscribe(aBoolean -> {}, throwable -> doOnError(throwable)) - working
.subscribe(aBoolean -> {}, this::doOnError) - NOT working
using "me.tatarka:gradle-retrolambda:3.2.4"
The text was updated successfully, but these errors were encountered: