dependency-analysis-gradle-plugin icon indicating copy to clipboard operation
dependency-analysis-gradle-plugin copied to clipboard

public final methods in package private abstract superclasses are not in abi-dump.txt

Open jnehlmeier opened this issue 4 years ago • 1 comments
trafficstars

Plugin version

0.75.0

Gradle version

7.1.1

Describe the bug

Package private abstract classes with public final methods are not in the abi-dump.txt file and thus likely not considered during analysis. Given that public sub classes can make the public final method of the package private abstract class accessible, this should be considered.

To Reproduce


// Base is not public but Base.compute/computeFinal() is
abstract class Base {

  public int compute() {
    return 0;
  }

  // not part of abi ?!
  public final int computeFinal() {
    return 0;
  }

}

// Calc makes Base.compute/computeFinal() accessible to anyone.
public class Calc extends Base {

}

Results in abi-dump.txt:

public class some/package/Calc {
	public fun <init> ()V
	public synthetic fun compute ()I
}

Expected behavior Both methods should be part of the abi-dump.

jnehlmeier avatar Aug 03 '21 11:08 jnehlmeier

Thanks for the report.

autonomousapps avatar Aug 09 '21 06:08 autonomousapps