I have the following public enum ImportType. With the following method
public static ImportType[] getList() {
ImportType[] list = {ImportType.TIMETABLE, ImportType.DUTIES};
return list;
}
org.openrewrite.java.cleanup.InlineVariable translates this to
public static ImportType[] getList() {
return {ImportType.TIMETABLE, ImportType.DUTIES};
}
This does no longer compile. Correct code suggested by IntelliJ
public static ImportType[] getList() {
return new ImportType[]{ImportType.TIMETABLE, ImportType.DUTIES};
}
I hope this is enough to reproduce the issue.
I have the following
public enum ImportType. With the following methodorg.openrewrite.java.cleanup.InlineVariable translates this to
This does no longer compile. Correct code suggested by IntelliJ
I hope this is enough to reproduce the issue.