Skip to content

Commit e18534b

Browse files
committed
Add missed recipes to Java 6 and No Guava recipes
1 parent 207d898 commit e18534b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/main/resources/META-INF/rewrite/java-version-6.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,20 @@ description: >-
2424
tags:
2525
- java6
2626
recipeList:
27+
- org.openrewrite.java.migrate.jacoco.UpgradeJaCoCo
28+
- org.openrewrite.java.migrate.util.UseEnumSetOf
2729
- org.openrewrite.java.migrate.JREWrapperInterface
2830
---
2931
type: specs.openrewrite.org/v1beta/recipe
3032
name: org.openrewrite.java.migrate.JREWrapperInterface
3133
displayName: Add missing `isWrapperFor` and `unwrap` methods.
3234
description: Add method implementations stubs to classes that implement `java.sql.Wrapper`.
3335
recipeList:
34-
- org.openrewrite.java.migrate.jacoco.UpgradeJaCoCo
3536
- org.openrewrite.java.migrate.AddMissingMethodImplementation:
3637
fullyQualifiedClassName: java.sql.Wrapper
3738
methodPattern: "*..* isWrapperFor(..)"
3839
methodTemplateString: "public boolean isWrapperFor(Class<?> iface) throws java.sql.SQLException { \n\t// TODO Auto-generated method stub\n return iface != null && iface.isAssignableFrom(this.getClass()); }"
3940
- org.openrewrite.java.migrate.AddMissingMethodImplementation:
4041
fullyQualifiedClassName: java.sql.Wrapper
4142
methodPattern: "*..* unwrap(..)"
42-
methodTemplateString: "public <T> T unwrap(Class<T> iface) throws java.sql.SQLException { \n\t// TODO Auto-generated method stub\n try { if (iface != null && iface.isAssignableFrom(this.getClass())) { return (T) this; } throw new java.sql.SQLException(\"Auto-generated unwrap failed; Revisit implementation\"); } catch (Exception e) { throw new java.sql.SQLException(e); } }"
43+
methodTemplateString: "public <T> T unwrap(Class<T> iface) throws java.sql.SQLException { \n\t// TODO Auto-generated method stub\n try { if (iface != null && iface.isAssignableFrom(this.getClass())) { return (T) this; } throw new java.sql.SQLException(\"Auto-generated unwrap failed; Revisit implementation\"); } catch (Exception e) { throw new java.sql.SQLException(e); } }"

src/main/resources/META-INF/rewrite/no-guava.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ recipeList:
3636
- org.openrewrite.java.migrate.guava.NoGuavaMapsNewTreeMap
3737
- org.openrewrite.java.migrate.guava.NoGuavaPrimitiveAsList
3838
- org.openrewrite.java.migrate.guava.NoGuavaRefasterRecipes
39+
- org.openrewrite.java.migrate.guava.NoGuavaMapsNewHashMap
3940
- org.openrewrite.java.migrate.guava.NoGuavaSetsNewHashSet
4041
- org.openrewrite.java.migrate.guava.NoGuavaSetsNewConcurrentHashSet
4142
- org.openrewrite.java.migrate.guava.NoGuavaSetsNewLinkedHashSet

0 commit comments

Comments
 (0)