openrewrite / openrewrite/rewrite

JRightPadded.withElements does not preserve after when elements are replaced with other elements

Open
#5,342 5 comments 0 reactions 1 assignee View on GitHub

@Jenson3210 is already working on this.

Since Apr 25, 2025.

bug gradle groovy parser
Dominant language
Java
Stars
3.7k
Forks
570
Avg merge
13h 12m
Merged PRs (30d)
261

Description

What version of OpenRewrite are you using?

I am using

  • DependencyUseStringNotation of org.openrewrite:rewrite-gradle:8.51.0
  • Moderne CLI latest version

How are you running OpenRewrite?

mod run . --recipe DependencyUseStringNotation

What is the smallest, simplest way to reproduce the problem?

plugins {
    id 'java'
}

dependencies {
    implementation( group: 'org.apache.commons', name: 'commons-lang3', version: '3.0' )
}

repositories {
    mavenCentral()
}

What did you expect to see?

implementation( "org.apache.commons:commons-lang3:3.0" )

What did you see instead?

implementation( "org.apache.commons:commons-lang3:3.0")

Are you interested in contributing a fix to OpenRewrite?

sure

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.