Skip to content

Comments

Require Java 17+#593

Merged
horgh merged 9 commits intomainfrom
greg/eng-2665
Aug 31, 2025
Merged

Require Java 17+#593
horgh merged 9 commits intomainfrom
greg/eng-2665

Conversation

@oschwald
Copy link
Member

  • Remove deprecation notices from IP Risk database support
  • Remove deprecated WebServiceClient methods
  • Remove deprecated exception getUrl() methods
  • Remove deprecated Traits constructors and methods
  • Remove deprecated Location.getMetroCode() method
  • Upgrade to Java 17 and modernize codebase
  • Remove serialVersionUID from all exception classes

oschwald and others added 7 commits August 28, 2025 08:43
The IP Risk database is being rebuilt and will continue to be maintained.

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

Co-Authored-By: Claude <noreply@anthropic.com>
* Remove deprecated Builder methods: connectTimeout(int), readTimeout(int), and proxy(Proxy)
* Remove deprecated close() method and Closeable interface implementation
* Use Duration-based and ProxySelector-based methods instead

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

Co-Authored-By: Claude <noreply@anthropic.com>
* Remove deprecated getUrl() methods from HttpException and InvalidRequestException
* Use getUri() method instead which returns URI objects

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

Co-Authored-By: Claude <noreply@anthropic.com>
* Remove deprecated constructors that accepted additional parameters
* Remove deprecated methods isAnonymousProxy() and isSatelliteProvider()
* Remove associated private fields and parameter documentation
* Update copy constructor to work without removed fields

Use the GeoIP2 Anonymous IP database for anonymous proxy detection instead.

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

Co-Authored-By: Claude <noreply@anthropic.com>
* Remove deprecated getMetroCode() method and associated field
* Remove metroCode parameter from constructors and documentation
* Metro code values are no longer maintained by MaxMind

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

Co-Authored-By: Claude <noreply@anthropic.com>
* Update pom.xml to require Java 17
* Update GitHub Actions to test on Java 17, 21, 22, 23 (drop Java 11)
* Modernize code with Java 17 features:
  - Convert switch statement to switch expression in ConnectionTypeResponse
  - Replace Collections.singletonList() with List.of()
  - Replace defensive ArrayList copy with List.copyOf()
* Remove unused imports (Collections, ArrayList)

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

Co-Authored-By: Claude <noreply@anthropic.com>
Exception serialization is rarely needed in client libraries and explicit
serialVersionUID creates maintenance burden. Let Java auto-generate
appropriate values when serialization is actually needed.

This follows modern Java practices where most standard library exceptions
also don't include explicit serialVersionUID values.

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

Co-Authored-By: Claude <noreply@anthropic.com>
distribution: ['zulu']
os: [ubuntu-latest, windows-latest, macos-latest]
version: [ 11, 17, 21, 22 ]
version: [ 17, 21, 22, 23 ]
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this list match the reader package? That one made more sense to me. If it changes, we should update the changelog too.

CHANGELOG.md Outdated
* **BREAKING:** Java 11 support has been dropped. Java 17 or later is now required.
* Updated project to use Java 17 language features including switch expressions
and modern collection factories.
* Updated GitHub Actions workflow to test on Java 17, 21, 22, and 23.
Copy link
Contributor

Choose a reason for hiding this comment

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

I merged it already, but I wonder if we'd want to mention the above 2 points in the reader changelog too.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I am not sure. I generally leave off internal-only changes that don't impact users, but Claude added these and I guess I didn't object.

Copy link
Member Author

Choose a reason for hiding this comment

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

I removed them, but I am happy to add them to all three if you think they are helpful.

@horgh horgh merged commit 0db5efd into main Aug 31, 2025
23 checks passed
@horgh horgh deleted the greg/eng-2665 branch August 31, 2025 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants