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

Regression: Java Constructors no longer validate #1061

Open
F43nd1r opened this issue Aug 11, 2022 · 7 comments
Open

Regression: Java Constructors no longer validate #1061

F43nd1r opened this issue Aug 11, 2022 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@F43nd1r
Copy link

F43nd1r commented Aug 11, 2022

The constructor of the following type no longer validates in 1.7 versions

    @ApplicationCommand
    @Value
    public class ListData {
        @NonNull ScPuzzle puzzle;

        public ListData(ScPuzzle puzzle) {
            this.puzzle = puzzle;
        }
    }

Last known working version: 1.6.21-1.0.5
Debugging into the processor shows that the constructor return type as well as parameter types are error types in this case.

Kotlin classes with the same annotation validate without issue.

Possibly related issues: #961, #489

@neetopia
Copy link
Collaborator

neetopia commented Sep 9, 2022

this looks to be like an issue similar to what #1049 is trying to fix, and we've published a snapshot build containing that fix, can you verify if it solves your issue?

@F43nd1r
Copy link
Author

F43nd1r commented Sep 9, 2022

Tested with 1.7.20-Beta-1.0.7-SNAPSHOT, I assume that is the mentioned snapshot? Did not fix the issue.

@neetopia neetopia self-assigned this Sep 9, 2022
@neetopia neetopia added the bug Something isn't working label Sep 9, 2022
@neetopia neetopia added this to the 1.0.7 milestone Sep 9, 2022
@neetopia
Copy link
Collaborator

can you give a full picture of your code? I tried following test case on my side and it validates normally.

// FILE: ListJava.java

public class ListJava {
    String str;

    public ListJava(String s) {
        this.str = s;
    }
}

listJava.getConstructors().forEach { validate(it) } returns true for me.

@F43nd1r
Copy link
Author

F43nd1r commented Sep 12, 2022

@neetopia
Copy link
Collaborator

I am more interested in the actual workload, the logic that fails is same as mine, so I doubt it is the workload that causes failure, as I see in your sample above there is a ScPuzzle in the constructor parameter which is what I can't reproduce on my side without more context.

@ting-yuan ting-yuan removed this from the 1.0.7 milestone Oct 12, 2022
@ting-yuan
Copy link
Collaborator

I cannot reproduce as well. Since the reporter isn't blocked on this, I'm removing it from the milestone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants