Skip to content
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

Avoid failed compilations caused by JDK classes without zero argument constructors #393

Closed
wants to merge 13 commits into from

Conversation

kelloggm
Copy link
Collaborator

@kelloggm kelloggm commented Feb 4, 2025

E.g., in https://github.com/plume-lib/plume-util/blob/master/src/main/java/org/plumelib/util/EntryReader.java, if all the constructors are removed, we get compilation errors of the following form:

public class EntryReader extends LineNumberReader implements Iterator<String> {
       ^
    constructor LineNumberReader.LineNumberReader(Reader) is not applicable
      (actual and formal argument lists differ in length)
    constructor LineNumberReader.LineNumberReader(Reader,int) is not applicable
      (actual and formal argument lists differ in length)
1 error

I don't actually expect this PR to move the needle on plume-util compilation numbers, because fixing this problem exposed another issue in compiling the EntryReader class mentioned above (Specimin is incorrectly assuming that private classes can be referenced outside their containing class). That's a separate issue that I'll address in a new PR.

@kelloggm kelloggm requested a review from M3CHR0M4NC3R February 4, 2025 19:55
@kelloggm
Copy link
Collaborator Author

kelloggm commented Feb 4, 2025

I've just realized that I made an error here. This PR is not yet ready to go - the script I was using to test it was checking the wrong target method (which is why I was seeing that other error). Still, the issue is probably fixable, but I'll come back to it later.

@kelloggm kelloggm closed this Feb 4, 2025
@kelloggm kelloggm reopened this Feb 4, 2025
@kelloggm
Copy link
Collaborator Author

kelloggm commented Feb 4, 2025

@M3CHR0M4NC3R this is now ready for review

@kelloggm
Copy link
Collaborator Author

kelloggm commented Feb 4, 2025

CI is failing, so this is not ready for review.

@kelloggm kelloggm closed this Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant