openrewrite / rewrite-jenkins

OpenRewrite recipes to continuously modernize Jenkins plugins.
Apache License 2.0
9 stars 8 forks source link

Replace `joda-time` with JSR 310 in Jenkins plugins #32

Open basil opened 1 year ago

basil commented 1 year ago

Java 7 and prior had time libraries that were inadequate. The joda-time library was created to provide better ways of handling time. The joda-time library was used as the design basis for the JSR 310 time libraries. Use of joda-time should be replaced by calls to the JSR 310 time classes and methods. To identify sources with the issue, do a search in all project files for the pattern org.joda.time. See Stephen Colebourne’s 2014 blog post that describes the transition process from joda-time to JSR 310.

timtebeek commented 1 year ago

We're working on making such recipes available over in

You might want to follow that issue before any work is started here; We have a friend looking to make her recipes available, once those get cleared to open source.

timtebeek commented 1 month ago

A first batch of recipes has since been merged in:

I've renamed this issue to reflect replacement in Jenkins plugins; this is likely best handled by referencing the new recipes from https://github.com/openrewrite/rewrite-jenkins/blob/23f0e74edd34338d04c0b716b352258fb288a9df/src/main/resources/META-INF/rewrite/rewrite.yml#L17-L23

timtebeek commented 1 month ago

And the last PR has made it in, such that this work can now leverage those recipes when you depend on rewrite-migrate-java: