GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [improve][client] PIP-421: Require Java 17 as the minimum for Pulsar Java client SDK by codelipenghui · Pull Request #24475 · apache/pulsar

Conversation

@codelipenghui

@codelipenghui codelipenghui commented Jul 1, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Fix: #24364

Summary

This PR implements PIP-421: Require Java 17 as the minimum for Pulsar Java client SDK.

The change upgrades the minimum Java version requirement for all Pulsar Java client SDK components from Java 8 to Java 17, starting with Pulsar 4.1.0.

Motivation

  • Java 8 has been out of premier support for 3+ years with declining usage (23% in 2024)
  • Many dependencies now require Java 17+ (Jetty 12, Jersey 3.1, Jakarta APIs, AthenZ)
  • Security vulnerabilities in older dependency versions cannot be patched
  • Java 17 LTS is widely adopted and provides better performance and features

Changes Made

  • Maven Configuration: Updated pulsar.client.compiler.release from 8 to 17 in root pom.xml
  • Client Modules: All client modules now compile with Java 17:
    • pulsar-client, pulsar-client-admin, pulsar-client-api, pulsar-client-admin-api
    • pulsar-client-auth-, pulsar-client-tools, pulsar-common, pulsar-cli-utils
  • Modernizer Plugin: Updated Java version checks from 8 to 17 in all client modules
  • Code Modernization: Fixed Java 17 modernizer violations:
    • ImmutableList.of() → List.of()
    • ImmutableSet.of() → Set.of()
    • URLEncoder.encode(String, String) → URLEncoder.encode(String, Charset)
  • Documentation: Updated README.md to reflect Java 17 requirement for client components
  • PIP Document: Added complete PIP-421 documentation

Migration Path

  • Pulsar 4.1.0+: Java 17 required for all client components
  • Pulsar 4.0 LTS: Continues to support Java 8 clients until 2028
  • Backward Compatibility: Users on Java 8 can continue using 4.0 LTS branch

Test plan

  • Client modules build successfully with Java 17
  • Modernizer plugin passes with Java 17 checks
  • Checkstyle and license checks pass
  • All code changes follow existing patterns and conventions

Files Changed

Maven Configuration:

  • pom.xml - Updated client compiler release to 17
  • Multiple client module pom.xml files - Updated modernizer plugin Java version

Source Code:

  • Updated deprecated API usage to Java 17+ equivalents in client and admin modules
  • Removed unused imports and fixed code style violations

Documentation:

  • README.md - Updated Java version requirements table

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@github-actions

github-actions Bot commented Jul 1, 2025

Copy link
Copy Markdown

@codelipenghui Please add the following content to your PR description and select a checkbox:

- [ ] `doc` <!-- Your PR contains doc changes -->
- [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
- [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
- [ ] `doc-complete` <!-- Docs have been already added -->
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added the doc-label-missing label Jul 1, 2025
@codelipenghui codelipenghui self-assigned this Jul 1, 2025
@codelipenghui codelipenghui added this to the 4.1.0 milestone Jul 1, 2025
@codelipenghui codelipenghui added the ready-to-test label Jul 1, 2025
@codelipenghui

codelipenghui commented Jul 1, 2025

Copy link
Copy Markdown
Contributor Author

/pulsarbot run-failure-checks

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@codelipenghui codelipenghui added doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. and removed doc-label-missing labels Jul 1, 2025
@codelipenghui codelipenghui changed the title PIP-421: Require Java 17 as the minimum for Pulsar Java client SDK [improve][client] PIP-421: Require Java 17 as the minimum for Pulsar Java client SDK Jul 1, 2025
@github-actions github-actions Bot added doc-label-missing and removed doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. labels Jul 1, 2025
@codelipenghui codelipenghui added doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. and removed doc-label-missing labels Jul 1, 2025
@github-actions github-actions Bot added doc-label-missing and removed doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. labels Jul 1, 2025
@codelipenghui codelipenghui added doc-not-needed Your PR changes do not impact docs and removed doc-label-missing labels Jul 1, 2025
@github-actions github-actions Bot added doc-label-missing and removed doc-not-needed Your PR changes do not impact docs labels Jul 1, 2025
codelipenghui and others added 4 commits July 1, 2025 19:14
@codelipenghui @claude
[improve][client] PIP-421: Require Java 17 as minimum for Pulsar Java…
6dd551c
… client SDK

This change implements PIP-421 by upgrading the minimum Java version
requirement for all Pulsar Java client SDK components from Java 8 to Java 17.

Changes include:
- Updated pulsar.client.compiler.release property from 8 to 17
- Updated modernizer plugin configurations in all client modules
- Fixed Java 17 modernizer violations (URLEncoder, Collection factories)
- Updated README.md documentation to reflect Java 17 requirement
- Added PIP-421 documentation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@codelipenghui @claude
[fix][client] Fix additional Java 17 modernizer violations in pulsar-…
86e8809
…common

- Replace URLEncoder/URLDecoder with Charset-based APIs
- Replace ImmutableList/ImmutableMap with Java 9+ collection factories
- Update OffloadPoliciesImpl to use List instead of ImmutableList
- Simplify Codec class by removing exception handling

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@codelipenghui @claude
[improve][client] Fix remaining modernizer violations for Java 17 upg…
c739f96
…rade

- Replace ImmutableMap.of() with Map.of() in AbstractCmdConsume.java
- Remove unused Guava imports after modernization
- Ensure all client modules pass modernizer checks for Java 17

This completes the PIP-421 implementation by resolving the final
modernizer violations discovered during the full build process.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@codelipenghui @claude
[improve][ci] Remove Java 8 and 11 shade CI tests
e999359
Remove obsolete Java 8 and 11 shade CI tests since minimum JDK version is now 17.
- Remove Java 8/11 shade test configurations from CI workflow
- Remove Java 8 compatibility code from build script (TestNG/Mockito version overrides)
- Simplify shade test functions to use default Java version

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@codelipenghui
codelipenghui force-pushed the penghui/PIP-421 branch from 029de64 to e999359 Compare July 2, 2025 02:14
@codecov-commenter

codecov-commenter commented Jul 2, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 46.66667% with 8 lines in your changes missing coverage. Please review.

Project coverage is 74.29%. Comparing base (bbc6224) to head (751142b).
Report is 1192 commits behind head on master.

Files with missing lines Patch % Lines
...g/apache/pulsar/client/cli/AbstractCmdConsume.java 0.00% 4 Missing ⚠️
...lsar/common/policies/data/OffloadPoliciesImpl.java 20.00% 4 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #24475      +/-   ##
============================================
+ Coverage     73.57%   74.29%   +0.71%     
+ Complexity    32624    32428     -196     
============================================
  Files          1877     1868       -9     
  Lines        139502   145753    +6251     
  Branches      15299    16701    +1402     
============================================
+ Hits         102638   108284    +5646     
+ Misses        28908    28891      -17     
- Partials       7956     8578     +622     
Flag Coverage Δ
inttests 26.67% <26.66%> (+2.08%) ⬆️
systests 23.30% <26.66%> (-1.02%) ⬇️
unittests 73.79% <46.66%> (+0.94%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...pache/pulsar/client/admin/internal/WebTargets.java 83.33% <100.00%> (+23.33%) ⬆️
...he/pulsar/client/impl/PartitionedProducerImpl.java 81.09% <100.00%> (+0.32%) ⬆️
.../client/impl/auth/oauth2/protocol/TokenClient.java 84.78% <100.00%> (+3.93%) ⬆️
...main/java/org/apache/pulsar/common/util/Codec.java 66.66% <100.00%> (+36.66%) ⬆️
...g/apache/pulsar/client/cli/AbstractCmdConsume.java 16.39% <0.00%> (-4.07%) ⬇️
...lsar/common/policies/data/OffloadPoliciesImpl.java 81.81% <20.00%> (-3.85%) ⬇️

... and 1088 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

nodece
nodece reviewed Jul 2, 2025
View reviewed changes
Comment thread pom.xml Resolved

Uh oh!

There was an error while loading. Please reload this page.

@codelipenghui
Remove java8 profile
751142b
@codelipenghui

codelipenghui commented Jul 3, 2025

Copy link
Copy Markdown
Contributor Author

/pulsarbot run-failure-checks

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

1 similar comment
@codelipenghui

codelipenghui commented Jul 3, 2025

Copy link
Copy Markdown
Contributor Author

/pulsarbot run-failure-checks

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

nodece
nodece approved these changes Jul 3, 2025
View reviewed changes
@codelipenghui

codelipenghui commented Jul 3, 2025

Copy link
Copy Markdown
Contributor Author

/pulsarbot run-failure-checks

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@codelipenghui
codelipenghui merged commit ad7cb1d into apache:master Jul 3, 2025
@codelipenghui
codelipenghui deleted the penghui/PIP-421 branch July 3, 2025 17:06
codelipenghui added a commit to codelipenghui/incubator-pulsar that referenced this pull request Jul 15, 2025
@codelipenghui @claude
[improve][client] PIP-421: Require Java 17 as the minimum for Pulsar …
494a9f4
…Java client SDK (apache#24475)

Co-authored-by: Claude <[email protected]>
@yashmayya yashmayya mentioned this pull request Sep 9, 2025
Upgrade Pulsar dependency to 4.1.0 apache/pinot#16781
Closed
KannarFr pushed a commit to CleverCloud/pulsar that referenced this pull request Sep 22, 2025
@codelipenghui @claude @KannarFr
[improve][client] PIP-421: Require Java 17 as the minimum for Pulsar …
d2c2902
…Java client SDK (apache#24475)

Co-authored-by: Claude <[email protected]>
walkinggo pushed a commit to walkinggo/pulsar that referenced this pull request Oct 8, 2025
@codelipenghui @claude @walkinggo
[improve][client] PIP-421: Require Java 17 as the minimum for Pulsar …
4bd47ed
…Java client SDK (apache#24475)

Co-authored-by: Claude <[email protected]>
dao-jun added a commit to ascentstream/pulsar that referenced this pull request Sep 20, 2026
@dao-jun
[ci] Drop Shade on Java 8/11 matrix entries
7b885b2
BookKeeper 4.18 jars are Java 17 bytecode (verified: class file major 61,
vs major 52 for the previous ascentstream 4.17.4.0 fork) and they are part
of the client dependency chain, so the shaded client artifacts cannot run
on Java 8/11 anymore. apache/pulsar made the same change when adopting
PIP-421 "Require Java 17 as the minimum for Pulsar Java client SDK"
(apache#24475): the SHADE_RUN matrix keeps only JDK 17+ entries.
dao-jun added a commit to ascentstream/pulsar that referenced this pull request Sep 20, 2026
@dao-jun
[ci] Drop Shade on Java 8/11 matrix entries
eea0351
BookKeeper 4.18 jars are Java 17 bytecode (verified: class file major 61,
vs major 52 for the previous ascentstream 4.17.4.0 fork) and they are part
of the client dependency chain, so the shaded client artifacts cannot run
on Java 8/11 anymore. apache/pulsar made the same change when adopting
PIP-421 "Require Java 17 as the minimum for Pulsar Java client SDK"
(apache#24475): the SHADE_RUN matrix keeps only JDK 17+ entries.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@nodece nodece nodece approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@codelipenghui codelipenghui

Labels

doc-label-missing ready-to-test

Projects

None yet

Milestone

4.1.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@codelipenghui @codecov-commenter @nodece
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.