openrewrite / rewrite-testing-frameworks

OpenRewrite recipes that perform common Java testing migration tasks.
Apache License 2.0
68 stars 60 forks source link

AssertToAssertions puts a comma on a new line #423

Closed vlsi closed 8 months ago

vlsi commented 8 months ago

What version of OpenRewrite are you using?

org.openrewrite.rewrite.gradle.plugin:6.4.3

How are you running OpenRewrite?

./gradlew rewriteRun, see https://github.com/pgjdbc/pgjdbc/pull/2979/

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

Before (see https://github.com/pgjdbc/pgjdbc/blob/9cf9f36a1d3a1edd9286721f9c0b9cfa9e8422e3/pgjdbc/src/test/java/org/postgresql/util/LazyCleanerTest.java#L129-L133 ):

    assertThrows(
        "Exception from cleanable.clean() should be rethrown",
        IllegalStateException.class,
        cleanable::clean
    );

What did you expect to see?

    assertThrows(
        IllegalStateException.class,
        cleanable::clean,
        "Exception from cleanable.clean() should be rethrown"
    );

What did you see instead?

    assertThrows(
        IllegalStateException.class,
        cleanable::clean
    ,
        "Exception from cleanable.clean() should be rethrown");
knutwannheden commented 8 months ago

@vlsi Thanks for reporting. The fix has been deployed to https://app.moderne.io/.