Skip to content

Conversation

pjfanning
Copy link
Member

@pjfanning pjfanning commented Sep 16, 2025

  • targeting v1.3.0 and will forward fit to main - main is in flux due to all the 2.0.0 changes
  • I looked at the javadsl packages in this repo and found a number of classes where we use scala.duration.Duration instead of java.time.Duration in the Java DSL
  • I added overloaded methods that accept java.time.Duration where feasible.
  • There are some getXXX methods that return scala.duration.Duration - changing this is a breaking change that we can't do in 1.x - I think we should live with and fix it in 2.0.0 where we can make breaking changes
    • Adding extra methods but with names like getXXXAsJava is too messy and so far, we don't have too many complaints from users

@pjfanning pjfanning changed the base branch from main to 1.3.x September 16, 2025 02:52
@pjfanning pjfanning marked this pull request as draft September 16, 2025 02:53
@pjfanning pjfanning marked this pull request as ready for review September 16, 2025 02:53
@pjfanning pjfanning marked this pull request as draft September 16, 2025 02:53
@pjfanning pjfanning closed this Sep 16, 2025
@pjfanning pjfanning reopened this Sep 16, 2025
@pjfanning pjfanning changed the title Java duration in javadsl (pekko-http jar) Java duration in javadsl Sep 16, 2025
@pjfanning pjfanning marked this pull request as ready for review September 16, 2025 20:40
Copy link
Contributor

@nvollmar nvollmar left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
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 7bd9042 into apache:1.3.x Sep 17, 2025
10 checks passed
@pjfanning pjfanning deleted the java-duration-in-javadsl branch September 17, 2025 08:30
pjfanning added a commit to pjfanning/incubator-pekko-http that referenced this pull request Sep 17, 2025
* allow java durations to be used in pekko-http javadsl

* web socket settings

* Update WebSocketSettings.scala

* compile issue

* more changes

* mima

* ClientConnectionSettings

* ConnectionPoolSettings

* javafmt

* Update java-duration-support-javadsl.excludes

* imports

* Update CachingDirectivesExamplesTest.java

* examples

* update tests
pjfanning added a commit to pjfanning/incubator-pekko-http that referenced this pull request Sep 17, 2025
* allow java durations to be used in pekko-http javadsl

* web socket settings

* Update WebSocketSettings.scala

* compile issue

* more changes

* mima

* ClientConnectionSettings

* ConnectionPoolSettings

* javafmt

* Update java-duration-support-javadsl.excludes

* imports

* Update CachingDirectivesExamplesTest.java

* examples

* update tests

Update WSProbe.scala
pjfanning added a commit that referenced this pull request Sep 17, 2025
* Java duration in javadsl (#780)

* allow java durations to be used in pekko-http javadsl

* web socket settings

* Update WebSocketSettings.scala

* compile issue

* more changes

* mima

* ClientConnectionSettings

* ConnectionPoolSettings

* javafmt

* Update java-duration-support-javadsl.excludes

* imports

* Update CachingDirectivesExamplesTest.java

* examples

* update tests

Update WSProbe.scala

* compile issues

* remove ability to pass a null java timeout
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