Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JavaxBeansXmlToJakartaBeansXml also updates namespace in Spring application context xml #385

Closed
jpraet opened this issue Jan 8, 2024 · 2 comments · Fixed by #386
Closed
Assignees
Labels
bug Something isn't working

Comments

@jpraet
Copy link

jpraet commented Jan 8, 2024

What version of OpenRewrite are you using?

  • Maven plugin v5.17.1

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

test.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">

    <!-- bean definitions here -->

</beans>

What did you expect to see?

test.xml Spring application context remains unchanged.

What did you see instead?

Namespace is updated.

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="https://jakarta.ee/xml/ns/jakartaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/beans_3_0.xsd">

    <!-- bean definitions here -->

</beans>
@jpraet jpraet added the bug Something isn't working label Jan 8, 2024
@timtebeek timtebeek changed the title JavaxBeansXmlToJakartaBeansXml also updates namespace in Spring application context xml JavaxBeansXmlToJakartaBeansXml also updates namespace in Spring application context xml Jan 8, 2024
@timtebeek
Copy link
Contributor

Hi @jpraet ; thanks for reporting this here! Seems like an oversight indeed, which I hope to fix in:

@melloware
Copy link
Contributor

sorry about that @jpraet i totally forgot Spring Beans had a similar namespace! Great fix @timtebeek

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants