<?xml version="1.0"?>
<ruleset id="base64" xmlns="http://windup.jboss.org/schema/jboss-ruleset" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://windup.jboss.org/schema/jboss-ruleset http://windup.jboss.org/schema/jboss-ruleset/windup-jboss-ruleset.xsd">

    <metadata>
        <description>
            This ruleset assists with the migration of the org.jboss.util.Base64 class.
        </description>
        <dependencies>
            <addon id="org.jboss.windup.rules,windup-rules-javaee,2.5.0.Final" />
            <addon id="org.jboss.windup.rules,windup-rules-java,2.5.0.Final" />
        </dependencies>
        <sourceTechnology id="java-ee" />
        <sourceTechnology id="eap"/>
        <targetTechnology id="eap" versionRange="[6,)" />
        <tag>eap7</tag>
        <tag>base64</tag>
    </metadata>

    <rules>
        <rule id="base64-01000">
            <when>
                <javaclass references="org.jboss.util.Base64" />
            </when>
            <perform>
                <hint title="The class org.jboss.util.Base64 has been moved" effort="1" category-id="mandatory">
                    <message>
                        This API is not considered a public API for EAP. For JDK 8+, the recommended solution is to migrate to
                        [java.util.Base64](https://docs.oracle.com/javase/8/docs/api/java/util/Base64.html).

                        For JDK 7, it is recommended to migrate to another Base 64 library, for example
                        [Apache Commons Codec](https://commons.apache.org/proper/commons-codec/).
                    </message>
                    <link href="https://access.redhat.com/solutions/403703" title="Can application use the JBoss EAP org.jboss.util.Base64 built in class?" />
                    <tag>eap7</tag>
                    <tag>base64</tag>
                </hint>
            </perform>
        </rule>
    </rules>
</ruleset>
