Skip to content

Issue #17168: Upgrade Pom Java version to 17#17259

Merged
romani merged 1 commit into
checkstyle:masterfrom
AmitKumarDeoghoria:pomup
Jul 5, 2025
Merged

Issue #17168: Upgrade Pom Java version to 17#17259
romani merged 1 commit into
checkstyle:masterfrom
AmitKumarDeoghoria:pomup

Conversation

@AmitKumarDeoghoria

Copy link
Copy Markdown
Contributor

part of : #17168

@romani

romani commented Jun 22, 2025

Copy link
Copy Markdown
Member

Update jdk version for error-prone in separate PR.
And for semaphore.

Checker look like needs to updated together with pom, in same PR, you can apply all changes that Checker want to this PR, to keep it green.

@romani

romani commented Jun 26, 2025

Copy link
Copy Markdown
Member

Please try fix what is possible at https://app.circleci.com/pipelines/github/checkstyle/checkstyle/34677/workflows/15a7b5a7-ae21-423c-a8e7-3fa7de9286b2/jobs/980685/artifacts
What is not possible to split and merge in separate PR, please add to current PR as fix.

We need CI to be green.

@romani

romani commented Jun 26, 2025

Copy link
Copy Markdown
Member

Jdk11 https://checkstyle.semaphoreci.com/jobs/21741292-0cfc-4afe-8e01-5adf21d919d1#L403 ???

[INFO] --- enforcer:3.5.0:enforce (enforce-versions) @ checkstyle ---
[INFO] Rule 1: org.apache.maven.enforcer.rules.version.RequireMavenVersion passed
[INFO] Rule 2: org.apache.maven.enforcer.rules.dependency.DependencyConvergence passed
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  9.924 s
[INFO] Finished at: 2025-06-26T04:09:06Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.5.0:enforce (enforce-versions) on project checkstyle: 
[ERROR] Rule 0: org.apache.maven.enforcer.rules.version.RequireJavaVersion failed with message:
[ERROR] Detected JDK version 11.0.27 (JAVA_HOME=/usr/lib/jvm/temurin-11-jdk-amd64) is not in the allowed range [17,).
[ERROR] -> [Help 1]

@AmitKumarDeoghoria AmitKumarDeoghoria force-pushed the pomup branch 2 times, most recently from fa486c0 to ec6664c Compare June 28, 2025 08:20
@AmitKumarDeoghoria

AmitKumarDeoghoria commented Jun 28, 2025

Copy link
Copy Markdown
Contributor Author

Jdk11 https://checkstyle.semaphoreci.com/jobs/21741292-0cfc-4afe-8e01-5adf21d919d1#L403 ???

Will be solved after Semaphore jdk17 Upgrade PR : #17289 is merged.

@romani

romani commented Jun 30, 2025

Copy link
Copy Markdown
Member

Ok, time to fix inspections.
https://app.circleci.com/pipelines/github/checkstyle/checkstyle/34729/workflows/670c247b-43a6-407a-a019-e7b8c7341d28/jobs/983133/artifacts

All inspections that are jdk17 only, should be moved to separate issue to be resolved separately, after migration to jdk17. In other words we need to disable them until issue .

All others, should be fixed in separate PR, while we are in jdk11

@romani

romani commented Jul 1, 2025

Copy link
Copy Markdown
Member

Inspection still not happy

@romani

romani commented Jul 1, 2025

Copy link
Copy Markdown
Member

Rebased in web UI

@romani

romani commented Jul 2, 2025

Copy link
Copy Markdown
Member

@romani

romani commented Jul 3, 2025

Copy link
Copy Markdown
Member
XML file does not appear to have any style information associated with it. The document tree is shown below.
<problems is_local_tool="true">
<problem>
<file>file://$PROJECT_DIR$/src/main/java/com/puppycrawl/tools/checkstyle/ConfigurationLoader.java</file>
<line>436</line>
<module>project</module>
<package>com.puppycrawl.tools.checkstyle</package>
<entry_point TYPE="method" FQNAME="com.puppycrawl.tools.checkstyle.ConfigurationLoader.InternalLoader void parsePropertyString(java.lang.String value, java.util.Collection<java.lang.String> fragments, java.util.Collection<java.lang.String> propertyRefs)"/>
<problem_class id="MethodMayBeStatic" severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Method can be made 'static'</problem_class>
<description>Method <code>parsePropertyString()</code> may be 'static' #loc</description>
<highlighted_element>parsePropertyString</highlighted_element>
<language>JAVA</language>
<offset>21</offset>
<length>19</length>
</problem>
</problems>

And

XML file does not appear to have any style information associated with it. The document tree is shown below.
<problems is_local_tool="true">
<problem>
<file>file://$PROJECT_DIR$/src/main/java/com/puppycrawl/tools/checkstyle/ConfigurationLoader.java</file>
<line>144</line>
<module>project</module>
<package>com.puppycrawl.tools.checkstyle</package>
<entry_point TYPE="class" FQNAME="com.puppycrawl.tools.checkstyle.ConfigurationLoader"/>
<problem_class id="Java9CollectionFactory" severity="WEAK WARNING" attribute_key="INFO_ATTRIBUTES">Immutable collection creation can be replaced with collection factory call</problem_class>
<description>Can be replaced with 'Map.of()' call</description>
<highlighted_element>unmodifiableMap</highlighted_element>
<language>JAVA</language>
<offset>46</offset>
<length>15</length>
</problem>
</problems>

@AmitKumarDeoghoria AmitKumarDeoghoria force-pushed the pomup branch 3 times, most recently from cfe4de7 to 4209f60 Compare July 3, 2025 19:42
@AmitKumarDeoghoria

Copy link
Copy Markdown
Contributor Author

@romani

romani commented Jul 3, 2025

Copy link
Copy Markdown
Member

Nothing, it has no violations, it is just general description

@romani

romani commented Jul 4, 2025

Copy link
Copy Markdown
Member

Rebased in web. I hope it is last time before merge

@romani

romani commented Jul 4, 2025

Copy link
Copy Markdown
Member

@AmitKumarDeoghoria , if I rebased in web , you don't need to rebase and push again, it just wasted ci

@AmitKumarDeoghoria

AmitKumarDeoghoria commented Jul 4, 2025

Copy link
Copy Markdown
Contributor Author

I am aware of that @romai CI was red, a patch was needed for checker suppression, so I merged the patch and then pushed it.

@romani romani left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are on jdk17 !!!

thanks a lot for huge effort

@romani romani merged commit 26124ef into checkstyle:master Jul 5, 2025
118 checks passed
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