question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Regression: Java Constructors no longer validate

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
F43nd1rcommented, 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.

0reactions
ting-yuancommented, Oct 12, 2022

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

New to Java : Constructor error control - Stack Overflow
I'm new to Java and I'm porting one of my C++ libraries to Java as a learning experiment. This is not homework (as...
Read more >
java.net.Socket constructor throws security exception
JDK-4674826 : REGRESSION: java.net.Socket constructor throws security exception. Type: Bug; Component: core-libs; Sub-Component: java.net; Affected Version: ...
Read more >
Java Constructor - Class, Copy And Default Constructors
A constructor is defined as a block of code to initialize the class object. It is identical to the method but it is...
Read more >
Know About Parameterized Constructor In Java With Examples
In this article we will particularly look at how to initialize an object using parameterized constructors in Java.
Read more >
Can Constructors Throw Exceptions in Java - Rollbar
A simple solution is to check data and throw exceptions before doing anything else in the constructor. If this is not possible, care...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found