Skip to content

Commit

Permalink
Revamp/make other modules compile (#943)
Browse files Browse the repository at this point in the history
* Update license header

* Add sbm-support-boot module

* Add sbm-support-boot module

* Module sbm-support-boot compiles

* Module sbm-support-jee compiles

* Module sbm-support-weblogic compiles

* WIP sbm-recipes-jee-to-boot

* Make SwapResponseWithResponseEntity compile

* Make SwapCacheControl compile

* Make SwapStatusForHttpStatus compile

* Make fieldsMapping a member

* Remove unused member

* Make ReplaceMediaType compile

Also removes unused member

* Make ReplaceResponseEntityBuilder compile

* Make sbm-recipes-jee-to-boot compile

* Make sbm-recipes-spring-cloud compile

* Delete unused classes

* Delete unused classes

* Make sbm-recipes-boot-upgrade compile
  • Loading branch information
fabapp2 authored Sep 24, 2023
1 parent a7b8155 commit 800f34f
Show file tree
Hide file tree
Showing 67 changed files with 798 additions and 2,192 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public interface JavaSource extends ProjectResource {
* <p>
* Be careful if the given {@code Recipe} affects more than the wrapped compilation unit YOU MUST CALL {@link JavaSourceSet.apply(..)}
*/
void apply(Recipe recipe);
void apply(Recipe... recipe);

/**
* Retrieve the {@code Type} declared in this {@code JavaSource}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public interface Type {

Annotation getAnnotation(String fqName);

void apply(Recipe r);
void apply(Recipe... r);

boolean hasMethod(String methodPattern);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ public Annotation getAnnotation(String fqName) {
}

@Override
public void apply(Recipe r) {

public void apply(Recipe... r) {
throw new UnsupportedOperationException();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ public <T> void replaceLiteral(Class<T> klass, LiteralTransformer<T> t) {
refactoring.refactor(getResource(), new ReplaceLiteralVisitor<>(klass, t));
}


@Override
public String toString() {
return "OpenRewriteJavaSource(" + getAbsolutePath() + ")";
Expand All @@ -181,7 +180,7 @@ public String toString() {
* {@inheritDoc}
*/
@Override
public void apply(Recipe recipe) {
public void apply(Recipe... recipe) {
refactoring.refactor(getResource(), recipe);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ public String toString() {
}

@Override
public void apply(Recipe r) {
public void apply(Recipe... r) {
refactoring.refactor(rewriteSourceFileHolder, r);
}

Expand Down
5 changes: 3 additions & 2 deletions components/sbm-recipes-boot-upgrade/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>

<dependencies>
Expand Down Expand Up @@ -73,6 +73,7 @@
<dependency>
<groupId>org.springframework.sbm</groupId>
<artifactId>recipe-test-support</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public String getDescription() {
}

@Override
protected TreeVisitor<?, ExecutionContext> getVisitor() {
public TreeVisitor<?, ExecutionContext> getVisitor() {

return new PropertiesVisitor<ExecutionContext>() {

Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 800f34f

Please sign in to comment.