autonomousapps / autonomousapps/dependency-analysis-gradle-plugin

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

Open
#446 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Kotlin
Stars
2.2k
Forks
158
Avg merge
16h 25m
Merged PRs (30d)
46

Description

**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**
```java

// 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 ()V
public synthetic fun compute ()I
}
```

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

Contributor guide

Open the contributing guide

Research direction

Start with the ABI-dump generation and analysis path using the Java reproduction in the issue. Compare the dump for the package-private abstract Base class and public Calc subclass, then verify that both inherited public methods, including the final method, appear in abi-dump.txt. Done means the expected dump contains both methods.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, kotlin
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.