rewrite-migrate-java icon indicating copy to clipboard operation
rewrite-migrate-java copied to clipboard

Fix #692: Replace "java.faces" in Java file strings

Open melloware opened this issue 8 months ago • 3 comments

Fix #692: Replace "java.faces" in Java file strings

melloware avatar Mar 25 '25 12:03 melloware

This is probably too optimistic isn't it? This would also change stuff like:

import javax.crypto.Cipher;
import javax.crypto.spec.GCMParameterSpec;
import javax.crypto.spec.SecretKeySpec;

We were left with some javax packages. This case (crypto) is working for us with Payara 6. I'm documenting all instances for us internally to review though.

jepsar avatar Mar 25 '25 12:03 jepsar

yes this would only replace "javax.faces" in strings

melloware avatar Mar 25 '25 12:03 melloware

Things like javax.crypto and javax.imageio don't get touched or converted to Jakarta ever there is a list of packages that get converted.

melloware avatar Mar 25 '25 12:03 melloware

  • Once https://github.com/openrewrite/rewrite/pull/5240 is merged we can adjust the ChangeType and ChangePackage recipes here to add visitStringLiterals: True, and remove the text based FindAndReplace introduced here.

timtebeek avatar Apr 09 '25 11:04 timtebeek