BitFlipperProbitflippers.dev·Apr 18, 2024Fixing JavaTemplate Throwing ArrayIndexOutOfBoundsAre you getting a java.lang.ArrayIndexOutOfBoundsException from your JavaTemplate in your OpenRewrite recipe? If you are using substitution indicators (#{}) in your template string, you could have a mismatch between the number of indicators provided ...Discuss·37 readsJavaTemplate
BitFlipperProbitflippers.dev·Apr 11, 2024How to resolve expected recipe cycle mismatchAre you seeing an error message like this: Expected recipe to complete in 1 cycle, but took 2 cycles. This usually indicates the recipe is making changes after it should have stabilized. or Expected recipe to complete in 1 cycle, but took at least on...Discuss·242 readsopenrewrite
BitFlipperProbitflippers.dev·Apr 6, 2024Use GroqDoc and OpenRewrite to write your JavadocIt is important to have Javadoc comments on our Java interfaces so developers know how the interface was intended to be implemented. Lets use OpenRewrite and an LLM to add Javadoc comments to our interfaces! GroqCloud For this blog we have used the G...Discuss·83 readsopen rewrite
BitFlipperProbitflippers.dev·Mar 2, 2024How to Duplicate Classes with OpenRewriteLets create a new DuplicateClass scanning recipe to show how we can use OpenRewrite to create new files. Why a Scanning Recipe? As we want to create a new file we cannot use the standard imperative recipe. Standard Recipes are only able to work on ex...Discuss·112 readsScanning Recipe
BitFlipperProbitflippers.dev·Jan 14, 2024Debugging OpenRewrite AST that contains missing or invalid type informationYou’ve finally managed to get your Java refactoring recipe working where it is producing the correct text output. Your unit test is still failing though with: java.lang.IllegalStateException: AST contains missing or invalid type information Why are t...Discuss·299 readsopenrewrite
Kuldeep Sidhukuldeepsidhu.hashnode.dev·May 7, 2023Open Rewrite: Automated Code Refactoring for JavaHave you come across a scenario where you have to apply the same kind of refactoring/code transformation/fix across multiple repositories? Also, due to shorter release cycles, we are getting new versions of libraries released every week. Updating the...Discuss·2 likes·123 readsJava