Skip to content

doc: Add FIXME #811

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

Merged
merged 2 commits into from
Jun 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
package org.springframework.sbm.engine.recipe;

import lombok.RequiredArgsConstructor;
import org.openrewrite.*;
import org.openrewrite.Recipe;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.sbm.engine.context.ProjectContext;
/*
* Copyright 2021 - 2022 the original author or authors.
*
Expand All @@ -20,7 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.sbm.engine.recipe;

import lombok.RequiredArgsConstructor;
import org.openrewrite.ExecutionContext;
import org.openrewrite.Recipe;
import org.openrewrite.Result;
import org.openrewrite.SourceFile;
import org.springframework.sbm.engine.context.ProjectContext;
import org.springframework.stereotype.Component;

import java.util.List;
Expand All @@ -31,6 +31,7 @@ public class RewriteRecipeRunner {
private final RewriteMigrationResultMerger resultMerger;
private final ExecutionContext executionContext;

// FIXME: Make this a method 'apply(org.openrewrite.Recipe)' on ProjectContext, see https://github.com/spring-projects-experimental/spring-boot-migrator/issues/803
public void run(ProjectContext context, Recipe recipe) {
List<? extends SourceFile> rewriteSourceFiles = context.search(new OpenRewriteSourceFilesFinder());
List<Result> results = recipe.run(rewriteSourceFiles, executionContext).getResults();
Expand Down