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
FinalClass should exempt private-only constructor classes that are extended by another class in the same compilation unit #10859
Comments
Done. I'm able to reproduce this issue with JDK 8 and JDK17 on my PC. |
Vyom-Yadav
added a commit
to Vyom-Yadav/checkstyle
that referenced
this issue
Oct 21, 2021
…or classes that are extended by another class in the same compilation unit
Vyom-Yadav
added a commit
to Vyom-Yadav/checkstyle
that referenced
this issue
Oct 21, 2021
Vyom-Yadav
added a commit
to Vyom-Yadav/checkstyle
that referenced
this issue
Oct 21, 2021
…or classes that are extended by another class in the same compilation unit
Vyom-Yadav
added a commit
to Vyom-Yadav/checkstyle
that referenced
this issue
Oct 21, 2021
…or classes that are extended by another class in the same compilation unit
Vyom-Yadav
added a commit
to Vyom-Yadav/checkstyle
that referenced
this issue
Oct 21, 2021
…or classes that are extended by another class in the same compilation unit
Vyom-Yadav
added a commit
to Vyom-Yadav/checkstyle
that referenced
this issue
Oct 24, 2021
…or classes that are extended by another class in the same compilation unit
Vyom-Yadav
added a commit
to Vyom-Yadav/checkstyle
that referenced
this issue
Oct 24, 2021
…or classes that are extended by another class in the same compilation unit
Vyom-Yadav
added a commit
to Vyom-Yadav/checkstyle
that referenced
this issue
Oct 24, 2021
…or classes that are extended by another class in the same compilation unit
Vyom-Yadav
added a commit
to Vyom-Yadav/checkstyle
that referenced
this issue
Oct 24, 2021
…or classes that are extended by another class in the same compilation unit
Vyom-Yadav
added a commit
to Vyom-Yadav/checkstyle
that referenced
this issue
Oct 24, 2021
…or classes that are extended by another class in the same compilation unit
Vyom-Yadav
added a commit
to Vyom-Yadav/checkstyle
that referenced
this issue
Oct 24, 2021
…or classes that are extended by another class in the same compilation unit
@JnRouvignac , please next time report issue as we request it, without any plugin, just our CLI. |
Sorry I was a bit in a hurry. I will next time. |
Vyom-Yadav
added a commit
to Vyom-Yadav/checkstyle
that referenced
this issue
Oct 26, 2021
…or classes that are extended by another class in the same compilation unit
Vyom-Yadav
added a commit
to Vyom-Yadav/checkstyle
that referenced
this issue
Oct 26, 2021
…or classes that are extended by another class in the same compilation unit
Vyom-Yadav
added a commit
to Vyom-Yadav/checkstyle
that referenced
this issue
Oct 26, 2021
…or classes that are extended by another class in the same compilation unit
Vyom-Yadav
added a commit
to Vyom-Yadav/checkstyle
that referenced
this issue
Oct 26, 2021
…or classes that are extended by another class in the same compilation unit
Vyom-Yadav
added a commit
to Vyom-Yadav/checkstyle
that referenced
this issue
Oct 26, 2021
…or classes that are extended by another class in the same compilation unit
Vyom-Yadav
added a commit
to Vyom-Yadav/checkstyle
that referenced
this issue
Oct 26, 2021
…or classes that are extended by another class in the same compilation unit
Vyom-Yadav
added a commit
to Vyom-Yadav/checkstyle
that referenced
this issue
Oct 26, 2021
…or classes that are extended by another class in the same compilation unit
Vyom-Yadav
added a commit
to Vyom-Yadav/checkstyle
that referenced
this issue
Oct 26, 2021
…or classes that are extended by another class in the same compilation unit
Vyom-Yadav
added a commit
to Vyom-Yadav/checkstyle
that referenced
this issue
Oct 27, 2021
…or classes that are extended by another class in the same compilation unit
Vyom-Yadav
added a commit
to Vyom-Yadav/checkstyle
that referenced
this issue
Oct 28, 2021
…or classes that are extended by another class in the same compilation unit
Vyom-Yadav
added a commit
to Vyom-Yadav/checkstyle
that referenced
this issue
Oct 28, 2021
…or classes that are extended by another class in the same compilation unit
Vyom-Yadav
added a commit
to Vyom-Yadav/checkstyle
that referenced
this issue
Oct 28, 2021
…or classes that are extended by another class in the same compilation unit
Vyom-Yadav
added a commit
to Vyom-Yadav/checkstyle
that referenced
this issue
Oct 28, 2021
…or classes that are extended by another class in the same compilation unit
pbludov
added a commit
to pbludov/checkstyle
that referenced
this issue
Dec 21, 2021
pbludov
added a commit
to pbludov/checkstyle
that referenced
this issue
Dec 21, 2021
…ses that are extended by another class in the same CU
pbludov
added a commit
to pbludov/checkstyle
that referenced
this issue
Dec 21, 2021
pbludov
added a commit
to pbludov/checkstyle
that referenced
this issue
Dec 21, 2021
…ses that are extended by another class in the same CU
pbludov
added a commit
to pbludov/checkstyle
that referenced
this issue
Dec 22, 2021
pbludov
added a commit
to pbludov/checkstyle
that referenced
this issue
Dec 22, 2021
…ses that are extended by another class in the same CU
pbludov
added a commit
to pbludov/checkstyle
that referenced
this issue
Dec 22, 2021
…ses that are extended by another class in the same CU
github-actions bot
pushed a commit
to pbludov/checkstyle
that referenced
this issue
Dec 26, 2021
…ses that are extended by another class in the same CU
pbludov
added a commit
to pbludov/checkstyle
that referenced
this issue
Dec 30, 2021
pbludov
added a commit
to pbludov/checkstyle
that referenced
this issue
Dec 30, 2021
…ses that are extended by another class in the same CU
pbludov
added a commit
to pbludov/checkstyle
that referenced
this issue
Jan 1, 2022
pbludov
added a commit
to pbludov/checkstyle
that referenced
this issue
Jan 1, 2022
…ses that are extended by another class in the same CU
romani
pushed a commit
to pbludov/checkstyle
that referenced
this issue
Feb 5, 2022
romani
pushed a commit
to pbludov/checkstyle
that referenced
this issue
Feb 5, 2022
…ses that are extended by another class in the same CU
pbludov
added a commit
to pbludov/checkstyle
that referenced
this issue
Feb 7, 2022
pbludov
added a commit
to pbludov/checkstyle
that referenced
this issue
Feb 7, 2022
…ses that are extended by another class in the same CU
pbludov
added a commit
to pbludov/checkstyle
that referenced
this issue
Feb 7, 2022
…ses that are extended by another class in the same CU
pbludov
added a commit
to pbludov/checkstyle
that referenced
this issue
Feb 23, 2022
pbludov
added a commit
to pbludov/checkstyle
that referenced
this issue
Feb 23, 2022
…ses that are extended by another class in the same CU
pbludov
added a commit
to pbludov/checkstyle
that referenced
this issue
Feb 26, 2022
pbludov
added a commit
to pbludov/checkstyle
that referenced
this issue
Feb 26, 2022
…ses that are extended by another class in the same CU
rnveach
pushed a commit
that referenced
this issue
Feb 26, 2022
rnveach
pushed a commit
that referenced
this issue
Feb 26, 2022
…re extended by another class in the same CU
Fix is merged |
Thank you very much to all involved! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Similarly to #9357, the
FinalClass
module is doing it's job correctly in that it's detecting a non-final class with only private constructor(s), but it's not smart enough to realize that in this situation, there is another class that extends it in the same java file.This is allowed because these classes are nestmates.
Following checkstyle advice would result in compilation failure.
The text was updated successfully, but these errors were encountered: