Skip to content

ChangePackage/ChangeType do not apply to package-info.java Javadoc #8731

Description

@SamBarker

What version of OpenRewrite are you using?

v8.91.3 (latest)

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

ChangePackage fails to rewrite {@link} references in a package-info.java file's Javadoc.

Recipe:

new ChangePackage("org.openrewrite", "org.openrewrite.test", true)

Before (package-info.java):

/**
 * See {@link org.openrewrite.Existing}
 */
package com.example;

What did you expect to see?

/**
 * See {@link org.openrewrite.test.Existing}
 */
package com.example;

What did you see instead?

No change — the recipe silently no-ops on the file. The same Javadoc on a class instead of a package declaration is rewritten correctly.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions