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

LPD-45806 Upgrade to Checkstyle 10.21.2 #3126

Draft
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

ling-alan-huang
Copy link
Owner

No description provided.

@liferay-continuous-integration
Copy link
Collaborator

To conserve resources, the PR Tester does not automatically run for every pull.

If your code changes were already tested in another pull, reference that pull in this pull so the test results can be analyzed.

If your pull was never tested, comment "ci:test" to run the PR Tester for this pull.

@ling-alan-huang ling-alan-huang force-pushed the LPD-45806_UpgradeCheckstyle_10.21.2 branch 2 times, most recently from a72a372 to a7b55e1 Compare February 11, 2025 13:13
Console: [java] ANTLR Tool version 4.9.2 used for code generation does not match the current runtime version 4.8ANTLR Runtime version 4.9.2 used for parser compilation does not match the current runtime version 4.8ANTLR Tool version 4.9.2 used for code generation does not match the current runtime version 4.8ANTLR Runtime version 4.9.2 used for parser compilation does not match the current runtime version 4.8
Example: catch (AMImageConfigurationException | IOException exception) {

Checkstyle-8.29
`--LITERAL_CATCH -> catch [22:2]
    |--LPAREN -> ( [22:8]
    |--PARAMETER_DEF -> PARAMETER_DEF [22:39]
    |   |--MODIFIERS -> MODIFIERS [22:39]
    |   |--TYPE -> TYPE [22:39]
    |   |   `--BOR -> | [22:39]
    |   |       |--IDENT -> AMImageConfigurationException [22:9]
    |   |       `--IDENT -> IOException [22:41]
    |   `--IDENT -> exception [22:53]

Checkstyle-10.21.2
`--LITERAL_CATCH -> catch [22:2]
    |--LPAREN -> ( [22:8]
    |--PARAMETER_DEF -> PARAMETER_DEF [22:9]
    |   |--MODIFIERS -> MODIFIERS [22:9]
    |   |--TYPE -> TYPE [22:9]
    |   |   |--IDENT -> AMImageConfigurationException [22:9]
    |   |   |--BOR -> | [22:39]
    |   |   `--IDENT -> IOException [22:41]
@ling-alan-huang ling-alan-huang force-pushed the LPD-45806_UpgradeCheckstyle_10.21.2 branch from a7b55e1 to b45fb4b Compare February 12, 2025 12:45
@ling-alan-huang
Copy link
Owner Author

com.puppycrawl.tools.checkstyle.api.CheckstyleException: 处理时抛出异常 /Users/alan/liferay_code/master/liferay-portal/modules/apps/account/account-test/src/testIntegration/java/com/liferay/account/service/test/AccountEntryUserRelLocalServiceTest.java
	at com.puppycrawl.tools.checkstyle.Checker.processFiles(Checker.java:312)
	at com.puppycrawl.tools.checkstyle.Checker.process(Checker.java:226)
	at com.liferay.source.formatter.processor.BaseSourceProcessor.processCheckstyle(BaseSourceProcessor.java:467)
	at com.liferay.source.formatter.processor.JavaSourceProcessor._processCheckstyle(JavaSourceProcessor.java:229)
	at com.liferay.source.formatter.processor.JavaSourceProcessor.postFormat(JavaSourceProcessor.java:101)
	at com.liferay.source.formatter.processor.BaseSourceProcessor.format(BaseSourceProcessor.java:117)
	at com.liferay.source.formatter.SourceFormatter._runSourceProcessor(SourceFormatter.java:1306)
	at com.liferay.source.formatter.SourceFormatter$1.call(SourceFormatter.java:400)
	at com.liferay.source.formatter.SourceFormatter$1.call(SourceFormatter.java:396)
	at java.base/java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:264)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.lang.NullPointerException: Cannot invoke "com.puppycrawl.tools.checkstyle.api.DetailAST.getType()" because "firstChildDetailAST" is null
	at com.liferay.source.formatter.checkstyle.check.MissingParenthesesCheck.doVisitToken(MissingParenthesesCheck.java:41)
	at com.liferay.source.formatter.checkstyle.check.BaseCheck.visitToken(BaseCheck.java:86)
	at com.puppycrawl.tools.checkstyle.TreeWalker.notifyVisit(TreeWalker.java:393)
	at com.puppycrawl.tools.checkstyle.TreeWalker.processIter(TreeWalker.java:466)
	at com.puppycrawl.tools.checkstyle.TreeWalker.walk(TreeWalker.java:331)
	at com.puppycrawl.tools.checkstyle.TreeWalker.processFiltered(TreeWalker.java:211)
	at com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck.process(AbstractFileSetCheck.java:101)
	at com.puppycrawl.tools.checkstyle.Checker.processFile(Checker.java:340)
	at com.puppycrawl.tools.checkstyle.Checker.processFiles(Checker.java:299)
	... 13 more

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.

2 participants