refactor [java]: Replace IllegalStateException with log

GitOrigin-RevId: e8123b88a78bb7e16c8c3e03dbbccbe4bbbe41b5
This commit is contained in:
Bart van Helvert
2026-02-16 20:15:14 +00:00
committed by intellij-monorepo-bot
parent 73600a25ea
commit d1d5a55680
@@ -792,7 +792,7 @@ public abstract class BaseExpressionToFieldHandler extends IntroduceHandlerBase
if (includeInitializer) {
// It's important that we append field before adding the initializer to make sure that the replacement takes into account the
// context of the file
if (myField.getInitializer() == null) throw new IllegalStateException("Field initializer cannot be null");
LOG.assertTrue(myField.getInitializer() != null);
myField.getInitializer().replace(initializer);
}
if (!mySettings.isIntroduceEnumConstant()) {