Skip to content

Conversation

@sebr72
Copy link
Contributor

@sebr72 sebr72 commented Oct 2, 2025

Stop using old Java code where possible.
Remove calls to deprecated methods in tests

@sebr72 sebr72 force-pushed the Remove_deprecated_test_code branch 2 times, most recently from ae77d19 to 2891fb4 Compare October 2, 2025 07:28
@sbrunner sbrunner requested a review from Copilot October 2, 2025 08:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR modernizes the Java codebase by migrating from deprecated Java APIs to modern alternatives, specifically:

  • Replacing deprecated String.repeat() implementations with loop-based string appending
  • Switching from deprecated URL constructors to URL.of() with URI parameters
  • Updating to modern StatusPrinter2 class instead of deprecated StatusPrinter
  • Migrating from new HashMap<String, String>() to diamond operator new HashMap<>()
  • Replacing list.get(0) and list.get(list.size()-1) with getFirst() and getLast() methods

Reviewed Changes

Copilot reviewed 136 out of 136 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
PrintApiTest.java Replaced manual loop with String.repeat() for test data generation
ExamplesTest.java Updated imports, exception handling, and URL construction methods
Multiple test files Migrated HashMap instantiation to use diamond operator throughout
Various layer/processor test files Updated list access methods to use getFirst()/getLast()
Core source files Applied modern Java patterns including switch expressions and instanceof pattern matching

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@sebr72 sebr72 force-pushed the Remove_deprecated_test_code branch from 72915f9 to 9a8467e Compare October 2, 2025 09:36
@sebr72 sebr72 force-pushed the Remove_deprecated_test_code branch from 9a8467e to 7db1daf Compare October 2, 2025 10:48
@sebr72 sebr72 force-pushed the Remove_deprecated_test_code branch 4 times, most recently from efd1651 to 40e6b9c Compare October 2, 2025 23:28
@sebr72 sebr72 force-pushed the Remove_deprecated_test_code branch from 40e6b9c to 67eba48 Compare October 2, 2025 23:30
@sebr72 sebr72 changed the title Migrate old code Migrate Java 5 to Java 17 code to Java 21 Oct 3, 2025
@sebr72 sebr72 changed the title Migrate Java 5 to Java 17 code to Java 21 Migrate Java 5 - 17 code to Java 21 Oct 3, 2025
@sebr72 sebr72 force-pushed the Remove_deprecated_test_code branch 2 times, most recently from efc3fcb to 0a30473 Compare October 6, 2025 15:52
@sebr72 sebr72 force-pushed the Remove_deprecated_test_code branch from 0a30473 to fe8521d Compare October 7, 2025 08:04
@sebr72 sebr72 force-pushed the Remove_deprecated_test_code branch from fe8521d to 7bb0142 Compare October 7, 2025 15:12
@sebr72 sebr72 marked this pull request as ready for review October 7, 2025 15:40
@sebr72 sebr72 force-pushed the Remove_deprecated_test_code branch from 7bb0142 to f8e941b Compare October 7, 2025 15:50
@sebr72 sebr72 merged commit 2f557ac into master Oct 7, 2025
15 checks passed
@sebr72 sebr72 deleted the Remove_deprecated_test_code branch October 7, 2025 16:08
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.

3 participants