Skip to content

Conversation

milamberspace
Copy link
Contributor

Description

Migrate the Java 8 source code to Java 17

  • Pattern Matching for instanceof uses (Java 14/16)
  • Implicit Typing with var (Java 10)
  • Using Switch Expressions / yield Keyword (Java 14)
  • Using Text Blocks (Java 15)

Motivation and Context

See #6219

How Has This Been Tested?

  • All tests passed : OK
  • Build the archives : OK (with Java 17 / 21 and 24, on Linux)
  • Manual tests : OK

Screenshots (if appropriate):

Types of changes

  • Breaking change : Now need Java17+ to run JMeter

Checklist:

  • My code follows the code style of this project.
  • I have updated the documentation accordingly.

@milamberspace milamberspace requested a review from vlsi June 13, 2025 10:44
@milamberspace milamberspace added this to the 6.0 milestone Jun 13, 2025
Copy link
Collaborator

@vlsi vlsi left a comment

Choose a reason for hiding this comment

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

Thanks for looking into this, LTGM modulo small changes.



rem Module access for modern Java versions (required for JMeter components)
set JAVA_OPTS=--add-opens java.desktop/sun.awt=ALL-UNNAMED --add-opens java.desktop/sun.swing=ALL-UNNAMED --add-opens java.desktop/javax.swing.text.html=ALL-UNNAMED --add-opens java.desktop/java.awt=ALL-UNNAMED --add-opens java.desktop/java.awt.font=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/sun.awt.shell=ALL-UNNAMED
Copy link
Collaborator

Choose a reason for hiding this comment

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

I assume you just moved the code, however, it would be nice to reduce the list of those options one day

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Me too

@milamberspace milamberspace merged commit 83e211f into apache:master Jul 7, 2025
3 of 7 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