Skip to content

avoid pekko Java API Option class#709

Merged
pjfanning merged 3 commits into
apache:mainfrom
pjfanning:avoid-pekko-option
Aug 5, 2025
Merged

avoid pekko Java API Option class#709
pjfanning merged 3 commits into
apache:mainfrom
pjfanning:avoid-pekko-option

Conversation

@pjfanning
Copy link
Copy Markdown
Member

Java API class now deprecated in favour of java Optional.
see #708

Copy link
Copy Markdown

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 migrates the Java API from using Pekko's Option type to Java's standard Optional type, deprecating the old methods in favor of more idiomatic Java code.

  • Deprecates existing create methods that use Option<String> parameters
  • Adds new create methods that use Optional<String> parameters
  • Updates method calls throughout the codebase to use Optional instead of Option

Reviewed Changes

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

File Description
HttpChallenge.java Adds new Optional-based factory methods, deprecates existing Option-based methods, and updates convenience methods to use Optional
SecurityDirectivesExamplesTest.java Updates test code to use Optional instead of Option for HttpChallenge creation

@@ -32,7 +32,6 @@
import java.util.concurrent.CompletionStage;
import java.util.function.Function;
import java.util.Optional;
Copy link

Copilot AI Aug 4, 2025

Choose a reason for hiding this comment

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

The import for java.util.Optional was already present at line 34 (based on the diff context). This suggests there might be duplicate imports, which should be cleaned up.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member

@He-Pin He-Pin left a comment

Choose a reason for hiding this comment

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

lgtm

@pjfanning pjfanning merged commit e636f48 into apache:main Aug 5, 2025
10 checks passed
@pjfanning pjfanning deleted the avoid-pekko-option branch August 5, 2025 11:06
@pjfanning pjfanning changed the title avoid pekko option avoid pekko Java API Option class Oct 21, 2025
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